rusoto_ec2 0.30.0

AWS SDK for Rust - Amazon Elastic Compute Cloud @ 2016-11-15
Documentation

// =================================================================
//
//                           * WARNING *
//
//                    This file is generated!
//
//  Changes made to this file will be overwritten. If changes are
//  required to the generated code, the service_crategen project
//  must be updated to generate the changes.
//
// =================================================================

#[allow(warnings)]
use hyper::Client;
use hyper::status::StatusCode;
use rusoto_core::request::DispatchSignedRequest;
use rusoto_core::region;

use std::fmt;
use std::error::Error;
use std::io;
use std::io::Read;
use rusoto_core::request::HttpDispatchError;
use rusoto_core::credential::{CredentialsError, ProvideAwsCredentials};

use std::str::FromStr;
use xml::EventReader;
use xml::reader::ParserConfig;
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::signature::SignedRequest;
use xml::reader::XmlEvent;
use rusoto_core::xmlutil::{Next, Peek, XmlParseError, XmlResponse};
use rusoto_core::xmlutil::{characters, end_element, start_element, skip_tree, peek_at_name};
use rusoto_core::xmlerror::*;

enum DeserializerNext {
    Close,
    Skip,
    Element(String),
}
#[doc="<p>Contains the parameters for accepting the quote.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AcceptReservedInstancesExchangeQuoteRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The IDs of the Convertible Reserved Instances to exchange for other Convertible Reserved Instances of the same or higher value.</p>"]
    pub reserved_instance_ids: Vec<String>,
    #[doc="<p>The configurations of the Convertible Reserved Instance offerings that you are purchasing in this exchange.</p>"]
    pub target_configurations: Option<Vec<TargetConfigurationRequest>>,
}


/// Serialize `AcceptReservedInstancesExchangeQuoteRequest` contents to a `SignedRequest`.
struct AcceptReservedInstancesExchangeQuoteRequestSerializer;
impl AcceptReservedInstancesExchangeQuoteRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &AcceptReservedInstancesExchangeQuoteRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        ReservedInstanceIdSetSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "ReservedInstanceId"),
                                                   &obj.reserved_instance_ids);
        if let Some(ref field_value) = obj.target_configurations {
            TargetConfigurationRequestSetSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "TargetConfiguration"),
                                                               field_value);
        }

    }
}

#[doc="<p>The result of the exchange and whether it was <code>successful</code>.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AcceptReservedInstancesExchangeQuoteResult {
    #[doc="<p>The ID of the successful exchange.</p>"]
    pub exchange_id: Option<String>,
}

struct AcceptReservedInstancesExchangeQuoteResultDeserializer;
impl AcceptReservedInstancesExchangeQuoteResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<AcceptReservedInstancesExchangeQuoteResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AcceptReservedInstancesExchangeQuoteResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "exchangeId" => {
                            obj.exchange_id = Some(try!(StringDeserializer::deserialize("exchangeId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AcceptVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AcceptVpcPeeringConnectionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC peering connection.</p>"]
    pub vpc_peering_connection_id: Option<String>,
}


/// Serialize `AcceptVpcPeeringConnectionRequest` contents to a `SignedRequest`.
struct AcceptVpcPeeringConnectionRequestSerializer;
impl AcceptVpcPeeringConnectionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AcceptVpcPeeringConnectionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.vpc_peering_connection_id {
            params.put(&format!("{}{}", prefix, "VpcPeeringConnectionId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of AcceptVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AcceptVpcPeeringConnectionResult {
    #[doc="<p>Information about the VPC peering connection.</p>"]
    pub vpc_peering_connection: Option<VpcPeeringConnection>,
}

struct AcceptVpcPeeringConnectionResultDeserializer;
impl AcceptVpcPeeringConnectionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<AcceptVpcPeeringConnectionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AcceptVpcPeeringConnectionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpcPeeringConnection" => {
                            obj.vpc_peering_connection =
                                Some(try!(VpcPeeringConnectionDeserializer::deserialize("vpcPeeringConnection",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an account attribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AccountAttribute {
    #[doc="<p>The name of the account attribute.</p>"]
    pub attribute_name: Option<String>,
    #[doc="<p>One or more values for the account attribute.</p>"]
    pub attribute_values: Option<Vec<AccountAttributeValue>>,
}

struct AccountAttributeDeserializer;
impl AccountAttributeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AccountAttribute, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AccountAttribute::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attributeName" => {
                            obj.attribute_name = Some(try!(StringDeserializer::deserialize("attributeName",
                                                                                           stack)));
                        }
                        "attributeValueSet" => {
                            obj.attribute_values = Some(try!(AccountAttributeValueListDeserializer::deserialize("attributeValueSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AccountAttributeListDeserializer;
impl AccountAttributeListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<AccountAttribute>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(AccountAttributeDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `AccountAttributeNameStringList` contents to a `SignedRequest`.
struct AccountAttributeNameStringListSerializer;
impl AccountAttributeNameStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes a value of an account attribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AccountAttributeValue {
    #[doc="<p>The value of the attribute.</p>"]
    pub attribute_value: Option<String>,
}

struct AccountAttributeValueDeserializer;
impl AccountAttributeValueDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AccountAttributeValue, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AccountAttributeValue::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attributeValue" => {
                            obj.attribute_value =
                                Some(try!(StringDeserializer::deserialize("attributeValue",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AccountAttributeValueListDeserializer;
impl AccountAttributeValueListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<AccountAttributeValue>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(AccountAttributeValueDeserializer::deserialize("item",
                                                                                     stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a running instance in a Spot fleet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ActiveInstance {
    #[doc="<p>The health status of the instance. If the status of either the instance status check or the system status check is <code>impaired</code>, the health status of the instance is <code>unhealthy</code>. Otherwise, the health status is <code>healthy</code>.</p>"]
    pub instance_health: Option<String>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The instance type.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The ID of the Spot instance request.</p>"]
    pub spot_instance_request_id: Option<String>,
}

struct ActiveInstanceDeserializer;
impl ActiveInstanceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ActiveInstance, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ActiveInstance::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceHealth" => {
                            obj.instance_health =
                                Some(try!(InstanceHealthStatusDeserializer::deserialize("instanceHealth",
                                                                                        stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "instanceType" => {
                            obj.instance_type = Some(try!(StringDeserializer::deserialize("instanceType",
                                                                                          stack)));
                        }
                        "spotInstanceRequestId" => {
                            obj.spot_instance_request_id =
                                Some(try!(StringDeserializer::deserialize("spotInstanceRequestId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ActiveInstanceSetDeserializer;
impl ActiveInstanceSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ActiveInstance>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ActiveInstanceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct ActivityStatusDeserializer;
impl ActivityStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an Elastic IP address.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Address {
    #[doc="<p>The ID representing the allocation of the address for use with EC2-VPC.</p>"]
    pub allocation_id: Option<String>,
    #[doc="<p>The ID representing the association of the address with an instance in a VPC.</p>"]
    pub association_id: Option<String>,
    #[doc="<p>Indicates whether this Elastic IP address is for use with instances in EC2-Classic (<code>standard</code>) or instances in a VPC (<code>vpc</code>).</p>"]
    pub domain: Option<String>,
    #[doc="<p>The ID of the instance that the address is associated with (if any).</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The ID of the AWS account that owns the network interface.</p>"]
    pub network_interface_owner_id: Option<String>,
    #[doc="<p>The private IP address associated with the Elastic IP address.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>The Elastic IP address.</p>"]
    pub public_ip: Option<String>,
}

struct AddressDeserializer;
impl AddressDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Address, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Address::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allocationId" => {
                            obj.allocation_id = Some(try!(StringDeserializer::deserialize("allocationId",
                                                                                          stack)));
                        }
                        "associationId" => {
                            obj.association_id = Some(try!(StringDeserializer::deserialize("associationId",
                                                                                           stack)));
                        }
                        "domain" => {
                            obj.domain = Some(try!(DomainTypeDeserializer::deserialize("domain",
                                                                                       stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "networkInterfaceOwnerId" => {
                            obj.network_interface_owner_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceOwnerId",
                                                                          stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address =
                                Some(try!(StringDeserializer::deserialize("privateIpAddress",
                                                                          stack)));
                        }
                        "publicIp" => {
                            obj.public_ip = Some(try!(StringDeserializer::deserialize("publicIp",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AddressListDeserializer;
impl AddressListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Address>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(AddressDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AllocateAddress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AllocateAddressRequest {
    #[doc="<p>[EC2-VPC] The Elastic IP address to recover.</p>"]
    pub address: Option<String>,
    #[doc="<p>Set to <code>vpc</code> to allocate the address for use with instances in a VPC.</p> <p>Default: The address is for use with instances in EC2-Classic.</p>"]
    pub domain: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `AllocateAddressRequest` contents to a `SignedRequest`.
struct AllocateAddressRequestSerializer;
impl AllocateAddressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AllocateAddressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.address {
            params.put(&format!("{}{}", prefix, "Address"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.domain {
            params.put(&format!("{}{}", prefix, "Domain"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of AllocateAddress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AllocateAddressResult {
    #[doc="<p>[EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.</p>"]
    pub allocation_id: Option<String>,
    #[doc="<p>Indicates whether this Elastic IP address is for use with instances in EC2-Classic (<code>standard</code>) or instances in a VPC (<code>vpc</code>).</p>"]
    pub domain: Option<String>,
    #[doc="<p>The Elastic IP address.</p>"]
    pub public_ip: Option<String>,
}

struct AllocateAddressResultDeserializer;
impl AllocateAddressResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AllocateAddressResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AllocateAddressResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allocationId" => {
                            obj.allocation_id = Some(try!(StringDeserializer::deserialize("allocationId",
                                                                                          stack)));
                        }
                        "domain" => {
                            obj.domain = Some(try!(DomainTypeDeserializer::deserialize("domain",
                                                                                       stack)));
                        }
                        "publicIp" => {
                            obj.public_ip = Some(try!(StringDeserializer::deserialize("publicIp",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AllocateHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AllocateHostsRequest {
    #[doc="<p>This is enabled by default. This property allows instances to be automatically placed onto available Dedicated Hosts, when you are launching instances without specifying a host ID.</p> <p>Default: Enabled</p>"]
    pub auto_placement: Option<String>,
    #[doc="<p>The Availability Zone for the Dedicated Hosts.</p>"]
    pub availability_zone: String,
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p>"]
    pub client_token: Option<String>,
    #[doc="<p>Specify the instance type that you want your Dedicated Hosts to be configured for. When you specify the instance type, that is the only instance type that you can launch onto that host.</p>"]
    pub instance_type: String,
    #[doc="<p>The number of Dedicated Hosts you want to allocate to your account with these parameters.</p>"]
    pub quantity: i64,
}


/// Serialize `AllocateHostsRequest` contents to a `SignedRequest`.
struct AllocateHostsRequestSerializer;
impl AllocateHostsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AllocateHostsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.auto_placement {
            params.put(&format!("{}{}", prefix, "AutoPlacement"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                   &obj.availability_zone.replace("+", "%2B"));
        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceType"),
                   &obj.instance_type.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "Quantity"),
                   &obj.quantity.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of AllocateHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AllocateHostsResult {
    #[doc="<p>The ID of the allocated Dedicated Host. This is used when you want to launch an instance onto a specific host.</p>"]
    pub host_ids: Option<Vec<String>>,
}

struct AllocateHostsResultDeserializer;
impl AllocateHostsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AllocateHostsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AllocateHostsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "hostIdSet" => {
                            obj.host_ids =
                                Some(try!(ResponseHostIdListDeserializer::deserialize("hostIdSet",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `AllocationIdList` contents to a `SignedRequest`.
struct AllocationIdListSerializer;
impl AllocationIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct AllocationStateDeserializer;
impl AllocationStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AllocationStrategyDeserializer;
impl AllocationStrategyDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ArchitectureValuesDeserializer;
impl ArchitectureValuesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct AssignIpv6AddressesRequest {
    #[doc="<p>The number of IPv6 addresses to assign to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.</p>"]
    pub ipv_6_address_count: Option<i64>,
    #[doc="<p>One or more specific IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.</p>"]
    pub ipv_6_addresses: Option<Vec<String>>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
}


/// Serialize `AssignIpv6AddressesRequest` contents to a `SignedRequest`.
struct AssignIpv6AddressesRequestSerializer;
impl AssignIpv6AddressesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssignIpv6AddressesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.ipv_6_address_count {
            params.put(&format!("{}{}", prefix, "Ipv6AddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ipv_6_addresses {
            Ipv6AddressListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "Ipv6Addresses"),
                                                 field_value);
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct AssignIpv6AddressesResult {
    #[doc="<p>The IPv6 addresses assigned to the network interface.</p>"]
    pub assigned_ipv_6_addresses: Option<Vec<String>>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
}

struct AssignIpv6AddressesResultDeserializer;
impl AssignIpv6AddressesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AssignIpv6AddressesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AssignIpv6AddressesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "assignedIpv6Addresses" => {
                            obj.assigned_ipv_6_addresses =
                                Some(try!(Ipv6AddressListDeserializer::deserialize("assignedIpv6Addresses",
                                                                                   stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AssignPrivateIpAddresses.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AssignPrivateIpAddressesRequest {
    #[doc="<p>Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.</p>"]
    pub allow_reassignment: Option<bool>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
    #[doc="<p>One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.</p> <p>If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.</p>"]
    pub private_ip_addresses: Option<Vec<String>>,
    #[doc="<p>The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.</p>"]
    pub secondary_private_ip_address_count: Option<i64>,
}


/// Serialize `AssignPrivateIpAddressesRequest` contents to a `SignedRequest`.
struct AssignPrivateIpAddressesRequestSerializer;
impl AssignPrivateIpAddressesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssignPrivateIpAddressesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.allow_reassignment {
            params.put(&format!("{}{}", prefix, "AllowReassignment"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.private_ip_addresses {
            PrivateIpAddressStringListSerializer::serialize(params,
                                                            &format!("{}{}",
                                                                    prefix,
                                                                    "PrivateIpAddress"),
                                                            field_value);
        }
        if let Some(ref field_value) = obj.secondary_private_ip_address_count {
            params.put(&format!("{}{}", prefix, "SecondaryPrivateIpAddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for AssociateAddress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AssociateAddressRequest {
    #[doc="<p>[EC2-VPC] The allocation ID. This is required for EC2-VPC.</p>"]
    pub allocation_id: Option<String>,
    #[doc="<p>[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.</p>"]
    pub allow_reassociation: Option<bool>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>The Elastic IP address. This is required for EC2-Classic.</p>"]
    pub public_ip: Option<String>,
}


/// Serialize `AssociateAddressRequest` contents to a `SignedRequest`.
struct AssociateAddressRequestSerializer;
impl AssociateAddressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssociateAddressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.allocation_id {
            params.put(&format!("{}{}", prefix, "AllocationId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.allow_reassociation {
            params.put(&format!("{}{}", prefix, "AllowReassociation"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_id {
            params.put(&format!("{}{}", prefix, "InstanceId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.network_interface_id {
            params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.private_ip_address {
            params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.public_ip {
            params.put(&format!("{}{}", prefix, "PublicIp"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of AssociateAddress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AssociateAddressResult {
    #[doc="<p>[EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.</p>"]
    pub association_id: Option<String>,
}

struct AssociateAddressResultDeserializer;
impl AssociateAddressResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AssociateAddressResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AssociateAddressResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associationId" => {
                            obj.association_id = Some(try!(StringDeserializer::deserialize("associationId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AssociateDhcpOptions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AssociateDhcpOptionsRequest {
    #[doc="<p>The ID of the DHCP options set, or <code>default</code> to associate no DHCP options with the VPC.</p>"]
    pub dhcp_options_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `AssociateDhcpOptionsRequest` contents to a `SignedRequest`.
struct AssociateDhcpOptionsRequestSerializer;
impl AssociateDhcpOptionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssociateDhcpOptionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "DhcpOptionsId"),
                   &obj.dhcp_options_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct AssociateIamInstanceProfileRequest {
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: IamInstanceProfileSpecification,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
}


/// Serialize `AssociateIamInstanceProfileRequest` contents to a `SignedRequest`.
struct AssociateIamInstanceProfileRequestSerializer;
impl AssociateIamInstanceProfileRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssociateIamInstanceProfileRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        IamInstanceProfileSpecificationSerializer::serialize(params,
                                                             &format!("{}{}",
                                                                     prefix,
                                                                     "IamInstanceProfile"),
                                                             &obj.iam_instance_profile);
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct AssociateIamInstanceProfileResult {
    #[doc="<p>Information about the IAM instance profile association.</p>"]
    pub iam_instance_profile_association: Option<IamInstanceProfileAssociation>,
}

struct AssociateIamInstanceProfileResultDeserializer;
impl AssociateIamInstanceProfileResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<AssociateIamInstanceProfileResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AssociateIamInstanceProfileResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "iamInstanceProfileAssociation" => {
                            obj.iam_instance_profile_association = Some(try!(IamInstanceProfileAssociationDeserializer::deserialize("iamInstanceProfileAssociation", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AssociateRouteTable.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AssociateRouteTableRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: String,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: String,
}


/// Serialize `AssociateRouteTableRequest` contents to a `SignedRequest`.
struct AssociateRouteTableRequestSerializer;
impl AssociateRouteTableRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssociateRouteTableRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "SubnetId"),
                   &obj.subnet_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of AssociateRouteTable.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AssociateRouteTableResult {
    #[doc="<p>The route table association ID (needed to disassociate the route table).</p>"]
    pub association_id: Option<String>,
}

struct AssociateRouteTableResultDeserializer;
impl AssociateRouteTableResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AssociateRouteTableResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AssociateRouteTableResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associationId" => {
                            obj.association_id = Some(try!(StringDeserializer::deserialize("associationId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct AssociateSubnetCidrBlockRequest {
    #[doc="<p>The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length.</p>"]
    pub ipv_6_cidr_block: String,
    #[doc="<p>The ID of your subnet.</p>"]
    pub subnet_id: String,
}


/// Serialize `AssociateSubnetCidrBlockRequest` contents to a `SignedRequest`.
struct AssociateSubnetCidrBlockRequestSerializer;
impl AssociateSubnetCidrBlockRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssociateSubnetCidrBlockRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Ipv6CidrBlock"),
                   &obj.ipv_6_cidr_block.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "SubnetId"),
                   &obj.subnet_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct AssociateSubnetCidrBlockResult {
    #[doc="<p>Information about the IPv6 CIDR block association.</p>"]
    pub ipv_6_cidr_block_association: Option<SubnetIpv6CidrBlockAssociation>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: Option<String>,
}

struct AssociateSubnetCidrBlockResultDeserializer;
impl AssociateSubnetCidrBlockResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AssociateSubnetCidrBlockResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AssociateSubnetCidrBlockResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipv6CidrBlockAssociation" => {
                            obj.ipv_6_cidr_block_association = Some(try!(SubnetIpv6CidrBlockAssociationDeserializer::deserialize("ipv6CidrBlockAssociation", stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct AssociateVpcCidrBlockRequest {
    #[doc="<p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.</p>"]
    pub amazon_provided_ipv_6_cidr_block: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `AssociateVpcCidrBlockRequest` contents to a `SignedRequest`.
struct AssociateVpcCidrBlockRequestSerializer;
impl AssociateVpcCidrBlockRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AssociateVpcCidrBlockRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.amazon_provided_ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "AmazonProvidedIpv6CidrBlock"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct AssociateVpcCidrBlockResult {
    #[doc="<p>Information about the IPv6 CIDR block association.</p>"]
    pub ipv_6_cidr_block_association: Option<VpcIpv6CidrBlockAssociation>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct AssociateVpcCidrBlockResultDeserializer;
impl AssociateVpcCidrBlockResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AssociateVpcCidrBlockResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AssociateVpcCidrBlockResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipv6CidrBlockAssociation" => {
                            obj.ipv_6_cidr_block_association = Some(try!(VpcIpv6CidrBlockAssociationDeserializer::deserialize("ipv6CidrBlockAssociation", stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `AssociationIdList` contents to a `SignedRequest`.
struct AssociationIdListSerializer;
impl AssociationIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Contains the parameters for AttachClassicLinkVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachClassicLinkVpcRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.</p>"]
    pub groups: Vec<String>,
    #[doc="<p>The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.</p>"]
    pub instance_id: String,
    #[doc="<p>The ID of a ClassicLink-enabled VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `AttachClassicLinkVpcRequest` contents to a `SignedRequest`.
struct AttachClassicLinkVpcRequestSerializer;
impl AttachClassicLinkVpcRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AttachClassicLinkVpcRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        GroupIdStringListSerializer::serialize(params,
                                               &format!("{}{}", prefix, "SecurityGroupId"),
                                               &obj.groups);
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of AttachClassicLinkVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachClassicLinkVpcResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct AttachClassicLinkVpcResultDeserializer;
impl AttachClassicLinkVpcResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AttachClassicLinkVpcResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AttachClassicLinkVpcResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AttachInternetGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachInternetGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the Internet gateway.</p>"]
    pub internet_gateway_id: String,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `AttachInternetGatewayRequest` contents to a `SignedRequest`.
struct AttachInternetGatewayRequestSerializer;
impl AttachInternetGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AttachInternetGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InternetGatewayId"),
                   &obj.internet_gateway_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for AttachNetworkInterface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachNetworkInterfaceRequest {
    #[doc="<p>The index of the device for the network interface attachment.</p>"]
    pub device_index: i64,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
}


/// Serialize `AttachNetworkInterfaceRequest` contents to a `SignedRequest`.
struct AttachNetworkInterfaceRequestSerializer;
impl AttachNetworkInterfaceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AttachNetworkInterfaceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "DeviceIndex"),
                   &obj.device_index.to_string().replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of AttachNetworkInterface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachNetworkInterfaceResult {
    #[doc="<p>The ID of the network interface attachment.</p>"]
    pub attachment_id: Option<String>,
}

struct AttachNetworkInterfaceResultDeserializer;
impl AttachNetworkInterfaceResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AttachNetworkInterfaceResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AttachNetworkInterfaceResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachmentId" => {
                            obj.attachment_id = Some(try!(StringDeserializer::deserialize("attachmentId",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for AttachVolume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachVolumeRequest {
    #[doc="<p>The device name to expose to the instance (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>"]
    pub device: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
    #[doc="<p>The ID of the EBS volume. The volume and instance must be within the same Availability Zone.</p>"]
    pub volume_id: String,
}


/// Serialize `AttachVolumeRequest` contents to a `SignedRequest`.
struct AttachVolumeRequestSerializer;
impl AttachVolumeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AttachVolumeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Device"),
                   &obj.device.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for AttachVpnGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachVpnGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
    #[doc="<p>The ID of the virtual private gateway.</p>"]
    pub vpn_gateway_id: String,
}


/// Serialize `AttachVpnGatewayRequest` contents to a `SignedRequest`.
struct AttachVpnGatewayRequestSerializer;
impl AttachVpnGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AttachVpnGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpnGatewayId"),
                   &obj.vpn_gateway_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of AttachVpnGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttachVpnGatewayResult {
    #[doc="<p>Information about the attachment.</p>"]
    pub vpc_attachment: Option<VpcAttachment>,
}

struct AttachVpnGatewayResultDeserializer;
impl AttachVpnGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AttachVpnGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AttachVpnGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachment" => {
                            obj.vpc_attachment =
                                Some(try!(VpcAttachmentDeserializer::deserialize("attachment",
                                                                                 stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AttachmentStatusDeserializer;
impl AttachmentStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a value for a resource attribute that is a Boolean value.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttributeBooleanValue {
    #[doc="<p>The attribute value. The valid values are <code>true</code> or <code>false</code>.</p>"]
    pub value: Option<bool>,
}

struct AttributeBooleanValueDeserializer;
impl AttributeBooleanValueDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AttributeBooleanValue, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AttributeBooleanValue::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "value" => {
                            obj.value = Some(try!(BooleanDeserializer::deserialize("value",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `AttributeBooleanValue` contents to a `SignedRequest`.
struct AttributeBooleanValueSerializer;
impl AttributeBooleanValueSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AttributeBooleanValue) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.value {
            params.put(&format!("{}{}", prefix, "Value"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a value for a resource attribute that is a String.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AttributeValue {
    #[doc="<p>The attribute value. Note that the value is case-sensitive.</p>"]
    pub value: Option<String>,
}

struct AttributeValueDeserializer;
impl AttributeValueDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AttributeValue, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AttributeValue::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "value" => {
                            obj.value = Some(try!(StringDeserializer::deserialize("value", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `AttributeValue` contents to a `SignedRequest`.
struct AttributeValueSerializer;
impl AttributeValueSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AttributeValue) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.value {
            params.put(&format!("{}{}", prefix, "Value"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for AuthorizeSecurityGroupEgress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AuthorizeSecurityGroupEgressRequest {
    #[doc="<p>The CIDR IPv4 address range. We recommend that you specify the CIDR range in a set of IP permissions instead.</p>"]
    pub cidr_ip: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.</p>"]
    pub from_port: Option<i64>,
    #[doc="<p>The ID of the security group.</p>"]
    pub group_id: String,
    #[doc="<p>A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.</p>"]
    pub ip_permissions: Option<Vec<IpPermission>>,
    #[doc="<p>The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.</p>"]
    pub ip_protocol: Option<String>,
    #[doc="<p>The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.</p>"]
    pub source_security_group_name: Option<String>,
    #[doc="<p>The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.</p>"]
    pub source_security_group_owner_id: Option<String>,
    #[doc="<p>The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.</p>"]
    pub to_port: Option<i64>,
}


/// Serialize `AuthorizeSecurityGroupEgressRequest` contents to a `SignedRequest`.
struct AuthorizeSecurityGroupEgressRequestSerializer;
impl AuthorizeSecurityGroupEgressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AuthorizeSecurityGroupEgressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_ip {
            params.put(&format!("{}{}", prefix, "CidrIp"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.from_port {
            params.put(&format!("{}{}", prefix, "FromPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "GroupId"),
                   &obj.group_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.ip_permissions {
            IpPermissionListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "IpPermissions"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.ip_protocol {
            params.put(&format!("{}{}", prefix, "IpProtocol"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_name {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_owner_id {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupOwnerId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.to_port {
            params.put(&format!("{}{}", prefix, "ToPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for AuthorizeSecurityGroupIngress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AuthorizeSecurityGroupIngressRequest {
    #[doc="<p>The CIDR IPv4 address range. You can't specify this parameter when specifying a source security group.</p>"]
    pub cidr_ip: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. For the ICMP/ICMPv6 type number, use <code>-1</code> to specify all types.</p>"]
    pub from_port: Option<i64>,
    #[doc="<p>The ID of the security group. Required for a nondefault VPC.</p>"]
    pub group_id: Option<String>,
    #[doc="<p>[EC2-Classic, default VPC] The name of the security group.</p>"]
    pub group_name: Option<String>,
    #[doc="<p>A set of IP permissions. Can be used to specify multiple rules in a single command.</p>"]
    pub ip_permissions: Option<Vec<IpPermission>>,
    #[doc="<p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number (see <a href=\"http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml\">Protocol Numbers</a>). (VPC only) Use <code>-1</code> to specify all protocols. If you specify <code>-1</code>, or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or <code>58</code> (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For protocol <code>58</code> (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed.</p>"]
    pub ip_protocol: Option<String>,
    #[doc="<p>[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.</p>"]
    pub source_security_group_name: Option<String>,
    #[doc="<p>[EC2-Classic] The AWS account number for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.</p>"]
    pub source_security_group_owner_id: Option<String>,
    #[doc="<p>The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code number. For the ICMP/ICMPv6 code number, use <code>-1</code> to specify all codes.</p>"]
    pub to_port: Option<i64>,
}


/// Serialize `AuthorizeSecurityGroupIngressRequest` contents to a `SignedRequest`.
struct AuthorizeSecurityGroupIngressRequestSerializer;
impl AuthorizeSecurityGroupIngressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &AuthorizeSecurityGroupIngressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_ip {
            params.put(&format!("{}{}", prefix, "CidrIp"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.from_port {
            params.put(&format!("{}{}", prefix, "FromPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_id {
            params.put(&format!("{}{}", prefix, "GroupId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ip_permissions {
            IpPermissionListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "IpPermissions"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.ip_protocol {
            params.put(&format!("{}{}", prefix, "IpProtocol"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_name {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_owner_id {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupOwnerId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.to_port {
            params.put(&format!("{}{}", prefix, "ToPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

struct AutoPlacementDeserializer;
impl AutoPlacementDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an Availability Zone.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AvailabilityZone {
    #[doc="<p>Any messages about the Availability Zone.</p>"]
    pub messages: Option<Vec<AvailabilityZoneMessage>>,
    #[doc="<p>The name of the region.</p>"]
    pub region_name: Option<String>,
    #[doc="<p>The state of the Availability Zone.</p>"]
    pub state: Option<String>,
    #[doc="<p>The name of the Availability Zone.</p>"]
    pub zone_name: Option<String>,
}

struct AvailabilityZoneDeserializer;
impl AvailabilityZoneDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AvailabilityZone, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AvailabilityZone::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "messageSet" => {
                            obj.messages = Some(try!(AvailabilityZoneMessageListDeserializer::deserialize("messageSet", stack)));
                        }
                        "regionName" => {
                            obj.region_name = Some(try!(StringDeserializer::deserialize("regionName",
                                                                                        stack)));
                        }
                        "zoneState" => {
                            obj.state =
                                Some(try!(AvailabilityZoneStateDeserializer::deserialize("zoneState",
                                                                                         stack)));
                        }
                        "zoneName" => {
                            obj.zone_name = Some(try!(StringDeserializer::deserialize("zoneName",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AvailabilityZoneListDeserializer;
impl AvailabilityZoneListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<AvailabilityZone>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(AvailabilityZoneDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a message about an Availability Zone.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AvailabilityZoneMessage {
    #[doc="<p>The message about the Availability Zone.</p>"]
    pub message: Option<String>,
}

struct AvailabilityZoneMessageDeserializer;
impl AvailabilityZoneMessageDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AvailabilityZoneMessage, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AvailabilityZoneMessage::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "message" => {
                            obj.message = Some(try!(StringDeserializer::deserialize("message",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AvailabilityZoneMessageListDeserializer;
impl AvailabilityZoneMessageListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<AvailabilityZoneMessage>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(AvailabilityZoneMessageDeserializer::deserialize("item",
                                                                                       stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct AvailabilityZoneStateDeserializer;
impl AvailabilityZoneStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>The capacity information for instances launched onto the Dedicated Host.</p>"]
#[derive(Default,Debug,Clone)]
pub struct AvailableCapacity {
    #[doc="<p>The total number of instances that the Dedicated Host supports.</p>"]
    pub available_instance_capacity: Option<Vec<InstanceCapacity>>,
    #[doc="<p>The number of vCPUs available on the Dedicated Host.</p>"]
    pub available_v_cpus: Option<i64>,
}

struct AvailableCapacityDeserializer;
impl AvailableCapacityDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<AvailableCapacity, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = AvailableCapacity::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availableInstanceCapacity" => {
                            obj.available_instance_capacity = Some(try!(AvailableInstanceCapacityListDeserializer::deserialize("availableInstanceCapacity", stack)));
                        }
                        "availableVCpus" => {
                            obj.available_v_cpus =
                                Some(try!(IntegerDeserializer::deserialize("availableVCpus",
                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct AvailableInstanceCapacityListDeserializer;
impl AvailableInstanceCapacityListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceCapacity>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceCapacityDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct BatchStateDeserializer;
impl BatchStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `BillingProductList` contents to a `SignedRequest`.
struct BillingProductListSerializer;
impl BillingProductListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct BlobDeserializer;
impl BlobDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<u8>, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack)).into_bytes();
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct BlobAttributeValue {
    pub value: Option<Vec<u8>>,
}


/// Serialize `BlobAttributeValue` contents to a `SignedRequest`.
struct BlobAttributeValueSerializer;
impl BlobAttributeValueSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &BlobAttributeValue) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.value {
            params.put(&format!("{}{}", prefix, "Value"),
                       ::std::str::from_utf8(&field_value)
                           .unwrap()
                           .replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a block device mapping.</p>"]
#[derive(Default,Debug,Clone)]
pub struct BlockDeviceMapping {
    #[doc="<p>The device name exposed to the instance (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>"]
    pub device_name: Option<String>,
    #[doc="<p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>"]
    pub ebs: Option<EbsBlockDevice>,
    #[doc="<p>Suppresses the specified device included in the block device mapping of the AMI.</p>"]
    pub no_device: Option<String>,
    #[doc="<p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p> <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>"]
    pub virtual_name: Option<String>,
}

struct BlockDeviceMappingDeserializer;
impl BlockDeviceMappingDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<BlockDeviceMapping, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = BlockDeviceMapping::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "deviceName" => {
                            obj.device_name = Some(try!(StringDeserializer::deserialize("deviceName",
                                                                                        stack)));
                        }
                        "ebs" => {
                            obj.ebs = Some(try!(EbsBlockDeviceDeserializer::deserialize("ebs",
                                                                                        stack)));
                        }
                        "noDevice" => {
                            obj.no_device = Some(try!(StringDeserializer::deserialize("noDevice",
                                                                                      stack)));
                        }
                        "virtualName" => {
                            obj.virtual_name = Some(try!(StringDeserializer::deserialize("virtualName",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `BlockDeviceMapping` contents to a `SignedRequest`.
struct BlockDeviceMappingSerializer;
impl BlockDeviceMappingSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &BlockDeviceMapping) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.device_name {
            params.put(&format!("{}{}", prefix, "DeviceName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ebs {
            EbsBlockDeviceSerializer::serialize(params,
                                                &format!("{}{}", prefix, "Ebs"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.no_device {
            params.put(&format!("{}{}", prefix, "NoDevice"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.virtual_name {
            params.put(&format!("{}{}", prefix, "VirtualName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct BlockDeviceMappingListDeserializer;
impl BlockDeviceMappingListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<BlockDeviceMapping>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(BlockDeviceMappingDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `BlockDeviceMappingList` contents to a `SignedRequest`.
struct BlockDeviceMappingListSerializer;
impl BlockDeviceMappingListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<BlockDeviceMapping>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            BlockDeviceMappingSerializer::serialize(params, &key, obj);
        }
    }
}


/// Serialize `BlockDeviceMappingRequestList` contents to a `SignedRequest`.
struct BlockDeviceMappingRequestListSerializer;
impl BlockDeviceMappingRequestListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<BlockDeviceMapping>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            BlockDeviceMappingSerializer::serialize(params, &key, obj);
        }
    }
}

struct BooleanDeserializer;
impl BooleanDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<bool, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = bool::from_str(try!(characters(stack)).as_ref()).unwrap();
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `BundleIdStringList` contents to a `SignedRequest`.
struct BundleIdStringListSerializer;
impl BundleIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Contains the parameters for BundleInstance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct BundleInstanceRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance to bundle.</p> <p>Type: String</p> <p>Default: None</p> <p>Required: Yes</p>"]
    pub instance_id: String,
    #[doc="<p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>"]
    pub storage: Storage,
}


/// Serialize `BundleInstanceRequest` contents to a `SignedRequest`.
struct BundleInstanceRequestSerializer;
impl BundleInstanceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &BundleInstanceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        StorageSerializer::serialize(params, &format!("{}{}", prefix, "Storage"), &obj.storage);

    }
}

#[doc="<p>Contains the output of BundleInstance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct BundleInstanceResult {
    #[doc="<p>Information about the bundle task.</p>"]
    pub bundle_task: Option<BundleTask>,
}

struct BundleInstanceResultDeserializer;
impl BundleInstanceResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<BundleInstanceResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = BundleInstanceResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "bundleInstanceTask" => {
                            obj.bundle_task =
                                Some(try!(BundleTaskDeserializer::deserialize("bundleInstanceTask",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a bundle task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct BundleTask {
    #[doc="<p>The ID of the bundle task.</p>"]
    pub bundle_id: Option<String>,
    #[doc="<p>If the task fails, a description of the error.</p>"]
    pub bundle_task_error: Option<BundleTaskError>,
    #[doc="<p>The ID of the instance associated with this bundle task.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The level of task completion, as a percent (for example, 20%).</p>"]
    pub progress: Option<String>,
    #[doc="<p>The time this task started.</p>"]
    pub start_time: Option<String>,
    #[doc="<p>The state of the task.</p>"]
    pub state: Option<String>,
    #[doc="<p>The Amazon S3 storage locations.</p>"]
    pub storage: Option<Storage>,
    #[doc="<p>The time of the most recent update for the task.</p>"]
    pub update_time: Option<String>,
}

struct BundleTaskDeserializer;
impl BundleTaskDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<BundleTask, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = BundleTask::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "bundleId" => {
                            obj.bundle_id = Some(try!(StringDeserializer::deserialize("bundleId",
                                                                                      stack)));
                        }
                        "error" => {
                            obj.bundle_task_error =
                                Some(try!(BundleTaskErrorDeserializer::deserialize("error",
                                                                                   stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "progress" => {
                            obj.progress = Some(try!(StringDeserializer::deserialize("progress",
                                                                                     stack)));
                        }
                        "startTime" => {
                            obj.start_time = Some(try!(DateTimeDeserializer::deserialize("startTime",
                                                                                         stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(BundleTaskStateDeserializer::deserialize("state",
                                                                                           stack)));
                        }
                        "storage" => {
                            obj.storage = Some(try!(StorageDeserializer::deserialize("storage",
                                                                                     stack)));
                        }
                        "updateTime" => {
                            obj.update_time = Some(try!(DateTimeDeserializer::deserialize("updateTime",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an error for <a>BundleInstance</a>.</p>"]
#[derive(Default,Debug,Clone)]
pub struct BundleTaskError {
    #[doc="<p>The error code.</p>"]
    pub code: Option<String>,
    #[doc="<p>The error message.</p>"]
    pub message: Option<String>,
}

struct BundleTaskErrorDeserializer;
impl BundleTaskErrorDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<BundleTaskError, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = BundleTaskError::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(StringDeserializer::deserialize("code", stack)));
                        }
                        "message" => {
                            obj.message = Some(try!(StringDeserializer::deserialize("message",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct BundleTaskListDeserializer;
impl BundleTaskListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<BundleTask>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(BundleTaskDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct BundleTaskStateDeserializer;
impl BundleTaskStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct CancelBatchErrorCodeDeserializer;
impl CancelBatchErrorCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CancelBundleTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelBundleTaskRequest {
    #[doc="<p>The ID of the bundle task.</p>"]
    pub bundle_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `CancelBundleTaskRequest` contents to a `SignedRequest`.
struct CancelBundleTaskRequestSerializer;
impl CancelBundleTaskRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CancelBundleTaskRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "BundleId"),
                   &obj.bundle_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CancelBundleTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelBundleTaskResult {
    #[doc="<p>Information about the bundle task.</p>"]
    pub bundle_task: Option<BundleTask>,
}

struct CancelBundleTaskResultDeserializer;
impl CancelBundleTaskResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CancelBundleTaskResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelBundleTaskResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "bundleInstanceTask" => {
                            obj.bundle_task =
                                Some(try!(BundleTaskDeserializer::deserialize("bundleInstanceTask",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CancelConversionTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelConversionRequest {
    #[doc="<p>The ID of the conversion task.</p>"]
    pub conversion_task_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The reason for canceling the conversion task.</p>"]
    pub reason_message: Option<String>,
}


/// Serialize `CancelConversionRequest` contents to a `SignedRequest`.
struct CancelConversionRequestSerializer;
impl CancelConversionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CancelConversionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "ConversionTaskId"),
                   &obj.conversion_task_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.reason_message {
            params.put(&format!("{}{}", prefix, "ReasonMessage"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for CancelExportTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelExportTaskRequest {
    #[doc="<p>The ID of the export task. This is the ID returned by <code>CreateInstanceExportTask</code>.</p>"]
    pub export_task_id: String,
}


/// Serialize `CancelExportTaskRequest` contents to a `SignedRequest`.
struct CancelExportTaskRequestSerializer;
impl CancelExportTaskRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CancelExportTaskRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "ExportTaskId"),
                   &obj.export_task_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for CancelImportTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelImportTaskRequest {
    #[doc="<p>The reason for canceling the task.</p>"]
    pub cancel_reason: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the import image or import snapshot task to be canceled.</p>"]
    pub import_task_id: Option<String>,
}


/// Serialize `CancelImportTaskRequest` contents to a `SignedRequest`.
struct CancelImportTaskRequestSerializer;
impl CancelImportTaskRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CancelImportTaskRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cancel_reason {
            params.put(&format!("{}{}", prefix, "CancelReason"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.import_task_id {
            params.put(&format!("{}{}", prefix, "ImportTaskId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for CancelImportTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelImportTaskResult {
    #[doc="<p>The ID of the task being canceled.</p>"]
    pub import_task_id: Option<String>,
    #[doc="<p>The current state of the task being canceled.</p>"]
    pub previous_state: Option<String>,
    #[doc="<p>The current state of the task being canceled.</p>"]
    pub state: Option<String>,
}

struct CancelImportTaskResultDeserializer;
impl CancelImportTaskResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CancelImportTaskResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelImportTaskResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "importTaskId" => {
                            obj.import_task_id = Some(try!(StringDeserializer::deserialize("importTaskId",
                                                                                           stack)));
                        }
                        "previousState" => {
                            obj.previous_state = Some(try!(StringDeserializer::deserialize("previousState",
                                                                                           stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(StringDeserializer::deserialize("state", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CancelReservedInstancesListing.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelReservedInstancesListingRequest {
    #[doc="<p>The ID of the Reserved Instance listing.</p>"]
    pub reserved_instances_listing_id: String,
}


/// Serialize `CancelReservedInstancesListingRequest` contents to a `SignedRequest`.
struct CancelReservedInstancesListingRequestSerializer;
impl CancelReservedInstancesListingRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CancelReservedInstancesListingRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "ReservedInstancesListingId"),
                   &obj.reserved_instances_listing_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CancelReservedInstancesListing.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelReservedInstancesListingResult {
    #[doc="<p>The Reserved Instance listing.</p>"]
    pub reserved_instances_listings: Option<Vec<ReservedInstancesListing>>,
}

struct CancelReservedInstancesListingResultDeserializer;
impl CancelReservedInstancesListingResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CancelReservedInstancesListingResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelReservedInstancesListingResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesListingsSet" => {
                            obj.reserved_instances_listings = Some(try!(ReservedInstancesListingListDeserializer::deserialize("reservedInstancesListingsSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a Spot fleet error.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelSpotFleetRequestsError {
    #[doc="<p>The error code.</p>"]
    pub code: String,
    #[doc="<p>The description for the error code.</p>"]
    pub message: String,
}

struct CancelSpotFleetRequestsErrorDeserializer;
impl CancelSpotFleetRequestsErrorDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CancelSpotFleetRequestsError, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelSpotFleetRequestsError::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = try!(CancelBatchErrorCodeDeserializer::deserialize("code",
                                                                                          stack));
                        }
                        "message" => {
                            obj.message = try!(StringDeserializer::deserialize("message", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a Spot fleet request that was not successfully canceled.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelSpotFleetRequestsErrorItem {
    #[doc="<p>The error.</p>"]
    pub error: CancelSpotFleetRequestsError,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
}

struct CancelSpotFleetRequestsErrorItemDeserializer;
impl CancelSpotFleetRequestsErrorItemDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CancelSpotFleetRequestsErrorItem, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelSpotFleetRequestsErrorItem::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "error" => {
                            obj.error =
                                try!(CancelSpotFleetRequestsErrorDeserializer::deserialize("error",
                                                                                           stack));
                        }
                        "spotFleetRequestId" => {
                            obj.spot_fleet_request_id =
                                try!(StringDeserializer::deserialize("spotFleetRequestId", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct CancelSpotFleetRequestsErrorSetDeserializer;
impl CancelSpotFleetRequestsErrorSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<CancelSpotFleetRequestsErrorItem>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(CancelSpotFleetRequestsErrorItemDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CancelSpotFleetRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelSpotFleetRequestsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The IDs of the Spot fleet requests.</p>"]
    pub spot_fleet_request_ids: Vec<String>,
    #[doc="<p>Indicates whether to terminate instances for a Spot fleet request if it is canceled successfully.</p>"]
    pub terminate_instances: bool,
}


/// Serialize `CancelSpotFleetRequestsRequest` contents to a `SignedRequest`.
struct CancelSpotFleetRequestsRequestSerializer;
impl CancelSpotFleetRequestsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CancelSpotFleetRequestsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        ValueStringListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "SpotFleetRequestId"),
                                             &obj.spot_fleet_request_ids);
        params.put(&format!("{}{}", prefix, "TerminateInstances"),
                   &obj.terminate_instances.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CancelSpotFleetRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelSpotFleetRequestsResponse {
    #[doc="<p>Information about the Spot fleet requests that are successfully canceled.</p>"]
    pub successful_fleet_requests: Option<Vec<CancelSpotFleetRequestsSuccessItem>>,
    #[doc="<p>Information about the Spot fleet requests that are not successfully canceled.</p>"]
    pub unsuccessful_fleet_requests: Option<Vec<CancelSpotFleetRequestsErrorItem>>,
}

struct CancelSpotFleetRequestsResponseDeserializer;
impl CancelSpotFleetRequestsResponseDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CancelSpotFleetRequestsResponse, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelSpotFleetRequestsResponse::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "successfulFleetRequestSet" => {
                            obj.successful_fleet_requests = Some(try!(CancelSpotFleetRequestsSuccessSetDeserializer::deserialize("successfulFleetRequestSet", stack)));
                        }
                        "unsuccessfulFleetRequestSet" => {
                            obj.unsuccessful_fleet_requests = Some(try!(CancelSpotFleetRequestsErrorSetDeserializer::deserialize("unsuccessfulFleetRequestSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a Spot fleet request that was successfully canceled.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelSpotFleetRequestsSuccessItem {
    #[doc="<p>The current state of the Spot fleet request.</p>"]
    pub current_spot_fleet_request_state: String,
    #[doc="<p>The previous state of the Spot fleet request.</p>"]
    pub previous_spot_fleet_request_state: String,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
}

struct CancelSpotFleetRequestsSuccessItemDeserializer;
impl CancelSpotFleetRequestsSuccessItemDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CancelSpotFleetRequestsSuccessItem, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelSpotFleetRequestsSuccessItem::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "currentSpotFleetRequestState" => {
                            obj.current_spot_fleet_request_state =
                                try!(BatchStateDeserializer::deserialize("currentSpotFleetRequestState",
                                                                         stack));
                        }
                        "previousSpotFleetRequestState" => {
                            obj.previous_spot_fleet_request_state =
                                try!(BatchStateDeserializer::deserialize("previousSpotFleetRequestState",
                                                                         stack));
                        }
                        "spotFleetRequestId" => {
                            obj.spot_fleet_request_id =
                                try!(StringDeserializer::deserialize("spotFleetRequestId", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct CancelSpotFleetRequestsSuccessSetDeserializer;
impl CancelSpotFleetRequestsSuccessSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<CancelSpotFleetRequestsSuccessItem>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(CancelSpotFleetRequestsSuccessItemDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct CancelSpotInstanceRequestStateDeserializer;
impl CancelSpotInstanceRequestStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CancelSpotInstanceRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelSpotInstanceRequestsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more Spot instance request IDs.</p>"]
    pub spot_instance_request_ids: Vec<String>,
}


/// Serialize `CancelSpotInstanceRequestsRequest` contents to a `SignedRequest`.
struct CancelSpotInstanceRequestsRequestSerializer;
impl CancelSpotInstanceRequestsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CancelSpotInstanceRequestsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        SpotInstanceRequestIdListSerializer::serialize(params,
                                                       &format!("{}{}",
                                                               prefix,
                                                               "SpotInstanceRequestId"),
                                                       &obj.spot_instance_request_ids);

    }
}

#[doc="<p>Contains the output of CancelSpotInstanceRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelSpotInstanceRequestsResult {
    #[doc="<p>One or more Spot instance requests.</p>"]
    pub cancelled_spot_instance_requests: Option<Vec<CancelledSpotInstanceRequest>>,
}

struct CancelSpotInstanceRequestsResultDeserializer;
impl CancelSpotInstanceRequestsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CancelSpotInstanceRequestsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelSpotInstanceRequestsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "spotInstanceRequestSet" => {
                            obj.cancelled_spot_instance_requests = Some(try!(CancelledSpotInstanceRequestListDeserializer::deserialize("spotInstanceRequestSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a request to cancel a Spot instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CancelledSpotInstanceRequest {
    #[doc="<p>The ID of the Spot instance request.</p>"]
    pub spot_instance_request_id: Option<String>,
    #[doc="<p>The state of the Spot instance request.</p>"]
    pub state: Option<String>,
}

struct CancelledSpotInstanceRequestDeserializer;
impl CancelledSpotInstanceRequestDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CancelledSpotInstanceRequest, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CancelledSpotInstanceRequest::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "spotInstanceRequestId" => {
                            obj.spot_instance_request_id =
                                Some(try!(StringDeserializer::deserialize("spotInstanceRequestId",
                                                                          stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(CancelSpotInstanceRequestStateDeserializer::deserialize("state", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct CancelledSpotInstanceRequestListDeserializer;
impl CancelledSpotInstanceRequestListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<CancelledSpotInstanceRequest>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(CancelledSpotInstanceRequestDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the ClassicLink DNS support status of a VPC.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ClassicLinkDnsSupport {
    #[doc="<p>Indicates whether ClassicLink DNS support is enabled for the VPC.</p>"]
    pub classic_link_dns_supported: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct ClassicLinkDnsSupportDeserializer;
impl ClassicLinkDnsSupportDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ClassicLinkDnsSupport, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ClassicLinkDnsSupport::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "classicLinkDnsSupported" => {
                            obj.classic_link_dns_supported =
                                Some(try!(BooleanDeserializer::deserialize("classicLinkDnsSupported",
                                                                           stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ClassicLinkDnsSupportListDeserializer;
impl ClassicLinkDnsSupportListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ClassicLinkDnsSupport>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ClassicLinkDnsSupportDeserializer::deserialize("item",
                                                                                     stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a linked EC2-Classic instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ClassicLinkInstance {
    #[doc="<p>A list of security groups.</p>"]
    pub groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>Any tags assigned to the instance.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct ClassicLinkInstanceDeserializer;
impl ClassicLinkInstanceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ClassicLinkInstance, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ClassicLinkInstance::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupSet" => {
                            obj.groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ClassicLinkInstanceListDeserializer;
impl ClassicLinkInstanceListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ClassicLinkInstance>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ClassicLinkInstanceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the client-specific data.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ClientData {
    #[doc="<p>A user-defined comment about the disk upload.</p>"]
    pub comment: Option<String>,
    #[doc="<p>The time that the disk upload ends.</p>"]
    pub upload_end: Option<String>,
    #[doc="<p>The size of the uploaded disk image, in GiB.</p>"]
    pub upload_size: Option<f64>,
    #[doc="<p>The time that the disk upload starts.</p>"]
    pub upload_start: Option<String>,
}


/// Serialize `ClientData` contents to a `SignedRequest`.
struct ClientDataSerializer;
impl ClientDataSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ClientData) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.comment {
            params.put(&format!("{}{}", prefix, "Comment"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.upload_end {
            params.put(&format!("{}{}", prefix, "UploadEnd"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.upload_size {
            params.put(&format!("{}{}", prefix, "UploadSize"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.upload_start {
            params.put(&format!("{}{}", prefix, "UploadStart"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for ConfirmProductInstance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ConfirmProductInstanceRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
    #[doc="<p>The product code. This must be a product code that you own.</p>"]
    pub product_code: String,
}


/// Serialize `ConfirmProductInstanceRequest` contents to a `SignedRequest`.
struct ConfirmProductInstanceRequestSerializer;
impl ConfirmProductInstanceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ConfirmProductInstanceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "ProductCode"),
                   &obj.product_code.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of ConfirmProductInstance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ConfirmProductInstanceResult {
    #[doc="<p>The AWS account ID of the instance owner. This is only present if the product code is attached to the instance.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>The return value of the request. Returns <code>true</code> if the specified product code is owned by the requester and associated with the specified instance.</p>"]
    pub return_: Option<bool>,
}

struct ConfirmProductInstanceResultDeserializer;
impl ConfirmProductInstanceResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ConfirmProductInstanceResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ConfirmProductInstanceResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ContainerFormatDeserializer;
impl ContainerFormatDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ConversionIdStringList` contents to a `SignedRequest`.
struct ConversionIdStringListSerializer;
impl ConversionIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes a conversion task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ConversionTask {
    #[doc="<p>The ID of the conversion task.</p>"]
    pub conversion_task_id: String,
    #[doc="<p>The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.</p>"]
    pub expiration_time: Option<String>,
    #[doc="<p>If the task is for importing an instance, this contains information about the import instance task.</p>"]
    pub import_instance: Option<ImportInstanceTaskDetails>,
    #[doc="<p>If the task is for importing a volume, this contains information about the import volume task.</p>"]
    pub import_volume: Option<ImportVolumeTaskDetails>,
    #[doc="<p>The state of the conversion task.</p>"]
    pub state: String,
    #[doc="<p>The status message related to the conversion task.</p>"]
    pub status_message: Option<String>,
    #[doc="<p>Any tags assigned to the task.</p>"]
    pub tags: Option<Vec<Tag>>,
}

struct ConversionTaskDeserializer;
impl ConversionTaskDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ConversionTask, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ConversionTask::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "conversionTaskId" => {
                            obj.conversion_task_id = try!(StringDeserializer::deserialize("conversionTaskId",
                                                                                          stack));
                        }
                        "expirationTime" => {
                            obj.expiration_time =
                                Some(try!(StringDeserializer::deserialize("expirationTime",
                                                                          stack)));
                        }
                        "importInstance" => {
                            obj.import_instance = Some(try!(ImportInstanceTaskDetailsDeserializer::deserialize("importInstance", stack)));
                        }
                        "importVolume" => {
                            obj.import_volume =
                                Some(try!(ImportVolumeTaskDetailsDeserializer::deserialize("importVolume",
                                                                                           stack)));
                        }
                        "state" => {
                            obj.state = try!(ConversionTaskStateDeserializer::deserialize("state",
                                                                                          stack));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ConversionTaskStateDeserializer;
impl ConversionTaskStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CopyImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CopyImageRequest {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>A description for the new AMI in the destination region.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Specifies whether the destination snapshots of the copied image should be encrypted. The default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with <code>KmsKeyId</code>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub encrypted: Option<bool>,
    #[doc="<p>The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when encrypting the snapshots of an image during a copy operation. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the <code>arn:aws:kms</code> namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the <code>key</code> namespace, and then the CMK ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>. The specified CMK must exist in the region that the snapshot is being copied to. If a <code>KmsKeyId</code> is specified, the <code>Encrypted</code> flag must also be set.</p>"]
    pub kms_key_id: Option<String>,
    #[doc="<p>The name of the new AMI in the destination region.</p>"]
    pub name: String,
    #[doc="<p>The ID of the AMI to copy.</p>"]
    pub source_image_id: String,
    #[doc="<p>The name of the region that contains the AMI to copy.</p>"]
    pub source_region: String,
}


/// Serialize `CopyImageRequest` contents to a `SignedRequest`.
struct CopyImageRequestSerializer;
impl CopyImageRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CopyImageRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.encrypted {
            params.put(&format!("{}{}", prefix, "Encrypted"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.kms_key_id {
            params.put(&format!("{}{}", prefix, "KmsKeyId"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "Name"),
                   &obj.name.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "SourceImageId"),
                   &obj.source_image_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "SourceRegion"),
                   &obj.source_region.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CopyImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CopyImageResult {
    #[doc="<p>The ID of the new AMI.</p>"]
    pub image_id: Option<String>,
}

struct CopyImageResultDeserializer;
impl CopyImageResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CopyImageResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CopyImageResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CopySnapshot.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CopySnapshotRequest {
    #[doc="<p>A description for the EBS snapshot.</p>"]
    pub description: Option<String>,
    #[doc="<p>The destination region to use in the <code>PresignedUrl</code> parameter of a snapshot copy operation. This parameter is only valid for specifying the destination region in a <code>PresignedUrl</code> parameter, where it is required.</p> <note> <p> <code>CopySnapshot</code> sends the snapshot copy to the regional endpoint that you send the HTTP request to, such as <code>ec2.us-east-1.amazonaws.com</code> (in the AWS CLI, this is specified with the <code>--region</code> parameter or the default region in your AWS configuration file).</p> </note>"]
    pub destination_region: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Specifies whether the destination snapshot should be encrypted. You can encrypt a copy of an unencrypted snapshot using this flag, but you cannot use it to create an unencrypted copy from an encrypted snapshot. Your default CMK for EBS is used unless a non-default AWS Key Management Service (AWS KMS) CMK is specified with <code>KmsKeyId</code>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub encrypted: Option<bool>,
    #[doc="<p>The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when creating the snapshot copy. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the <code>arn:aws:kms</code> namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the <code>key</code> namespace, and then the CMK ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>. The specified CMK must exist in the region that the snapshot is being copied to. If a <code>KmsKeyId</code> is specified, the <code>Encrypted</code> flag must also be set.</p>"]
    pub kms_key_id: Option<String>,
    #[doc="<p>The pre-signed URL that facilitates copying an encrypted snapshot. This parameter is only required when copying an encrypted snapshot with the Amazon EC2 Query API; it is available as an optional parameter in all other cases. The <code>PresignedUrl</code> should use the snapshot source endpoint, the <code>CopySnapshot</code> action, and include the <code>SourceRegion</code>, <code>SourceSnapshotId</code>, and <code>DestinationRegion</code> parameters. The <code>PresignedUrl</code> must be signed using AWS Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in <a href=\"http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html\">Authenticating Requests by Using Query Parameters (AWS Signature Version 4)</a> in the <i>Amazon Simple Storage Service API Reference</i>. An invalid or improperly signed <code>PresignedUrl</code> will cause the copy operation to fail asynchronously, and the snapshot will move to an <code>error</code> state.</p>"]
    pub presigned_url: Option<String>,
    #[doc="<p>The ID of the region that contains the snapshot to be copied.</p>"]
    pub source_region: String,
    #[doc="<p>The ID of the EBS snapshot to copy.</p>"]
    pub source_snapshot_id: String,
}


/// Serialize `CopySnapshotRequest` contents to a `SignedRequest`.
struct CopySnapshotRequestSerializer;
impl CopySnapshotRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CopySnapshotRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.destination_region {
            params.put(&format!("{}{}", prefix, "DestinationRegion"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.encrypted {
            params.put(&format!("{}{}", prefix, "Encrypted"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.kms_key_id {
            params.put(&format!("{}{}", prefix, "KmsKeyId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.presigned_url {
            params.put(&format!("{}{}", prefix, "PresignedUrl"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SourceRegion"),
                   &obj.source_region.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "SourceSnapshotId"),
                   &obj.source_snapshot_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CopySnapshot.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CopySnapshotResult {
    #[doc="<p>The ID of the new snapshot.</p>"]
    pub snapshot_id: Option<String>,
}

struct CopySnapshotResultDeserializer;
impl CopySnapshotResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CopySnapshotResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CopySnapshotResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "snapshotId" => {
                            obj.snapshot_id = Some(try!(StringDeserializer::deserialize("snapshotId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateCustomerGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateCustomerGatewayRequest {
    #[doc="<p>For devices that support BGP, the customer gateway's BGP ASN.</p> <p>Default: 65000</p>"]
    pub bgp_asn: i64,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The Internet-routable IP address for the customer gateway's outside interface. The address must be static.</p>"]
    pub public_ip: String,
    #[doc="<p>The type of VPN connection that this customer gateway supports (<code>ipsec.1</code>).</p>"]
    pub type_: String,
}


/// Serialize `CreateCustomerGatewayRequest` contents to a `SignedRequest`.
struct CreateCustomerGatewayRequestSerializer;
impl CreateCustomerGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateCustomerGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "BgpAsn"),
                   &obj.bgp_asn.to_string().replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "IpAddress"),
                   &obj.public_ip.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "Type"),
                   &obj.type_.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateCustomerGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateCustomerGatewayResult {
    #[doc="<p>Information about the customer gateway.</p>"]
    pub customer_gateway: Option<CustomerGateway>,
}

struct CreateCustomerGatewayResultDeserializer;
impl CreateCustomerGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateCustomerGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateCustomerGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "customerGateway" => {
                            obj.customer_gateway =
                                Some(try!(CustomerGatewayDeserializer::deserialize("customerGateway",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateDefaultVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateDefaultVpcRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `CreateDefaultVpcRequest` contents to a `SignedRequest`.
struct CreateDefaultVpcRequestSerializer;
impl CreateDefaultVpcRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateDefaultVpcRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateDefaultVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateDefaultVpcResult {
    #[doc="<p>Information about the VPC.</p>"]
    pub vpc: Option<Vpc>,
}

struct CreateDefaultVpcResultDeserializer;
impl CreateDefaultVpcResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateDefaultVpcResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateDefaultVpcResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpc" => {
                            obj.vpc = Some(try!(VpcDeserializer::deserialize("vpc", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateDhcpOptions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateDhcpOptionsRequest {
    #[doc="<p>A DHCP configuration option.</p>"]
    pub dhcp_configurations: Vec<NewDhcpConfiguration>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `CreateDhcpOptionsRequest` contents to a `SignedRequest`.
struct CreateDhcpOptionsRequestSerializer;
impl CreateDhcpOptionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateDhcpOptionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        NewDhcpConfigurationListSerializer::serialize(params,
                                                      &format!("{}{}",
                                                              prefix,
                                                              "DhcpConfiguration"),
                                                      &obj.dhcp_configurations);
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateDhcpOptions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateDhcpOptionsResult {
    #[doc="<p>A set of DHCP options.</p>"]
    pub dhcp_options: Option<DhcpOptions>,
}

struct CreateDhcpOptionsResultDeserializer;
impl CreateDhcpOptionsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateDhcpOptionsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateDhcpOptionsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "dhcpOptions" => {
                            obj.dhcp_options =
                                Some(try!(DhcpOptionsDeserializer::deserialize("dhcpOptions",
                                                                               stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct CreateEgressOnlyInternetGatewayRequest {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC for which to create the egress-only Internet gateway.</p>"]
    pub vpc_id: String,
}


/// Serialize `CreateEgressOnlyInternetGatewayRequest` contents to a `SignedRequest`.
struct CreateEgressOnlyInternetGatewayRequestSerializer;
impl CreateEgressOnlyInternetGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateEgressOnlyInternetGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct CreateEgressOnlyInternetGatewayResult {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Information about the egress-only Internet gateway.</p>"]
    pub egress_only_internet_gateway: Option<EgressOnlyInternetGateway>,
}

struct CreateEgressOnlyInternetGatewayResultDeserializer;
impl CreateEgressOnlyInternetGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CreateEgressOnlyInternetGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateEgressOnlyInternetGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "egressOnlyInternetGateway" => {
                            obj.egress_only_internet_gateway = Some(try!(EgressOnlyInternetGatewayDeserializer::deserialize("egressOnlyInternetGateway", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateFlowLogs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateFlowLogsRequest {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs log group.</p>"]
    pub deliver_logs_permission_arn: String,
    #[doc="<p>The name of the CloudWatch log group.</p>"]
    pub log_group_name: String,
    #[doc="<p>One or more subnet, network interface, or VPC IDs.</p> <p>Constraints: Maximum of 1000 resources</p>"]
    pub resource_ids: Vec<String>,
    #[doc="<p>The type of resource on which to create the flow log.</p>"]
    pub resource_type: String,
    #[doc="<p>The type of traffic to log.</p>"]
    pub traffic_type: String,
}


/// Serialize `CreateFlowLogsRequest` contents to a `SignedRequest`.
struct CreateFlowLogsRequestSerializer;
impl CreateFlowLogsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateFlowLogsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "DeliverLogsPermissionArn"),
                   &obj.deliver_logs_permission_arn.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "LogGroupName"),
                   &obj.log_group_name.replace("+", "%2B"));
        ValueStringListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "ResourceId"),
                                             &obj.resource_ids);
        params.put(&format!("{}{}", prefix, "ResourceType"),
                   &obj.resource_type.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "TrafficType"),
                   &obj.traffic_type.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateFlowLogs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateFlowLogsResult {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The IDs of the flow logs.</p>"]
    pub flow_log_ids: Option<Vec<String>>,
    #[doc="<p>Information about the flow logs that could not be created successfully.</p>"]
    pub unsuccessful: Option<Vec<UnsuccessfulItem>>,
}

struct CreateFlowLogsResultDeserializer;
impl CreateFlowLogsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateFlowLogsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateFlowLogsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "flowLogIdSet" => {
                            obj.flow_log_ids =
                                Some(try!(ValueStringListDeserializer::deserialize("flowLogIdSet",
                                                                                   stack)));
                        }
                        "unsuccessful" => {
                            obj.unsuccessful =
                                Some(try!(UnsuccessfulItemSetDeserializer::deserialize("unsuccessful",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct CreateFpgaImageRequest {
    #[doc="<p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>A description for the AFI.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.</p>"]
    pub input_storage_location: StorageLocation,
    #[doc="<p>The location in Amazon S3 for the output logs.</p>"]
    pub logs_storage_location: Option<StorageLocation>,
    #[doc="<p>A name for the AFI.</p>"]
    pub name: Option<String>,
}


/// Serialize `CreateFpgaImageRequest` contents to a `SignedRequest`.
struct CreateFpgaImageRequestSerializer;
impl CreateFpgaImageRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateFpgaImageRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        StorageLocationSerializer::serialize(params,
                                             &format!("{}{}", prefix, "InputStorageLocation"),
                                             &obj.input_storage_location);
        if let Some(ref field_value) = obj.logs_storage_location {
            StorageLocationSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "LogsStorageLocation"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.name {
            params.put(&format!("{}{}", prefix, "Name"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct CreateFpgaImageResult {
    #[doc="<p>The global FPGA image identifier (AGFI ID).</p>"]
    pub fpga_image_global_id: Option<String>,
    #[doc="<p>The FPGA image identifier (AFI ID).</p>"]
    pub fpga_image_id: Option<String>,
}

struct CreateFpgaImageResultDeserializer;
impl CreateFpgaImageResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateFpgaImageResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateFpgaImageResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "fpgaImageGlobalId" => {
                            obj.fpga_image_global_id =
                                Some(try!(StringDeserializer::deserialize("fpgaImageGlobalId",
                                                                          stack)));
                        }
                        "fpgaImageId" => {
                            obj.fpga_image_id = Some(try!(StringDeserializer::deserialize("fpgaImageId",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateImageRequest {
    #[doc="<p>Information about one or more block device mappings.</p>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>A description for the new image.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
    #[doc="<p>A name for the new image.</p> <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>"]
    pub name: String,
    #[doc="<p>By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.</p>"]
    pub no_reboot: Option<bool>,
}


/// Serialize `CreateImageRequest` contents to a `SignedRequest`.
struct CreateImageRequestSerializer;
impl CreateImageRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateImageRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.block_device_mappings {
            BlockDeviceMappingRequestListSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "BlockDeviceMapping"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "Name"),
                   &obj.name.replace("+", "%2B"));
        if let Some(ref field_value) = obj.no_reboot {
            params.put(&format!("{}{}", prefix, "NoReboot"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateImageResult {
    #[doc="<p>The ID of the new AMI.</p>"]
    pub image_id: Option<String>,
}

struct CreateImageResultDeserializer;
impl CreateImageResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateImageResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateImageResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateInstanceExportTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateInstanceExportTaskRequest {
    #[doc="<p>A description for the conversion task or the resource being exported. The maximum length is 255 bytes.</p>"]
    pub description: Option<String>,
    #[doc="<p>The format and location for an instance export task.</p>"]
    pub export_to_s3_task: Option<ExportToS3TaskSpecification>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
    #[doc="<p>The target virtualization environment.</p>"]
    pub target_environment: Option<String>,
}


/// Serialize `CreateInstanceExportTaskRequest` contents to a `SignedRequest`.
struct CreateInstanceExportTaskRequestSerializer;
impl CreateInstanceExportTaskRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateInstanceExportTaskRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.export_to_s3_task {
            ExportToS3TaskSpecificationSerializer::serialize(params,
                                                             &format!("{}{}",
                                                                     prefix,
                                                                     "ExportToS3"),
                                                             field_value);
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.target_environment {
            params.put(&format!("{}{}", prefix, "TargetEnvironment"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for CreateInstanceExportTask.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateInstanceExportTaskResult {
    #[doc="<p>Information about the instance export task.</p>"]
    pub export_task: Option<ExportTask>,
}

struct CreateInstanceExportTaskResultDeserializer;
impl CreateInstanceExportTaskResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateInstanceExportTaskResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateInstanceExportTaskResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "exportTask" => {
                            obj.export_task =
                                Some(try!(ExportTaskDeserializer::deserialize("exportTask",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateInternetGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateInternetGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `CreateInternetGatewayRequest` contents to a `SignedRequest`.
struct CreateInternetGatewayRequestSerializer;
impl CreateInternetGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateInternetGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateInternetGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateInternetGatewayResult {
    #[doc="<p>Information about the Internet gateway.</p>"]
    pub internet_gateway: Option<InternetGateway>,
}

struct CreateInternetGatewayResultDeserializer;
impl CreateInternetGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateInternetGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateInternetGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "internetGateway" => {
                            obj.internet_gateway =
                                Some(try!(InternetGatewayDeserializer::deserialize("internetGateway",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateKeyPair.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateKeyPairRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>A unique name for the key pair.</p> <p>Constraints: Up to 255 ASCII characters</p>"]
    pub key_name: String,
}


/// Serialize `CreateKeyPairRequest` contents to a `SignedRequest`.
struct CreateKeyPairRequestSerializer;
impl CreateKeyPairRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateKeyPairRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "KeyName"),
                   &obj.key_name.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for CreateNatGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNatGatewayRequest {
    #[doc="<p>The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.</p>"]
    pub allocation_id: String,
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a>.</p> <p>Constraint: Maximum 64 ASCII characters.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The subnet in which to create the NAT gateway.</p>"]
    pub subnet_id: String,
}


/// Serialize `CreateNatGatewayRequest` contents to a `SignedRequest`.
struct CreateNatGatewayRequestSerializer;
impl CreateNatGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateNatGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AllocationId"),
                   &obj.allocation_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SubnetId"),
                   &obj.subnet_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateNatGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNatGatewayResult {
    #[doc="<p>Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Information about the NAT gateway.</p>"]
    pub nat_gateway: Option<NatGateway>,
}

struct CreateNatGatewayResultDeserializer;
impl CreateNatGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateNatGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateNatGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "natGateway" => {
                            obj.nat_gateway =
                                Some(try!(NatGatewayDeserializer::deserialize("natGateway",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateNetworkAclEntry.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNetworkAclEntryRequest {
    #[doc="<p>The IPv4 network range to allow or deny, in CIDR notation (for example <code>172.16.0.0/24</code>).</p>"]
    pub cidr_block: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).</p>"]
    pub egress: bool,
    #[doc="<p>ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.</p>"]
    pub icmp_type_code: Option<IcmpTypeCode>,
    #[doc="<p>The IPv6 network range to allow or deny, in CIDR notation (for example <code>2001:db8:1234:1a00::/64</code>).</p>"]
    pub ipv_6_cidr_block: Option<String>,
    #[doc="<p>The ID of the network ACL.</p>"]
    pub network_acl_id: String,
    #[doc="<p>TCP or UDP protocols: The range of ports the rule applies to.</p>"]
    pub port_range: Option<PortRange>,
    #[doc="<p>The protocol. A value of <code>-1</code> or <code>all</code> means all protocols. If you specify <code>all</code>, <code>-1</code>, or a protocol number other than <code>tcp</code>, <code>udp</code>, or <code>icmp</code>, traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol <code>58</code> (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol <code>58</code> (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.</p>"]
    pub protocol: String,
    #[doc="<p>Indicates whether to allow or deny the traffic that matches the rule.</p>"]
    pub rule_action: String,
    #[doc="<p>The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.</p> <p>Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.</p>"]
    pub rule_number: i64,
}


/// Serialize `CreateNetworkAclEntryRequest` contents to a `SignedRequest`.
struct CreateNetworkAclEntryRequestSerializer;
impl CreateNetworkAclEntryRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateNetworkAclEntryRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_block {
            params.put(&format!("{}{}", prefix, "CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "Egress"),
                   &obj.egress.to_string().replace("+", "%2B"));
        if let Some(ref field_value) = obj.icmp_type_code {
            IcmpTypeCodeSerializer::serialize(params,
                                              &format!("{}{}", prefix, "Icmp"),
                                              field_value);
        }
        if let Some(ref field_value) = obj.ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "Ipv6CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkAclId"),
                   &obj.network_acl_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.port_range {
            PortRangeSerializer::serialize(params,
                                           &format!("{}{}", prefix, "PortRange"),
                                           field_value);
        }
        params.put(&format!("{}{}", prefix, "Protocol"),
                   &obj.protocol.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "RuleAction"),
                   &obj.rule_action.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "RuleNumber"),
                   &obj.rule_number.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for CreateNetworkAcl.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNetworkAclRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `CreateNetworkAclRequest` contents to a `SignedRequest`.
struct CreateNetworkAclRequestSerializer;
impl CreateNetworkAclRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateNetworkAclRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateNetworkAcl.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNetworkAclResult {
    #[doc="<p>Information about the network ACL.</p>"]
    pub network_acl: Option<NetworkAcl>,
}

struct CreateNetworkAclResultDeserializer;
impl CreateNetworkAclResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateNetworkAclResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateNetworkAclResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "networkAcl" => {
                            obj.network_acl =
                                Some(try!(NetworkAclDeserializer::deserialize("networkAcl",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateNetworkInterfacePermission.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNetworkInterfacePermissionRequest {
    #[doc="<p>The AWS account ID.</p>"]
    pub aws_account_id: Option<String>,
    #[doc="<p>The AWS service. Currently not supported.</p>"]
    pub aws_service: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
    #[doc="<p>The type of permission to grant.</p>"]
    pub permission: String,
}


/// Serialize `CreateNetworkInterfacePermissionRequest` contents to a `SignedRequest`.
struct CreateNetworkInterfacePermissionRequestSerializer;
impl CreateNetworkInterfacePermissionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateNetworkInterfacePermissionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.aws_account_id {
            params.put(&format!("{}{}", prefix, "AwsAccountId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.aws_service {
            params.put(&format!("{}{}", prefix, "AwsService"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "Permission"),
                   &obj.permission.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateNetworkInterfacePermission.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNetworkInterfacePermissionResult {
    #[doc="<p>Information about the permission for the network interface.</p>"]
    pub interface_permission: Option<NetworkInterfacePermission>,
}

struct CreateNetworkInterfacePermissionResultDeserializer;
impl CreateNetworkInterfacePermissionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CreateNetworkInterfacePermissionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateNetworkInterfacePermissionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "interfacePermission" => {
                            obj.interface_permission = Some(try!(NetworkInterfacePermissionDeserializer::deserialize("interfacePermission", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateNetworkInterface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNetworkInterfaceRequest {
    #[doc="<p>A description for the network interface.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The IDs of one or more security groups.</p>"]
    pub groups: Option<Vec<String>>,
    #[doc="<p>The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the <code>AssignIpv6AddressOnCreation</code> attribute set to <code>true</code>, you can specify <code>0</code> to override this setting.</p>"]
    pub ipv_6_address_count: Option<i64>,
    #[doc="<p>One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.</p>"]
    pub ipv_6_addresses: Option<Vec<InstanceIpv6Address>>,
    #[doc="<p>The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in <code>privateIpAddresses</code> as primary (only one IP address can be designated as primary).</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>One or more private IPv4 addresses.</p>"]
    pub private_ip_addresses: Option<Vec<PrivateIpAddressSpecification>>,
    #[doc="<p>The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using <code>privateIpAddresses</code>.</p> <p>The number of IP addresses you can assign to a network interface varies by instance type. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI\">IP Addresses Per ENI Per Instance Type</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    pub secondary_private_ip_address_count: Option<i64>,
    #[doc="<p>The ID of the subnet to associate with the network interface.</p>"]
    pub subnet_id: String,
}


/// Serialize `CreateNetworkInterfaceRequest` contents to a `SignedRequest`.
struct CreateNetworkInterfaceRequestSerializer;
impl CreateNetworkInterfaceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateNetworkInterfaceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.groups {
            SecurityGroupIdStringListSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "SecurityGroupId"),
                                                           field_value);
        }
        if let Some(ref field_value) = obj.ipv_6_address_count {
            params.put(&format!("{}{}", prefix, "Ipv6AddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ipv_6_addresses {
            InstanceIpv6AddressListSerializer::serialize(params,
                                                         &format!("{}{}", prefix, "Ipv6Addresses"),
                                                         field_value);
        }
        if let Some(ref field_value) = obj.private_ip_address {
            params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.private_ip_addresses {
            PrivateIpAddressSpecificationListSerializer::serialize(params,
                                                                   &format!("{}{}",
                                                                           prefix,
                                                                           "PrivateIpAddresses"),
                                                                   field_value);
        }
        if let Some(ref field_value) = obj.secondary_private_ip_address_count {
            params.put(&format!("{}{}", prefix, "SecondaryPrivateIpAddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SubnetId"),
                   &obj.subnet_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateNetworkInterface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateNetworkInterfaceResult {
    #[doc="<p>Information about the network interface.</p>"]
    pub network_interface: Option<NetworkInterface>,
}

struct CreateNetworkInterfaceResultDeserializer;
impl CreateNetworkInterfaceResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateNetworkInterfaceResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateNetworkInterfaceResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "networkInterface" => {
                            obj.network_interface =
                                Some(try!(NetworkInterfaceDeserializer::deserialize("networkInterface",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreatePlacementGroup.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreatePlacementGroupRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>A name for the placement group.</p> <p>Constraints: Up to 255 ASCII characters</p>"]
    pub group_name: String,
    #[doc="<p>The placement strategy.</p>"]
    pub strategy: String,
}


/// Serialize `CreatePlacementGroupRequest` contents to a `SignedRequest`.
struct CreatePlacementGroupRequestSerializer;
impl CreatePlacementGroupRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreatePlacementGroupRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "GroupName"),
                   &obj.group_name.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "Strategy"),
                   &obj.strategy.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for CreateReservedInstancesListing.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateReservedInstancesListingRequest {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: String,
    #[doc="<p>The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.</p>"]
    pub instance_count: i64,
    #[doc="<p>A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.</p>"]
    pub price_schedules: Vec<PriceScheduleSpecification>,
    #[doc="<p>The ID of the active Standard Reserved Instance.</p>"]
    pub reserved_instances_id: String,
}


/// Serialize `CreateReservedInstancesListingRequest` contents to a `SignedRequest`.
struct CreateReservedInstancesListingRequestSerializer;
impl CreateReservedInstancesListingRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateReservedInstancesListingRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "ClientToken"),
                   &obj.client_token.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "InstanceCount"),
                   &obj.instance_count.to_string().replace("+", "%2B"));
        PriceScheduleSpecificationListSerializer::serialize(params,
                                                            &format!("{}{}",
                                                                    prefix,
                                                                    "PriceSchedules"),
                                                            &obj.price_schedules);
        params.put(&format!("{}{}", prefix, "ReservedInstancesId"),
                   &obj.reserved_instances_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateReservedInstancesListing.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateReservedInstancesListingResult {
    #[doc="<p>Information about the Standard Reserved Instance listing.</p>"]
    pub reserved_instances_listings: Option<Vec<ReservedInstancesListing>>,
}

struct CreateReservedInstancesListingResultDeserializer;
impl CreateReservedInstancesListingResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CreateReservedInstancesListingResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateReservedInstancesListingResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesListingsSet" => {
                            obj.reserved_instances_listings = Some(try!(ReservedInstancesListingListDeserializer::deserialize("reservedInstancesListingsSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateRoute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateRouteRequest {
    #[doc="<p>The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match.</p>"]
    pub destination_cidr_block: Option<String>,
    #[doc="<p>The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.</p>"]
    pub destination_ipv_6_cidr_block: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>[IPv6 traffic only] The ID of an egress-only Internet gateway.</p>"]
    pub egress_only_internet_gateway_id: Option<String>,
    #[doc="<p>The ID of an Internet gateway or virtual private gateway attached to your VPC.</p>"]
    pub gateway_id: Option<String>,
    #[doc="<p>The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>[IPv4 traffic only] The ID of a NAT gateway.</p>"]
    pub nat_gateway_id: Option<String>,
    #[doc="<p>The ID of a network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The ID of the route table for the route.</p>"]
    pub route_table_id: String,
    #[doc="<p>The ID of a VPC peering connection.</p>"]
    pub vpc_peering_connection_id: Option<String>,
}


/// Serialize `CreateRouteRequest` contents to a `SignedRequest`.
struct CreateRouteRequestSerializer;
impl CreateRouteRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateRouteRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.destination_cidr_block {
            params.put(&format!("{}{}", prefix, "DestinationCidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.destination_ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "DestinationIpv6CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.egress_only_internet_gateway_id {
            params.put(&format!("{}{}", prefix, "EgressOnlyInternetGatewayId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.gateway_id {
            params.put(&format!("{}{}", prefix, "GatewayId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_id {
            params.put(&format!("{}{}", prefix, "InstanceId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.nat_gateway_id {
            params.put(&format!("{}{}", prefix, "NatGatewayId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.network_interface_id {
            params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.vpc_peering_connection_id {
            params.put(&format!("{}{}", prefix, "VpcPeeringConnectionId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateRoute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateRouteResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct CreateRouteResultDeserializer;
impl CreateRouteResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateRouteResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateRouteResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateRouteTable.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateRouteTableRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `CreateRouteTableRequest` contents to a `SignedRequest`.
struct CreateRouteTableRequestSerializer;
impl CreateRouteTableRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateRouteTableRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateRouteTable.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateRouteTableResult {
    #[doc="<p>Information about the route table.</p>"]
    pub route_table: Option<RouteTable>,
}

struct CreateRouteTableResultDeserializer;
impl CreateRouteTableResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateRouteTableResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateRouteTableResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "routeTable" => {
                            obj.route_table =
                                Some(try!(RouteTableDeserializer::deserialize("routeTable",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateSecurityGroup.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateSecurityGroupRequest {
    #[doc="<p>A description for the security group. This is informational only.</p> <p>Constraints: Up to 255 characters in length</p> <p>Constraints for EC2-Classic: ASCII characters</p> <p>Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>"]
    pub description: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The name of the security group.</p> <p>Constraints: Up to 255 characters in length</p> <p>Constraints for EC2-Classic: ASCII characters</p> <p>Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&amp;;{}!$*</p>"]
    pub group_name: String,
    #[doc="<p>[EC2-VPC] The ID of the VPC. Required for EC2-VPC.</p>"]
    pub vpc_id: Option<String>,
}


/// Serialize `CreateSecurityGroupRequest` contents to a `SignedRequest`.
struct CreateSecurityGroupRequestSerializer;
impl CreateSecurityGroupRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateSecurityGroupRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "GroupDescription"),
                   &obj.description.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "GroupName"),
                   &obj.group_name.replace("+", "%2B"));
        if let Some(ref field_value) = obj.vpc_id {
            params.put(&format!("{}{}", prefix, "VpcId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateSecurityGroup.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateSecurityGroupResult {
    #[doc="<p>The ID of the security group.</p>"]
    pub group_id: Option<String>,
}

struct CreateSecurityGroupResultDeserializer;
impl CreateSecurityGroupResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateSecurityGroupResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateSecurityGroupResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupId" => {
                            obj.group_id = Some(try!(StringDeserializer::deserialize("groupId",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateSnapshot.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateSnapshotRequest {
    #[doc="<p>A description for the snapshot.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the EBS volume.</p>"]
    pub volume_id: String,
}


/// Serialize `CreateSnapshotRequest` contents to a `SignedRequest`.
struct CreateSnapshotRequestSerializer;
impl CreateSnapshotRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateSnapshotRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for CreateSpotDatafeedSubscription.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateSpotDatafeedSubscriptionRequest {
    #[doc="<p>The Amazon S3 bucket in which to store the Spot instance data feed.</p>"]
    pub bucket: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>A prefix for the data feed file names.</p>"]
    pub prefix: Option<String>,
}


/// Serialize `CreateSpotDatafeedSubscriptionRequest` contents to a `SignedRequest`.
struct CreateSpotDatafeedSubscriptionRequestSerializer;
impl CreateSpotDatafeedSubscriptionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateSpotDatafeedSubscriptionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Bucket"),
                   &obj.bucket.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.prefix {
            params.put(&format!("{}{}", prefix, "Prefix"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateSpotDatafeedSubscription.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateSpotDatafeedSubscriptionResult {
    #[doc="<p>The Spot instance data feed subscription.</p>"]
    pub spot_datafeed_subscription: Option<SpotDatafeedSubscription>,
}

struct CreateSpotDatafeedSubscriptionResultDeserializer;
impl CreateSpotDatafeedSubscriptionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CreateSpotDatafeedSubscriptionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateSpotDatafeedSubscriptionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "spotDatafeedSubscription" => {
                            obj.spot_datafeed_subscription = Some(try!(SpotDatafeedSubscriptionDeserializer::deserialize("spotDatafeedSubscription", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateSubnet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateSubnetRequest {
    #[doc="<p>The Availability Zone for the subnet.</p> <p>Default: AWS selects one for you. If you create more than one subnet in your VPC, we may not necessarily select a different zone for each subnet.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The IPv4 network range for the subnet, in CIDR notation. For example, <code>10.0.0.0/24</code>.</p>"]
    pub cidr_block: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.</p>"]
    pub ipv_6_cidr_block: Option<String>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `CreateSubnetRequest` contents to a `SignedRequest`.
struct CreateSubnetRequestSerializer;
impl CreateSubnetRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateSubnetRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "CidrBlock"),
                   &obj.cidr_block.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "Ipv6CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateSubnet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateSubnetResult {
    #[doc="<p>Information about the subnet.</p>"]
    pub subnet: Option<Subnet>,
}

struct CreateSubnetResultDeserializer;
impl CreateSubnetResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateSubnetResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateSubnetResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "subnet" => {
                            obj.subnet = Some(try!(SubnetDeserializer::deserialize("subnet",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateTags.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateTagsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The IDs of one or more resources to tag. For example, ami-1a2b3c4d.</p>"]
    pub resources: Vec<String>,
    #[doc="<p>One or more tags. The <code>value</code> parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string. </p>"]
    pub tags: Vec<Tag>,
}


/// Serialize `CreateTagsRequest` contents to a `SignedRequest`.
struct CreateTagsRequestSerializer;
impl CreateTagsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateTagsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        ResourceIdListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "ResourceId"),
                                            &obj.resources);
        TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), &obj.tags);

    }
}

#[doc="<p>Describes the user or group to be added or removed from the permissions for a volume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVolumePermission {
    #[doc="<p>The specific group that is to be added or removed from a volume's list of create volume permissions.</p>"]
    pub group: Option<String>,
    #[doc="<p>The specific AWS account ID that is to be added or removed from a volume's list of create volume permissions.</p>"]
    pub user_id: Option<String>,
}

struct CreateVolumePermissionDeserializer;
impl CreateVolumePermissionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateVolumePermission, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateVolumePermission::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "group" => {
                            obj.group = Some(try!(PermissionGroupDeserializer::deserialize("group",
                                                                                           stack)));
                        }
                        "userId" => {
                            obj.user_id = Some(try!(StringDeserializer::deserialize("userId",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `CreateVolumePermission` contents to a `SignedRequest`.
struct CreateVolumePermissionSerializer;
impl CreateVolumePermissionSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVolumePermission) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.group {
            params.put(&format!("{}{}", prefix, "Group"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_id {
            params.put(&format!("{}{}", prefix, "UserId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct CreateVolumePermissionListDeserializer;
impl CreateVolumePermissionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<CreateVolumePermission>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(CreateVolumePermissionDeserializer::deserialize("item",
                                                                                      stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `CreateVolumePermissionList` contents to a `SignedRequest`.
struct CreateVolumePermissionListSerializer;
impl CreateVolumePermissionListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<CreateVolumePermission>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            CreateVolumePermissionSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes modifications to the permissions for a volume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVolumePermissionModifications {
    #[doc="<p>Adds a specific AWS account ID or group to a volume's list of create volume permissions.</p>"]
    pub add: Option<Vec<CreateVolumePermission>>,
    #[doc="<p>Removes a specific AWS account ID or group from a volume's list of create volume permissions.</p>"]
    pub remove: Option<Vec<CreateVolumePermission>>,
}


/// Serialize `CreateVolumePermissionModifications` contents to a `SignedRequest`.
struct CreateVolumePermissionModificationsSerializer;
impl CreateVolumePermissionModificationsSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVolumePermissionModifications) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.add {
            CreateVolumePermissionListSerializer::serialize(params,
                                                            &format!("{}{}", prefix, "Add"),
                                                            field_value);
        }
        if let Some(ref field_value) = obj.remove {
            CreateVolumePermissionListSerializer::serialize(params,
                                                            &format!("{}{}", prefix, "Remove"),
                                                            field_value);
        }

    }
}

#[doc="<p>Contains the parameters for CreateVolume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVolumeRequest {
    #[doc="<p>The Availability Zone in which to create the volume. Use <a>DescribeAvailabilityZones</a> to list the Availability Zones that are currently available to you.</p>"]
    pub availability_zone: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub encrypted: Option<bool>,
    #[doc="<p>Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 50 IOPS/GiB.</p> <p>Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes </p>"]
    pub iops: Option<i64>,
    #[doc="<p>The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the <code>arn:aws:kms</code> namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the <code>key</code> namespace, and then the CMK ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>. If a <code>KmsKeyId</code> is specified, the <code>Encrypted</code> flag must also be set.</p>"]
    pub kms_key_id: Option<String>,
    #[doc="<p>The size of the volume, in GiBs.</p> <p>Constraints: 1-16384 for <code>gp2</code>, 4-16384 for <code>io1</code>, 500-16384 for <code>st1</code>, 500-16384 for <code>sc1</code>, and 1-1024 for <code>standard</code>. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.</p> <p>Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.</p>"]
    pub size: Option<i64>,
    #[doc="<p>The snapshot from which to create the volume.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>The tags to apply to the volume during creation.</p>"]
    pub tag_specifications: Option<Vec<TagSpecification>>,
    #[doc="<p>The volume type. This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p> <p>Default: <code>standard</code> </p>"]
    pub volume_type: Option<String>,
}


/// Serialize `CreateVolumeRequest` contents to a `SignedRequest`.
struct CreateVolumeRequestSerializer;
impl CreateVolumeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVolumeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                   &obj.availability_zone.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.encrypted {
            params.put(&format!("{}{}", prefix, "Encrypted"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.iops {
            params.put(&format!("{}{}", prefix, "Iops"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.kms_key_id {
            params.put(&format!("{}{}", prefix, "KmsKeyId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.size {
            params.put(&format!("{}{}", prefix, "Size"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.snapshot_id {
            params.put(&format!("{}{}", prefix, "SnapshotId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.tag_specifications {
            TagSpecificationListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "TagSpecification"),
                                                      field_value);
        }
        if let Some(ref field_value) = obj.volume_type {
            params.put(&format!("{}{}", prefix, "VolumeType"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for CreateVpcEndpoint.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpcEndpointRequest {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.</p>"]
    pub policy_document: Option<String>,
    #[doc="<p>One or more route table IDs.</p>"]
    pub route_table_ids: Option<Vec<String>>,
    #[doc="<p>The AWS service name, in the form <code>com.amazonaws.<i>region</i>.<i>service</i> </code>. To get a list of available services, use the <a>DescribeVpcEndpointServices</a> request.</p>"]
    pub service_name: String,
    #[doc="<p>The ID of the VPC in which the endpoint will be used.</p>"]
    pub vpc_id: String,
}


/// Serialize `CreateVpcEndpointRequest` contents to a `SignedRequest`.
struct CreateVpcEndpointRequestSerializer;
impl CreateVpcEndpointRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVpcEndpointRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.policy_document {
            params.put(&format!("{}{}", prefix, "PolicyDocument"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.route_table_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "RouteTableId"),
                                                 field_value);
        }
        params.put(&format!("{}{}", prefix, "ServiceName"),
                   &obj.service_name.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateVpcEndpoint.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpcEndpointResult {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Information about the endpoint.</p>"]
    pub vpc_endpoint: Option<VpcEndpoint>,
}

struct CreateVpcEndpointResultDeserializer;
impl CreateVpcEndpointResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateVpcEndpointResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateVpcEndpointResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "vpcEndpoint" => {
                            obj.vpc_endpoint =
                                Some(try!(VpcEndpointDeserializer::deserialize("vpcEndpoint",
                                                                               stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpcPeeringConnectionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The AWS account ID of the owner of the peer VPC.</p> <p>Default: Your AWS account ID</p>"]
    pub peer_owner_id: Option<String>,
    #[doc="<p>The ID of the VPC with which you are creating the VPC peering connection.</p>"]
    pub peer_vpc_id: Option<String>,
    #[doc="<p>The ID of the requester VPC.</p>"]
    pub vpc_id: Option<String>,
}


/// Serialize `CreateVpcPeeringConnectionRequest` contents to a `SignedRequest`.
struct CreateVpcPeeringConnectionRequestSerializer;
impl CreateVpcPeeringConnectionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVpcPeeringConnectionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.peer_owner_id {
            params.put(&format!("{}{}", prefix, "PeerOwnerId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.peer_vpc_id {
            params.put(&format!("{}{}", prefix, "PeerVpcId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.vpc_id {
            params.put(&format!("{}{}", prefix, "VpcId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpcPeeringConnectionResult {
    #[doc="<p>Information about the VPC peering connection.</p>"]
    pub vpc_peering_connection: Option<VpcPeeringConnection>,
}

struct CreateVpcPeeringConnectionResultDeserializer;
impl CreateVpcPeeringConnectionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<CreateVpcPeeringConnectionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateVpcPeeringConnectionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpcPeeringConnection" => {
                            obj.vpc_peering_connection =
                                Some(try!(VpcPeeringConnectionDeserializer::deserialize("vpcPeeringConnection",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpcRequest {
    #[doc="<p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.</p>"]
    pub amazon_provided_ipv_6_cidr_block: Option<bool>,
    #[doc="<p>The IPv4 network range for the VPC, in CIDR notation. For example, <code>10.0.0.0/16</code>.</p>"]
    pub cidr_block: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of <code>dedicated</code> or <code>host</code> into a dedicated tenancy VPC. </p> <p> <b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p> <p>Default: <code>default</code> </p>"]
    pub instance_tenancy: Option<String>,
}


/// Serialize `CreateVpcRequest` contents to a `SignedRequest`.
struct CreateVpcRequestSerializer;
impl CreateVpcRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVpcRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.amazon_provided_ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "AmazonProvidedIpv6CidrBlock"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "CidrBlock"),
                   &obj.cidr_block.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_tenancy {
            params.put(&format!("{}{}", prefix, "InstanceTenancy"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of CreateVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpcResult {
    #[doc="<p>Information about the VPC.</p>"]
    pub vpc: Option<Vpc>,
}

struct CreateVpcResultDeserializer;
impl CreateVpcResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateVpcResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateVpcResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpc" => {
                            obj.vpc = Some(try!(VpcDeserializer::deserialize("vpc", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateVpnConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpnConnectionRequest {
    #[doc="<p>The ID of the customer gateway.</p>"]
    pub customer_gateway_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Indicates whether the VPN connection requires static routes. If you are creating a VPN connection for a device that does not support BGP, you must specify <code>true</code>.</p> <p>Default: <code>false</code> </p>"]
    pub options: Option<VpnConnectionOptionsSpecification>,
    #[doc="<p>The type of VPN connection (<code>ipsec.1</code>).</p>"]
    pub type_: String,
    #[doc="<p>The ID of the virtual private gateway.</p>"]
    pub vpn_gateway_id: String,
}


/// Serialize `CreateVpnConnectionRequest` contents to a `SignedRequest`.
struct CreateVpnConnectionRequestSerializer;
impl CreateVpnConnectionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVpnConnectionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "CustomerGatewayId"),
                   &obj.customer_gateway_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.options {
            VpnConnectionOptionsSpecificationSerializer::serialize(params,
                                                                   &format!("{}{}",
                                                                           prefix,
                                                                           "Options"),
                                                                   field_value);
        }
        params.put(&format!("{}{}", prefix, "Type"),
                   &obj.type_.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpnGatewayId"),
                   &obj.vpn_gateway_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateVpnConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpnConnectionResult {
    #[doc="<p>Information about the VPN connection.</p>"]
    pub vpn_connection: Option<VpnConnection>,
}

struct CreateVpnConnectionResultDeserializer;
impl CreateVpnConnectionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateVpnConnectionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateVpnConnectionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpnConnection" => {
                            obj.vpn_connection =
                                Some(try!(VpnConnectionDeserializer::deserialize("vpnConnection",
                                                                                 stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for CreateVpnConnectionRoute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpnConnectionRouteRequest {
    #[doc="<p>The CIDR block associated with the local subnet of the customer network.</p>"]
    pub destination_cidr_block: String,
    #[doc="<p>The ID of the VPN connection.</p>"]
    pub vpn_connection_id: String,
}


/// Serialize `CreateVpnConnectionRouteRequest` contents to a `SignedRequest`.
struct CreateVpnConnectionRouteRequestSerializer;
impl CreateVpnConnectionRouteRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVpnConnectionRouteRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "DestinationCidrBlock"),
                   &obj.destination_cidr_block.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpnConnectionId"),
                   &obj.vpn_connection_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for CreateVpnGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpnGatewayRequest {
    #[doc="<p>The Availability Zone for the virtual private gateway.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The type of VPN connection this virtual private gateway supports.</p>"]
    pub type_: String,
}


/// Serialize `CreateVpnGatewayRequest` contents to a `SignedRequest`.
struct CreateVpnGatewayRequestSerializer;
impl CreateVpnGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &CreateVpnGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "Type"),
                   &obj.type_.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of CreateVpnGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CreateVpnGatewayResult {
    #[doc="<p>Information about the virtual private gateway.</p>"]
    pub vpn_gateway: Option<VpnGateway>,
}

struct CreateVpnGatewayResultDeserializer;
impl CreateVpnGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CreateVpnGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CreateVpnGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpnGateway" => {
                            obj.vpn_gateway =
                                Some(try!(VpnGatewayDeserializer::deserialize("vpnGateway",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct CurrencyCodeValuesDeserializer;
impl CurrencyCodeValuesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a customer gateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct CustomerGateway {
    #[doc="<p>The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).</p>"]
    pub bgp_asn: Option<String>,
    #[doc="<p>The ID of the customer gateway.</p>"]
    pub customer_gateway_id: Option<String>,
    #[doc="<p>The Internet-routable IP address of the customer gateway's outside interface.</p>"]
    pub ip_address: Option<String>,
    #[doc="<p>The current state of the customer gateway (<code>pending | available | deleting | deleted</code>).</p>"]
    pub state: Option<String>,
    #[doc="<p>Any tags assigned to the customer gateway.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The type of VPN connection the customer gateway supports (<code>ipsec.1</code>).</p>"]
    pub type_: Option<String>,
}

struct CustomerGatewayDeserializer;
impl CustomerGatewayDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<CustomerGateway, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = CustomerGateway::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "bgpAsn" => {
                            obj.bgp_asn = Some(try!(StringDeserializer::deserialize("bgpAsn",
                                                                                    stack)));
                        }
                        "customerGatewayId" => {
                            obj.customer_gateway_id =
                                Some(try!(StringDeserializer::deserialize("customerGatewayId",
                                                                          stack)));
                        }
                        "ipAddress" => {
                            obj.ip_address = Some(try!(StringDeserializer::deserialize("ipAddress",
                                                                                       stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(StringDeserializer::deserialize("state", stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "type" => {
                            obj.type_ = Some(try!(StringDeserializer::deserialize("type", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `CustomerGatewayIdStringList` contents to a `SignedRequest`.
struct CustomerGatewayIdStringListSerializer;
impl CustomerGatewayIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct CustomerGatewayListDeserializer;
impl CustomerGatewayListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<CustomerGateway>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(CustomerGatewayDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct DatafeedSubscriptionStateDeserializer;
impl DatafeedSubscriptionStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct DateTimeDeserializer;
impl DateTimeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DeleteCustomerGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteCustomerGatewayRequest {
    #[doc="<p>The ID of the customer gateway.</p>"]
    pub customer_gateway_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `DeleteCustomerGatewayRequest` contents to a `SignedRequest`.
struct DeleteCustomerGatewayRequestSerializer;
impl DeleteCustomerGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteCustomerGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "CustomerGatewayId"),
                   &obj.customer_gateway_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for DeleteDhcpOptions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteDhcpOptionsRequest {
    #[doc="<p>The ID of the DHCP options set.</p>"]
    pub dhcp_options_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `DeleteDhcpOptionsRequest` contents to a `SignedRequest`.
struct DeleteDhcpOptionsRequestSerializer;
impl DeleteDhcpOptionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteDhcpOptionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "DhcpOptionsId"),
                   &obj.dhcp_options_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DeleteEgressOnlyInternetGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the egress-only Internet gateway.</p>"]
    pub egress_only_internet_gateway_id: String,
}


/// Serialize `DeleteEgressOnlyInternetGatewayRequest` contents to a `SignedRequest`.
struct DeleteEgressOnlyInternetGatewayRequestSerializer;
impl DeleteEgressOnlyInternetGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteEgressOnlyInternetGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "EgressOnlyInternetGatewayId"),
                   &obj.egress_only_internet_gateway_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct DeleteEgressOnlyInternetGatewayResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_code: Option<bool>,
}

struct DeleteEgressOnlyInternetGatewayResultDeserializer;
impl DeleteEgressOnlyInternetGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DeleteEgressOnlyInternetGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DeleteEgressOnlyInternetGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "returnCode" => {
                            obj.return_code = Some(try!(BooleanDeserializer::deserialize("returnCode",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DeleteFlowLogs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteFlowLogsRequest {
    #[doc="<p>One or more flow log IDs.</p>"]
    pub flow_log_ids: Vec<String>,
}


/// Serialize `DeleteFlowLogsRequest` contents to a `SignedRequest`.
struct DeleteFlowLogsRequestSerializer;
impl DeleteFlowLogsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteFlowLogsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        ValueStringListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "FlowLogId"),
                                             &obj.flow_log_ids);

    }
}

#[doc="<p>Contains the output of DeleteFlowLogs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteFlowLogsResult {
    #[doc="<p>Information about the flow logs that could not be deleted successfully.</p>"]
    pub unsuccessful: Option<Vec<UnsuccessfulItem>>,
}

struct DeleteFlowLogsResultDeserializer;
impl DeleteFlowLogsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DeleteFlowLogsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DeleteFlowLogsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "unsuccessful" => {
                            obj.unsuccessful =
                                Some(try!(UnsuccessfulItemSetDeserializer::deserialize("unsuccessful",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DeleteInternetGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteInternetGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the Internet gateway.</p>"]
    pub internet_gateway_id: String,
}


/// Serialize `DeleteInternetGatewayRequest` contents to a `SignedRequest`.
struct DeleteInternetGatewayRequestSerializer;
impl DeleteInternetGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteInternetGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InternetGatewayId"),
                   &obj.internet_gateway_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteKeyPair.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteKeyPairRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The name of the key pair.</p>"]
    pub key_name: String,
}


/// Serialize `DeleteKeyPairRequest` contents to a `SignedRequest`.
struct DeleteKeyPairRequestSerializer;
impl DeleteKeyPairRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteKeyPairRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "KeyName"),
                   &obj.key_name.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteNatGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteNatGatewayRequest {
    #[doc="<p>The ID of the NAT gateway.</p>"]
    pub nat_gateway_id: String,
}


/// Serialize `DeleteNatGatewayRequest` contents to a `SignedRequest`.
struct DeleteNatGatewayRequestSerializer;
impl DeleteNatGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteNatGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "NatGatewayId"),
                   &obj.nat_gateway_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DeleteNatGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteNatGatewayResult {
    #[doc="<p>The ID of the NAT gateway.</p>"]
    pub nat_gateway_id: Option<String>,
}

struct DeleteNatGatewayResultDeserializer;
impl DeleteNatGatewayResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DeleteNatGatewayResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DeleteNatGatewayResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "natGatewayId" => {
                            obj.nat_gateway_id = Some(try!(StringDeserializer::deserialize("natGatewayId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DeleteNetworkAclEntry.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteNetworkAclEntryRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Indicates whether the rule is an egress rule.</p>"]
    pub egress: bool,
    #[doc="<p>The ID of the network ACL.</p>"]
    pub network_acl_id: String,
    #[doc="<p>The rule number of the entry to delete.</p>"]
    pub rule_number: i64,
}


/// Serialize `DeleteNetworkAclEntryRequest` contents to a `SignedRequest`.
struct DeleteNetworkAclEntryRequestSerializer;
impl DeleteNetworkAclEntryRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteNetworkAclEntryRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "Egress"),
                   &obj.egress.to_string().replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "NetworkAclId"),
                   &obj.network_acl_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "RuleNumber"),
                   &obj.rule_number.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteNetworkAcl.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteNetworkAclRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the network ACL.</p>"]
    pub network_acl_id: String,
}


/// Serialize `DeleteNetworkAclRequest` contents to a `SignedRequest`.
struct DeleteNetworkAclRequestSerializer;
impl DeleteNetworkAclRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteNetworkAclRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkAclId"),
                   &obj.network_acl_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteNetworkInterfacePermission.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteNetworkInterfacePermissionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Specify <code>true</code> to remove the permission even if the network interface is attached to an instance.</p>"]
    pub force: Option<bool>,
    #[doc="<p>The ID of the network interface permission.</p>"]
    pub network_interface_permission_id: String,
}


/// Serialize `DeleteNetworkInterfacePermissionRequest` contents to a `SignedRequest`.
struct DeleteNetworkInterfacePermissionRequestSerializer;
impl DeleteNetworkInterfacePermissionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteNetworkInterfacePermissionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.force {
            params.put(&format!("{}{}", prefix, "Force"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfacePermissionId"),
                   &obj.network_interface_permission_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output for DeleteNetworkInterfacePermission.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteNetworkInterfacePermissionResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds, otherwise returns an error.</p>"]
    pub return_: Option<bool>,
}

struct DeleteNetworkInterfacePermissionResultDeserializer;
impl DeleteNetworkInterfacePermissionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DeleteNetworkInterfacePermissionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DeleteNetworkInterfacePermissionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DeleteNetworkInterface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteNetworkInterfaceRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
}


/// Serialize `DeleteNetworkInterfaceRequest` contents to a `SignedRequest`.
struct DeleteNetworkInterfaceRequestSerializer;
impl DeleteNetworkInterfaceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteNetworkInterfaceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeletePlacementGroup.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeletePlacementGroupRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The name of the placement group.</p>"]
    pub group_name: String,
}


/// Serialize `DeletePlacementGroupRequest` contents to a `SignedRequest`.
struct DeletePlacementGroupRequestSerializer;
impl DeletePlacementGroupRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeletePlacementGroupRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "GroupName"),
                   &obj.group_name.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteRoute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteRouteRequest {
    #[doc="<p>The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.</p>"]
    pub destination_cidr_block: Option<String>,
    #[doc="<p>The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.</p>"]
    pub destination_ipv_6_cidr_block: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: String,
}


/// Serialize `DeleteRouteRequest` contents to a `SignedRequest`.
struct DeleteRouteRequestSerializer;
impl DeleteRouteRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteRouteRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.destination_cidr_block {
            params.put(&format!("{}{}", prefix, "DestinationCidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.destination_ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "DestinationIpv6CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteRouteTable.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteRouteTableRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: String,
}


/// Serialize `DeleteRouteTableRequest` contents to a `SignedRequest`.
struct DeleteRouteTableRequestSerializer;
impl DeleteRouteTableRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteRouteTableRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteSecurityGroup.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteSecurityGroupRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the security group. Required for a nondefault VPC.</p>"]
    pub group_id: Option<String>,
    #[doc="<p>[EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.</p>"]
    pub group_name: Option<String>,
}


/// Serialize `DeleteSecurityGroupRequest` contents to a `SignedRequest`.
struct DeleteSecurityGroupRequestSerializer;
impl DeleteSecurityGroupRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteSecurityGroupRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_id {
            params.put(&format!("{}{}", prefix, "GroupId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for DeleteSnapshot.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteSnapshotRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the EBS snapshot.</p>"]
    pub snapshot_id: String,
}


/// Serialize `DeleteSnapshotRequest` contents to a `SignedRequest`.
struct DeleteSnapshotRequestSerializer;
impl DeleteSnapshotRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteSnapshotRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SnapshotId"),
                   &obj.snapshot_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteSpotDatafeedSubscription.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteSpotDatafeedSubscriptionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `DeleteSpotDatafeedSubscriptionRequest` contents to a `SignedRequest`.
struct DeleteSpotDatafeedSubscriptionRequestSerializer;
impl DeleteSpotDatafeedSubscriptionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteSpotDatafeedSubscriptionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for DeleteSubnet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteSubnetRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: String,
}


/// Serialize `DeleteSubnetRequest` contents to a `SignedRequest`.
struct DeleteSubnetRequestSerializer;
impl DeleteSubnetRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteSubnetRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SubnetId"),
                   &obj.subnet_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteTags.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteTagsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the resource. For example, ami-1a2b3c4d. You can specify more than one resource ID.</p>"]
    pub resources: Vec<String>,
    #[doc="<p>One or more tags to delete. If you omit the <code>value</code> parameter, we delete the tag regardless of its value. If you specify this parameter with an empty string as the value, we delete the key only if its value is an empty string.</p>"]
    pub tags: Option<Vec<Tag>>,
}


/// Serialize `DeleteTagsRequest` contents to a `SignedRequest`.
struct DeleteTagsRequestSerializer;
impl DeleteTagsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteTagsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        ResourceIdListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "ResourceId"),
                                            &obj.resources);
        if let Some(ref field_value) = obj.tags {
            TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
        }

    }
}

#[doc="<p>Contains the parameters for DeleteVolume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVolumeRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: String,
}


/// Serialize `DeleteVolumeRequest` contents to a `SignedRequest`.
struct DeleteVolumeRequestSerializer;
impl DeleteVolumeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteVolumeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteVpcEndpoints.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpcEndpointsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more endpoint IDs.</p>"]
    pub vpc_endpoint_ids: Vec<String>,
}


/// Serialize `DeleteVpcEndpointsRequest` contents to a `SignedRequest`.
struct DeleteVpcEndpointsRequestSerializer;
impl DeleteVpcEndpointsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteVpcEndpointsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        ValueStringListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "VpcEndpointId"),
                                             &obj.vpc_endpoint_ids);

    }
}

#[doc="<p>Contains the output of DeleteVpcEndpoints.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpcEndpointsResult {
    #[doc="<p>Information about the endpoints that were not successfully deleted.</p>"]
    pub unsuccessful: Option<Vec<UnsuccessfulItem>>,
}

struct DeleteVpcEndpointsResultDeserializer;
impl DeleteVpcEndpointsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DeleteVpcEndpointsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DeleteVpcEndpointsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "unsuccessful" => {
                            obj.unsuccessful =
                                Some(try!(UnsuccessfulItemSetDeserializer::deserialize("unsuccessful",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DeleteVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpcPeeringConnectionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC peering connection.</p>"]
    pub vpc_peering_connection_id: String,
}


/// Serialize `DeleteVpcPeeringConnectionRequest` contents to a `SignedRequest`.
struct DeleteVpcPeeringConnectionRequestSerializer;
impl DeleteVpcPeeringConnectionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteVpcPeeringConnectionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcPeeringConnectionId"),
                   &obj.vpc_peering_connection_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DeleteVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpcPeeringConnectionResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct DeleteVpcPeeringConnectionResultDeserializer;
impl DeleteVpcPeeringConnectionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DeleteVpcPeeringConnectionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DeleteVpcPeeringConnectionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DeleteVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpcRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `DeleteVpcRequest` contents to a `SignedRequest`.
struct DeleteVpcRequestSerializer;
impl DeleteVpcRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteVpcRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteVpnConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpnConnectionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPN connection.</p>"]
    pub vpn_connection_id: String,
}


/// Serialize `DeleteVpnConnectionRequest` contents to a `SignedRequest`.
struct DeleteVpnConnectionRequestSerializer;
impl DeleteVpnConnectionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteVpnConnectionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpnConnectionId"),
                   &obj.vpn_connection_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteVpnConnectionRoute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpnConnectionRouteRequest {
    #[doc="<p>The CIDR block associated with the local subnet of the customer network.</p>"]
    pub destination_cidr_block: String,
    #[doc="<p>The ID of the VPN connection.</p>"]
    pub vpn_connection_id: String,
}


/// Serialize `DeleteVpnConnectionRouteRequest` contents to a `SignedRequest`.
struct DeleteVpnConnectionRouteRequestSerializer;
impl DeleteVpnConnectionRouteRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteVpnConnectionRouteRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "DestinationCidrBlock"),
                   &obj.destination_cidr_block.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpnConnectionId"),
                   &obj.vpn_connection_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeleteVpnGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeleteVpnGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the virtual private gateway.</p>"]
    pub vpn_gateway_id: String,
}


/// Serialize `DeleteVpnGatewayRequest` contents to a `SignedRequest`.
struct DeleteVpnGatewayRequestSerializer;
impl DeleteVpnGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeleteVpnGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpnGatewayId"),
                   &obj.vpn_gateway_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DeregisterImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DeregisterImageRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: String,
}


/// Serialize `DeregisterImageRequest` contents to a `SignedRequest`.
struct DeregisterImageRequestSerializer;
impl DeregisterImageRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DeregisterImageRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "ImageId"),
                   &obj.image_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DescribeAccountAttributes.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeAccountAttributesRequest {
    #[doc="<p>One or more account attribute names.</p>"]
    pub attribute_names: Option<Vec<String>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `DescribeAccountAttributesRequest` contents to a `SignedRequest`.
struct DescribeAccountAttributesRequestSerializer;
impl DescribeAccountAttributesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeAccountAttributesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attribute_names {
            AccountAttributeNameStringListSerializer::serialize(params,
                                                                &format!("{}{}",
                                                                        prefix,
                                                                        "AttributeName"),
                                                                field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeAccountAttributes.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeAccountAttributesResult {
    #[doc="<p>Information about one or more account attributes.</p>"]
    pub account_attributes: Option<Vec<AccountAttribute>>,
}

struct DescribeAccountAttributesResultDeserializer;
impl DescribeAccountAttributesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeAccountAttributesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeAccountAttributesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "accountAttributeSet" => {
                            obj.account_attributes =
                                Some(try!(AccountAttributeListDeserializer::deserialize("accountAttributeSet",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeAddresses.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeAddressesRequest {
    #[doc="<p>[EC2-VPC] One or more allocation IDs.</p> <p>Default: Describes all your Elastic IP addresses.</p>"]
    pub allocation_ids: Option<Vec<String>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters. Filter names and values are case-sensitive.</p> <ul> <li> <p> <code>allocation-id</code> - [EC2-VPC] The allocation ID for the address.</p> </li> <li> <p> <code>association-id</code> - [EC2-VPC] The association ID for the address.</p> </li> <li> <p> <code>domain</code> - Indicates whether the address is for use in EC2-Classic (<code>standard</code>) or in a VPC (<code>vpc</code>).</p> </li> <li> <p> <code>instance-id</code> - The ID of the instance the address is associated with, if any.</p> </li> <li> <p> <code>network-interface-id</code> - [EC2-VPC] The ID of the network interface that the address is associated with, if any.</p> </li> <li> <p> <code>network-interface-owner-id</code> - The AWS account ID of the owner.</p> </li> <li> <p> <code>private-ip-address</code> - [EC2-VPC] The private IP address associated with the Elastic IP address.</p> </li> <li> <p> <code>public-ip</code> - The Elastic IP address.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>[EC2-Classic] One or more Elastic IP addresses.</p> <p>Default: Describes all your Elastic IP addresses.</p>"]
    pub public_ips: Option<Vec<String>>,
}


/// Serialize `DescribeAddressesRequest` contents to a `SignedRequest`.
struct DescribeAddressesRequestSerializer;
impl DescribeAddressesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeAddressesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.allocation_ids {
            AllocationIdListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "AllocationId"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.public_ips {
            PublicIpStringListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "PublicIp"),
                                                    field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeAddresses.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeAddressesResult {
    #[doc="<p>Information about one or more Elastic IP addresses.</p>"]
    pub addresses: Option<Vec<Address>>,
}

struct DescribeAddressesResultDeserializer;
impl DescribeAddressesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeAddressesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeAddressesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "addressesSet" => {
                            obj.addresses = Some(try!(AddressListDeserializer::deserialize("addressesSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeAvailabilityZones.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeAvailabilityZonesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>message</code> - Information about the Availability Zone.</p> </li> <li> <p> <code>region-name</code> - The name of the region for the Availability Zone (for example, <code>us-east-1</code>).</p> </li> <li> <p> <code>state</code> - The state of the Availability Zone (<code>available</code> | <code>information</code> | <code>impaired</code> | <code>unavailable</code>).</p> </li> <li> <p> <code>zone-name</code> - The name of the Availability Zone (for example, <code>us-east-1a</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The names of one or more Availability Zones.</p>"]
    pub zone_names: Option<Vec<String>>,
}


/// Serialize `DescribeAvailabilityZonesRequest` contents to a `SignedRequest`.
struct DescribeAvailabilityZonesRequestSerializer;
impl DescribeAvailabilityZonesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeAvailabilityZonesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.zone_names {
            ZoneNameStringListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "ZoneName"),
                                                    field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeAvailabiltyZones.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeAvailabilityZonesResult {
    #[doc="<p>Information about one or more Availability Zones.</p>"]
    pub availability_zones: Option<Vec<AvailabilityZone>>,
}

struct DescribeAvailabilityZonesResultDeserializer;
impl DescribeAvailabilityZonesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeAvailabilityZonesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeAvailabilityZonesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZoneInfo" => {
                            obj.availability_zones =
                                Some(try!(AvailabilityZoneListDeserializer::deserialize("availabilityZoneInfo",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeBundleTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeBundleTasksRequest {
    #[doc="<p>One or more bundle task IDs.</p> <p>Default: Describes all your bundle tasks.</p>"]
    pub bundle_ids: Option<Vec<String>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>bundle-id</code> - The ID of the bundle task.</p> </li> <li> <p> <code>error-code</code> - If the task failed, the error code returned.</p> </li> <li> <p> <code>error-message</code> - If the task failed, the error message returned.</p> </li> <li> <p> <code>instance-id</code> - The ID of the instance.</p> </li> <li> <p> <code>progress</code> - The level of task completion, as a percentage (for example, 20%).</p> </li> <li> <p> <code>s3-bucket</code> - The Amazon S3 bucket to store the AMI.</p> </li> <li> <p> <code>s3-prefix</code> - The beginning of the AMI name.</p> </li> <li> <p> <code>start-time</code> - The time the task started (for example, 2013-09-15T17:15:20.000Z).</p> </li> <li> <p> <code>state</code> - The state of the task (<code>pending</code> | <code>waiting-for-shutdown</code> | <code>bundling</code> | <code>storing</code> | <code>cancelling</code> | <code>complete</code> | <code>failed</code>).</p> </li> <li> <p> <code>update-time</code> - The time of the most recent update for the task.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
}


/// Serialize `DescribeBundleTasksRequest` contents to a `SignedRequest`.
struct DescribeBundleTasksRequestSerializer;
impl DescribeBundleTasksRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeBundleTasksRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.bundle_ids {
            BundleIdStringListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "BundleId"),
                                                    field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeBundleTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeBundleTasksResult {
    #[doc="<p>Information about one or more bundle tasks.</p>"]
    pub bundle_tasks: Option<Vec<BundleTask>>,
}

struct DescribeBundleTasksResultDeserializer;
impl DescribeBundleTasksResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeBundleTasksResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeBundleTasksResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "bundleInstanceTasksSet" => {
                            obj.bundle_tasks =
                                Some(try!(BundleTaskListDeserializer::deserialize("bundleInstanceTasksSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeClassicLinkInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeClassicLinkInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>group-id</code> - The ID of a VPC security group that's associated with the instance.</p> </li> <li> <p> <code>instance-id</code> - The ID of the instance.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC that the instance is linked to.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more instance IDs. Must be instances linked to a VPC through ClassicLink.</p>"]
    pub instance_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1000; if <code>MaxResults</code> is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the instance IDs parameter in the same request.</p> <p>Constraint: If the value is greater than 1000, we return only 1000 items.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeClassicLinkInstancesRequest` contents to a `SignedRequest`.
struct DescribeClassicLinkInstancesRequestSerializer;
impl DescribeClassicLinkInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeClassicLinkInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.instance_ids {
            InstanceIdStringListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "InstanceId"),
                                                      field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeClassicLinkInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeClassicLinkInstancesResult {
    #[doc="<p>Information about one or more linked EC2-Classic instances.</p>"]
    pub instances: Option<Vec<ClassicLinkInstance>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeClassicLinkInstancesResultDeserializer;
impl DescribeClassicLinkInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeClassicLinkInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeClassicLinkInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instancesSet" => {
                            obj.instances =
                                Some(try!(ClassicLinkInstanceListDeserializer::deserialize("instancesSet",
                                                                                           stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct DescribeConversionTaskListDeserializer;
impl DescribeConversionTaskListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ConversionTask>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ConversionTaskDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeConversionTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeConversionTasksRequest {
    #[doc="<p>One or more conversion task IDs.</p>"]
    pub conversion_task_ids: Option<Vec<String>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `DescribeConversionTasksRequest` contents to a `SignedRequest`.
struct DescribeConversionTasksRequestSerializer;
impl DescribeConversionTasksRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeConversionTasksRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.conversion_task_ids {
            ConversionIdStringListSerializer::serialize(params,
                                                        &format!("{}{}",
                                                                prefix,
                                                                "ConversionTaskId"),
                                                        field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for DescribeConversionTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeConversionTasksResult {
    #[doc="<p>Information about the conversion tasks.</p>"]
    pub conversion_tasks: Option<Vec<ConversionTask>>,
}

struct DescribeConversionTasksResultDeserializer;
impl DescribeConversionTasksResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeConversionTasksResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeConversionTasksResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "conversionTasks" => {
                            obj.conversion_tasks = Some(try!(DescribeConversionTaskListDeserializer::deserialize("conversionTasks", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeCustomerGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeCustomerGatewaysRequest {
    #[doc="<p>One or more customer gateway IDs.</p> <p>Default: Describes all your customer gateways.</p>"]
    pub customer_gateway_ids: Option<Vec<String>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>bgp-asn</code> - The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).</p> </li> <li> <p> <code>customer-gateway-id</code> - The ID of the customer gateway.</p> </li> <li> <p> <code>ip-address</code> - The IP address of the customer gateway's Internet-routable external interface.</p> </li> <li> <p> <code>state</code> - The state of the customer gateway (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p> </li> <li> <p> <code>type</code> - The type of customer gateway. Currently, the only supported type is <code>ipsec.1</code>.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
}


/// Serialize `DescribeCustomerGatewaysRequest` contents to a `SignedRequest`.
struct DescribeCustomerGatewaysRequestSerializer;
impl DescribeCustomerGatewaysRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeCustomerGatewaysRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.customer_gateway_ids {
            CustomerGatewayIdStringListSerializer::serialize(params,
                                                             &format!("{}{}",
                                                                     prefix,
                                                                     "CustomerGatewayId"),
                                                             field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeCustomerGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeCustomerGatewaysResult {
    #[doc="<p>Information about one or more customer gateways.</p>"]
    pub customer_gateways: Option<Vec<CustomerGateway>>,
}

struct DescribeCustomerGatewaysResultDeserializer;
impl DescribeCustomerGatewaysResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeCustomerGatewaysResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeCustomerGatewaysResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "customerGatewaySet" => {
                            obj.customer_gateways =
                                Some(try!(CustomerGatewayListDeserializer::deserialize("customerGatewaySet",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeDhcpOptions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeDhcpOptionsRequest {
    #[doc="<p>The IDs of one or more DHCP options sets.</p> <p>Default: Describes all your DHCP options sets.</p>"]
    pub dhcp_options_ids: Option<Vec<String>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>dhcp-options-id</code> - The ID of a set of DHCP options.</p> </li> <li> <p> <code>key</code> - The key for one of the options (for example, <code>domain-name</code>).</p> </li> <li> <p> <code>value</code> - The value for one of the options.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
}


/// Serialize `DescribeDhcpOptionsRequest` contents to a `SignedRequest`.
struct DescribeDhcpOptionsRequestSerializer;
impl DescribeDhcpOptionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeDhcpOptionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dhcp_options_ids {
            DhcpOptionsIdStringListSerializer::serialize(params,
                                                         &format!("{}{}", prefix, "DhcpOptionsId"),
                                                         field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeDhcpOptions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeDhcpOptionsResult {
    #[doc="<p>Information about one or more DHCP options sets.</p>"]
    pub dhcp_options: Option<Vec<DhcpOptions>>,
}

struct DescribeDhcpOptionsResultDeserializer;
impl DescribeDhcpOptionsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeDhcpOptionsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeDhcpOptionsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "dhcpOptionsSet" => {
                            obj.dhcp_options =
                                Some(try!(DhcpOptionsListDeserializer::deserialize("dhcpOptionsSet",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeEgressOnlyInternetGatewaysRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more egress-only Internet gateway IDs.</p>"]
    pub egress_only_internet_gateway_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1000; if <code>MaxResults</code> is given a value larger than 1000, only 1000 results are returned.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeEgressOnlyInternetGatewaysRequest` contents to a `SignedRequest`.
struct DescribeEgressOnlyInternetGatewaysRequestSerializer;
impl DescribeEgressOnlyInternetGatewaysRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &DescribeEgressOnlyInternetGatewaysRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.egress_only_internet_gateway_ids {
            EgressOnlyInternetGatewayIdListSerializer::serialize(params,
                                                                 &format!("{}{}",
                                                                         prefix,
                                                                         "EgressOnlyInternetGatewayId"),
                                                                 field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeEgressOnlyInternetGatewaysResult {
    #[doc="<p>Information about the egress-only Internet gateways.</p>"]
    pub egress_only_internet_gateways: Option<Vec<EgressOnlyInternetGateway>>,
    #[doc="<p>The token to use to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}

struct DescribeEgressOnlyInternetGatewaysResultDeserializer;
impl DescribeEgressOnlyInternetGatewaysResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeEgressOnlyInternetGatewaysResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeEgressOnlyInternetGatewaysResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "egressOnlyInternetGatewaySet" => {
                            obj.egress_only_internet_gateways = Some(try!(EgressOnlyInternetGatewayListDeserializer::deserialize("egressOnlyInternetGatewaySet", stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeElasticGpusRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more Elastic GPU IDs.</p>"]
    pub elastic_gpu_ids: Option<Vec<String>>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone in which the Elastic GPU resides.</p> </li> <li> <p> <code>elastic-gpu-health</code> - The status of the Elastic GPU (<code>OK</code> | <code>IMPAIRED</code>).</p> </li> <li> <p> <code>elastic-gpu-state</code> - The state of the Elastic GPU (<code>ATTACHED</code>).</p> </li> <li> <p> <code>elastic-gpu-type</code> - The type of Elastic GPU; for example, <code>eg1.medium</code>.</p> </li> <li> <p> <code>instance-id</code> - The ID of the instance to which the Elastic GPU is associated.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value. This value can be between 5 and 1000.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to request the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeElasticGpusRequest` contents to a `SignedRequest`.
struct DescribeElasticGpusRequestSerializer;
impl DescribeElasticGpusRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeElasticGpusRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.elastic_gpu_ids {
            ElasticGpuIdSetSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "ElasticGpuId"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeElasticGpusResult {
    #[doc="<p>Information about the Elastic GPUs.</p>"]
    pub elastic_gpu_set: Option<Vec<ElasticGpus>>,
    #[doc="<p>The total number of items to return. If the total number of items available is more than the value specified in max-items then a Next-Token will be provided in the output that you can use to resume pagination.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeElasticGpusResultDeserializer;
impl DescribeElasticGpusResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeElasticGpusResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeElasticGpusResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "elasticGpuSet" => {
                            obj.elastic_gpu_set =
                                Some(try!(ElasticGpuSetDeserializer::deserialize("elasticGpuSet",
                                                                                 stack)));
                        }
                        "maxResults" => {
                            obj.max_results = Some(try!(IntegerDeserializer::deserialize("maxResults",
                                                                                         stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeExportTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeExportTasksRequest {
    #[doc="<p>One or more export task IDs.</p>"]
    pub export_task_ids: Option<Vec<String>>,
}


/// Serialize `DescribeExportTasksRequest` contents to a `SignedRequest`.
struct DescribeExportTasksRequestSerializer;
impl DescribeExportTasksRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeExportTasksRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.export_task_ids {
            ExportTaskIdStringListSerializer::serialize(params,
                                                        &format!("{}{}", prefix, "ExportTaskId"),
                                                        field_value);
        }

    }
}

#[doc="<p>Contains the output for DescribeExportTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeExportTasksResult {
    #[doc="<p>Information about the export tasks.</p>"]
    pub export_tasks: Option<Vec<ExportTask>>,
}

struct DescribeExportTasksResultDeserializer;
impl DescribeExportTasksResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeExportTasksResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeExportTasksResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "exportTaskSet" => {
                            obj.export_tasks =
                                Some(try!(ExportTaskListDeserializer::deserialize("exportTaskSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeFlowLogs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeFlowLogsRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>deliver-log-status</code> - The status of the logs delivery (<code>SUCCESS</code> | <code>FAILED</code>).</p> </li> <li> <p> <code>flow-log-id</code> - The ID of the flow log.</p> </li> <li> <p> <code>log-group-name</code> - The name of the log group.</p> </li> <li> <p> <code>resource-id</code> - The ID of the VPC, subnet, or network interface.</p> </li> <li> <p> <code>traffic-type</code> - The type of traffic (<code>ACCEPT</code> | <code>REJECT</code> | <code>ALL</code>)</p> </li> </ul>"]
    pub filter: Option<Vec<Filter>>,
    #[doc="<p>One or more flow log IDs.</p>"]
    pub flow_log_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1000; if <code>MaxResults</code> is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the flow log IDs parameter in the same request.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeFlowLogsRequest` contents to a `SignedRequest`.
struct DescribeFlowLogsRequestSerializer;
impl DescribeFlowLogsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeFlowLogsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filter {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.flow_log_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "FlowLogId"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeFlowLogs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeFlowLogsResult {
    #[doc="<p>Information about the flow logs.</p>"]
    pub flow_logs: Option<Vec<FlowLog>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeFlowLogsResultDeserializer;
impl DescribeFlowLogsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeFlowLogsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeFlowLogsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "flowLogSet" => {
                            obj.flow_logs = Some(try!(FlowLogSetDeserializer::deserialize("flowLogSet",
                                                                                          stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeFpgaImagesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>create-time</code> - The creation time of the AFI.</p> </li> <li> <p> <code>fpga-image-id</code> - The FPGA image identifier (AFI ID).</p> </li> <li> <p> <code>fpga-image-global-id</code> - The global FPGA image identifier (AGFI ID).</p> </li> <li> <p> <code>name</code> - The name of the AFI.</p> </li> <li> <p> <code>owner-id</code> - The AWS account ID of the AFI owner.</p> </li> <li> <p> <code>product-code</code> - The product code.</p> </li> <li> <p> <code>shell-version</code> - The version of the AWS Shell that was used to create the bitstream.</p> </li> <li> <p> <code>state</code> - The state of the AFI (<code>pending</code> | <code>failed</code> | <code>available</code> | <code>unavailable</code>).</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>update-time</code> - The time of the most recent update.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more AFI IDs.</p>"]
    pub fpga_image_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return in a single call.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Filters the AFI by owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code>).</p>"]
    pub owners: Option<Vec<String>>,
}


/// Serialize `DescribeFpgaImagesRequest` contents to a `SignedRequest`.
struct DescribeFpgaImagesRequestSerializer;
impl DescribeFpgaImagesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeFpgaImagesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.fpga_image_ids {
            FpgaImageIdListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "FpgaImageId"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.owners {
            OwnerStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "Owner"),
                                                 field_value);
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeFpgaImagesResult {
    #[doc="<p>Information about one or more FPGA images.</p>"]
    pub fpga_images: Option<Vec<FpgaImage>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeFpgaImagesResultDeserializer;
impl DescribeFpgaImagesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeFpgaImagesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeFpgaImagesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "fpgaImageSet" => {
                            obj.fpga_images =
                                Some(try!(FpgaImageListDeserializer::deserialize("fpgaImageSet",
                                                                                 stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(NextTokenDeserializer::deserialize("nextToken",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeHostReservationOfferingsRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>instance-family</code> - The instance family of the offering (e.g., <code>m4</code>).</p> </li> <li> <p> <code>payment-option</code> - The payment option (<code>NoUpfront</code> | <code>PartialUpfront</code> | <code>AllUpfront</code>).</p> </li> </ul>"]
    pub filter: Option<Vec<Filter>>,
    #[doc="<p>This is the maximum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.</p>"]
    pub max_duration: Option<i64>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500; if <code>maxResults</code> is given a larger value than 500, you will receive an error.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.</p>"]
    pub min_duration: Option<i64>,
    #[doc="<p>The token to use to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the reservation offering.</p>"]
    pub offering_id: Option<String>,
}


/// Serialize `DescribeHostReservationOfferingsRequest` contents to a `SignedRequest`.
struct DescribeHostReservationOfferingsRequestSerializer;
impl DescribeHostReservationOfferingsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeHostReservationOfferingsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filter {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_duration {
            params.put(&format!("{}{}", prefix, "MaxDuration"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.min_duration {
            params.put(&format!("{}{}", prefix, "MinDuration"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.offering_id {
            params.put(&format!("{}{}", prefix, "OfferingId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeHostReservationOfferingsResult {
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the offerings.</p>"]
    pub offering_set: Option<Vec<HostOffering>>,
}

struct DescribeHostReservationOfferingsResultDeserializer;
impl DescribeHostReservationOfferingsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeHostReservationOfferingsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeHostReservationOfferingsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "offeringSet" => {
                            obj.offering_set =
                                Some(try!(HostOfferingSetDeserializer::deserialize("offeringSet",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeHostReservationsRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>instance-family</code> - The instance family (e.g., <code>m4</code>).</p> </li> <li> <p> <code>payment-option</code> - The payment option (<code>NoUpfront</code> | <code>PartialUpfront</code> | <code>AllUpfront</code>).</p> </li> <li> <p> <code>state</code> - The state of the reservation (<code>payment-pending</code> | <code>payment-failed</code> | <code>active</code> | <code>retired</code>).</p> </li> </ul>"]
    pub filter: Option<Vec<Filter>>,
    #[doc="<p>One or more host reservation IDs.</p>"]
    pub host_reservation_id_set: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500; if <code>maxResults</code> is given a larger value than 500, you will receive an error.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to use to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeHostReservationsRequest` contents to a `SignedRequest`.
struct DescribeHostReservationsRequestSerializer;
impl DescribeHostReservationsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeHostReservationsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filter {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.host_reservation_id_set {
            HostReservationIdSetSerializer::serialize(params,
                                                      &format!("{}{}",
                                                              prefix,
                                                              "HostReservationIdSet"),
                                                      field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeHostReservationsResult {
    #[doc="<p>Details about the reservation's configuration.</p>"]
    pub host_reservation_set: Option<Vec<HostReservation>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeHostReservationsResultDeserializer;
impl DescribeHostReservationsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeHostReservationsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeHostReservationsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "hostReservationSet" => {
                            obj.host_reservation_set =
                                Some(try!(HostReservationSetDeserializer::deserialize("hostReservationSet",
                                                                                      stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeHostsRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>instance-type</code> - The instance type size that the Dedicated Host is configured to support.</p> </li> <li> <p> <code>auto-placement</code> - Whether auto-placement is enabled or disabled (<code>on</code> | <code>off</code>).</p> </li> <li> <p> <code>host-reservation-id</code> - The ID of the reservation assigned to this host.</p> </li> <li> <p> <code>client-token</code> - The idempotency token you provided when you launched the instance</p> </li> <li> <p> <code>state</code>- The allocation state of the Dedicated Host (<code>available</code> | <code>under-assessment</code> | <code>permanent-failure</code> | <code>released</code> | <code>released-permanent-failure</code>).</p> </li> <li> <p> <code>availability-zone</code> - The Availability Zone of the host.</p> </li> </ul>"]
    pub filter: Option<Vec<Filter>>,
    #[doc="<p>The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.</p>"]
    pub host_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500; if <code>maxResults</code> is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeHostsRequest` contents to a `SignedRequest`.
struct DescribeHostsRequestSerializer;
impl DescribeHostsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeHostsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filter {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.host_ids {
            RequestHostIdListSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "HostId"),
                                                   field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeHostsResult {
    #[doc="<p>Information about the Dedicated Hosts.</p>"]
    pub hosts: Option<Vec<Host>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeHostsResultDeserializer;
impl DescribeHostsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeHostsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeHostsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "hostSet" => {
                            obj.hosts = Some(try!(HostListDeserializer::deserialize("hostSet",
                                                                                    stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeIamInstanceProfileAssociationsRequest {
    #[doc="<p>One or more IAM instance profile associations.</p>"]
    pub association_ids: Option<Vec<String>>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>instance-id</code> - The ID of the instance.</p> </li> <li> <p> <code>state</code> - The state of the association (<code>associating</code> | <code>associated</code> | <code>disassociating</code> | <code>disassociated</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to request the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeIamInstanceProfileAssociationsRequest` contents to a `SignedRequest`.
struct DescribeIamInstanceProfileAssociationsRequestSerializer;
impl DescribeIamInstanceProfileAssociationsRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &DescribeIamInstanceProfileAssociationsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.association_ids {
            AssociationIdListSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "AssociationId"),
                                                   field_value);
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeIamInstanceProfileAssociationsResult {
    #[doc="<p>Information about one or more IAM instance profile associations.</p>"]
    pub iam_instance_profile_associations: Option<Vec<IamInstanceProfileAssociation>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeIamInstanceProfileAssociationsResultDeserializer;
impl DescribeIamInstanceProfileAssociationsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeIamInstanceProfileAssociationsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeIamInstanceProfileAssociationsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "iamInstanceProfileAssociationSet" => {
                            obj.iam_instance_profile_associations = Some(try!(IamInstanceProfileAssociationSetDeserializer::deserialize("iamInstanceProfileAssociationSet", stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(NextTokenDeserializer::deserialize("nextToken",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeIdFormat.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeIdFormatRequest {
    #[doc="<p>The type of resource: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code> </p>"]
    pub resource: Option<String>,
}


/// Serialize `DescribeIdFormatRequest` contents to a `SignedRequest`.
struct DescribeIdFormatRequestSerializer;
impl DescribeIdFormatRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeIdFormatRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.resource {
            params.put(&format!("{}{}", prefix, "Resource"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeIdFormat.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeIdFormatResult {
    #[doc="<p>Information about the ID format for the resource.</p>"]
    pub statuses: Option<Vec<IdFormat>>,
}

struct DescribeIdFormatResultDeserializer;
impl DescribeIdFormatResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeIdFormatResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeIdFormatResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "statusSet" => {
                            obj.statuses = Some(try!(IdFormatListDeserializer::deserialize("statusSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeIdentityIdFormat.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeIdentityIdFormatRequest {
    #[doc="<p>The ARN of the principal, which can be an IAM role, IAM user, or the root user.</p>"]
    pub principal_arn: String,
    #[doc="<p>The type of resource: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code> </p>"]
    pub resource: Option<String>,
}


/// Serialize `DescribeIdentityIdFormatRequest` contents to a `SignedRequest`.
struct DescribeIdentityIdFormatRequestSerializer;
impl DescribeIdentityIdFormatRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeIdentityIdFormatRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "PrincipalArn"),
                   &obj.principal_arn.replace("+", "%2B"));
        if let Some(ref field_value) = obj.resource {
            params.put(&format!("{}{}", prefix, "Resource"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeIdentityIdFormat.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeIdentityIdFormatResult {
    #[doc="<p>Information about the ID format for the resources.</p>"]
    pub statuses: Option<Vec<IdFormat>>,
}

struct DescribeIdentityIdFormatResultDeserializer;
impl DescribeIdentityIdFormatResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeIdentityIdFormatResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeIdentityIdFormatResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "statusSet" => {
                            obj.statuses = Some(try!(IdFormatListDeserializer::deserialize("statusSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeImageAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeImageAttributeRequest {
    #[doc="<p>The AMI attribute.</p> <p> <b>Note</b>: Depending on your account privileges, the <code>blockDeviceMapping</code> attribute may return a <code>Client.AuthFailure</code> error. If this happens, use <a>DescribeImages</a> to get information about the block device mapping for the AMI.</p>"]
    pub attribute: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: String,
}


/// Serialize `DescribeImageAttributeRequest` contents to a `SignedRequest`.
struct DescribeImageAttributeRequestSerializer;
impl DescribeImageAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeImageAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Attribute"),
                   &obj.attribute.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "ImageId"),
                   &obj.image_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DescribeImages.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeImagesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> (the sender of the request), or <code>all</code> (public AMIs).</p>"]
    pub executable_users: Option<Vec<String>>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>architecture</code> - The image architecture (<code>i386</code> | <code>x86_64</code>).</p> </li> <li> <p> <code>block-device-mapping.delete-on-termination</code> - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.</p> </li> <li> <p> <code>block-device-mapping.device-name</code> - The device name for the EBS volume (for example, <code>/dev/sdh</code>).</p> </li> <li> <p> <code>block-device-mapping.snapshot-id</code> - The ID of the snapshot used for the EBS volume.</p> </li> <li> <p> <code>block-device-mapping.volume-size</code> - The volume size of the EBS volume, in GiB.</p> </li> <li> <p> <code>block-device-mapping.volume-type</code> - The volume type of the EBS volume (<code>gp2</code> | <code>io1</code> | <code>st1 </code>| <code>sc1</code> | <code>standard</code>).</p> </li> <li> <p> <code>description</code> - The description of the image (provided during image creation).</p> </li> <li> <p> <code>ena-support</code> - A Boolean that indicates whether enhanced networking with ENA is enabled.</p> </li> <li> <p> <code>hypervisor</code> - The hypervisor type (<code>ovm</code> | <code>xen</code>).</p> </li> <li> <p> <code>image-id</code> - The ID of the image.</p> </li> <li> <p> <code>image-type</code> - The image type (<code>machine</code> | <code>kernel</code> | <code>ramdisk</code>).</p> </li> <li> <p> <code>is-public</code> - A Boolean that indicates whether the image is public.</p> </li> <li> <p> <code>kernel-id</code> - The kernel ID.</p> </li> <li> <p> <code>manifest-location</code> - The location of the image manifest.</p> </li> <li> <p> <code>name</code> - The name of the AMI (provided during image creation).</p> </li> <li> <p> <code>owner-alias</code> - String value from an Amazon-maintained list (<code>amazon</code> | <code>aws-marketplace</code> | <code>microsoft</code>) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console.</p> </li> <li> <p> <code>owner-id</code> - The AWS account ID of the image owner.</p> </li> <li> <p> <code>platform</code> - The platform. To only list Windows-based AMIs, use <code>windows</code>.</p> </li> <li> <p> <code>product-code</code> - The product code.</p> </li> <li> <p> <code>product-code.type</code> - The type of the product code (<code>devpay</code> | <code>marketplace</code>).</p> </li> <li> <p> <code>ramdisk-id</code> - The RAM disk ID.</p> </li> <li> <p> <code>root-device-name</code> - The name of the root device volume (for example, <code>/dev/sda1</code>).</p> </li> <li> <p> <code>root-device-type</code> - The type of the root device volume (<code>ebs</code> | <code>instance-store</code>).</p> </li> <li> <p> <code>state</code> - The state of the image (<code>available</code> | <code>pending</code> | <code>failed</code>).</p> </li> <li> <p> <code>state-reason-code</code> - The reason code for the state change.</p> </li> <li> <p> <code>state-reason-message</code> - The message for the state change.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>virtualization-type</code> - The virtualization type (<code>paravirtual</code> | <code>hvm</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more image IDs.</p> <p>Default: Describes all images available to you.</p>"]
    pub image_ids: Option<Vec<String>>,
    #[doc="<p>Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, regardless of ownership.</p>"]
    pub owners: Option<Vec<String>>,
}


/// Serialize `DescribeImagesRequest` contents to a `SignedRequest`.
struct DescribeImagesRequestSerializer;
impl DescribeImagesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeImagesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.executable_users {
            ExecutableByStringListSerializer::serialize(params,
                                                        &format!("{}{}", prefix, "ExecutableBy"),
                                                        field_value);
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.image_ids {
            ImageIdStringListSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "ImageId"),
                                                   field_value);
        }
        if let Some(ref field_value) = obj.owners {
            OwnerStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "Owner"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeImages.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeImagesResult {
    #[doc="<p>Information about one or more images.</p>"]
    pub images: Option<Vec<Image>>,
}

struct DescribeImagesResultDeserializer;
impl DescribeImagesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeImagesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeImagesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "imagesSet" => {
                            obj.images = Some(try!(ImageListDeserializer::deserialize("imagesSet",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeImportImageTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeImportImageTasksRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Filter tasks using the <code>task-state</code> filter and one of the following values: active, completed, deleting, deleted.</p>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>A list of import image task IDs.</p>"]
    pub import_task_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>A token that indicates the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeImportImageTasksRequest` contents to a `SignedRequest`.
struct DescribeImportImageTasksRequestSerializer;
impl DescribeImportImageTasksRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeImportImageTasksRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filters"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.import_task_ids {
            ImportTaskIdListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "ImportTaskId"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for DescribeImportImageTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeImportImageTasksResult {
    #[doc="<p>A list of zero or more import image tasks that are currently active or were completed or canceled in the previous 7 days.</p>"]
    pub import_image_tasks: Option<Vec<ImportImageTask>>,
    #[doc="<p>The token to use to get the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeImportImageTasksResultDeserializer;
impl DescribeImportImageTasksResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeImportImageTasksResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeImportImageTasksResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "importImageTaskSet" => {
                            obj.import_image_tasks =
                                Some(try!(ImportImageTaskListDeserializer::deserialize("importImageTaskSet",
                                                                                       stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeImportSnapshotTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeImportSnapshotTasksRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>A list of import snapshot task IDs.</p>"]
    pub import_task_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>A token that indicates the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeImportSnapshotTasksRequest` contents to a `SignedRequest`.
struct DescribeImportSnapshotTasksRequestSerializer;
impl DescribeImportSnapshotTasksRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeImportSnapshotTasksRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filters"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.import_task_ids {
            ImportTaskIdListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "ImportTaskId"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for DescribeImportSnapshotTasks.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeImportSnapshotTasksResult {
    #[doc="<p>A list of zero or more import snapshot tasks that are currently active or were completed or canceled in the previous 7 days.</p>"]
    pub import_snapshot_tasks: Option<Vec<ImportSnapshotTask>>,
    #[doc="<p>The token to use to get the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeImportSnapshotTasksResultDeserializer;
impl DescribeImportSnapshotTasksResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeImportSnapshotTasksResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeImportSnapshotTasksResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "importSnapshotTaskSet" => {
                            obj.import_snapshot_tasks =
                                Some(try!(ImportSnapshotTaskListDeserializer::deserialize("importSnapshotTaskSet",
                                                                                          stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeInstanceAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeInstanceAttributeRequest {
    #[doc="<p>The instance attribute.</p> <p>Note: The <code>enaSupport</code> attribute is not supported at this time.</p>"]
    pub attribute: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
}


/// Serialize `DescribeInstanceAttributeRequest` contents to a `SignedRequest`.
struct DescribeInstanceAttributeRequestSerializer;
impl DescribeInstanceAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeInstanceAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Attribute"),
                   &obj.attribute.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DescribeInstanceStatus.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeInstanceStatusRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone of the instance.</p> </li> <li> <p> <code>event.code</code> - The code for the scheduled event (<code>instance-reboot</code> | <code>system-reboot</code> | <code>system-maintenance</code> | <code>instance-retirement</code> | <code>instance-stop</code>).</p> </li> <li> <p> <code>event.description</code> - A description of the event.</p> </li> <li> <p> <code>event.not-after</code> - The latest end time for the scheduled event (for example, <code>2014-09-15T17:15:20.000Z</code>).</p> </li> <li> <p> <code>event.not-before</code> - The earliest start time for the scheduled event (for example, <code>2014-09-15T17:15:20.000Z</code>).</p> </li> <li> <p> <code>instance-state-code</code> - The code for the instance state, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).</p> </li> <li> <p> <code>instance-state-name</code> - The state of the instance (<code>pending</code> | <code>running</code> | <code>shutting-down</code> | <code>terminated</code> | <code>stopping</code> | <code>stopped</code>).</p> </li> <li> <p> <code>instance-status.reachability</code> - Filters on instance status where the name is <code>reachability</code> (<code>passed</code> | <code>failed</code> | <code>initializing</code> | <code>insufficient-data</code>).</p> </li> <li> <p> <code>instance-status.status</code> - The status of the instance (<code>ok</code> | <code>impaired</code> | <code>initializing</code> | <code>insufficient-data</code> | <code>not-applicable</code>).</p> </li> <li> <p> <code>system-status.reachability</code> - Filters on system status where the name is <code>reachability</code> (<code>passed</code> | <code>failed</code> | <code>initializing</code> | <code>insufficient-data</code>).</p> </li> <li> <p> <code>system-status.status</code> - The system status of the instance (<code>ok</code> | <code>impaired</code> | <code>initializing</code> | <code>insufficient-data</code> | <code>not-applicable</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>When <code>true</code>, includes the health status for all instances. When <code>false</code>, includes the health status for running instances only.</p> <p>Default: <code>false</code> </p>"]
    pub include_all_instances: Option<bool>,
    #[doc="<p>One or more instance IDs.</p> <p>Default: Describes all your instances.</p> <p>Constraints: Maximum 100 explicitly specified instance IDs.</p>"]
    pub instance_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeInstanceStatusRequest` contents to a `SignedRequest`.
struct DescribeInstanceStatusRequestSerializer;
impl DescribeInstanceStatusRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeInstanceStatusRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.include_all_instances {
            params.put(&format!("{}{}", prefix, "IncludeAllInstances"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_ids {
            InstanceIdStringListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "InstanceId"),
                                                      field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeInstanceStatus.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeInstanceStatusResult {
    #[doc="<p>One or more instance status descriptions.</p>"]
    pub instance_statuses: Option<Vec<InstanceStatus>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeInstanceStatusResultDeserializer;
impl DescribeInstanceStatusResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeInstanceStatusResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeInstanceStatusResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceStatusSet" => {
                            obj.instance_statuses =
                                Some(try!(InstanceStatusListDeserializer::deserialize("instanceStatusSet",
                                                                                      stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>affinity</code> - The affinity setting for an instance running on a Dedicated Host (<code>default</code> | <code>host</code>).</p> </li> <li> <p> <code>architecture</code> - The instance architecture (<code>i386</code> | <code>x86_64</code>).</p> </li> <li> <p> <code>availability-zone</code> - The Availability Zone of the instance.</p> </li> <li> <p> <code>block-device-mapping.attach-time</code> - The attach time for an EBS volume mapped to the instance, for example, <code>2010-09-15T17:15:20.000Z</code>.</p> </li> <li> <p> <code>block-device-mapping.delete-on-termination</code> - A Boolean that indicates whether the EBS volume is deleted on instance termination.</p> </li> <li> <p> <code>block-device-mapping.device-name</code> - The device name for the EBS volume (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p> </li> <li> <p> <code>block-device-mapping.status</code> - The status for the EBS volume (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p> </li> <li> <p> <code>block-device-mapping.volume-id</code> - The volume ID of the EBS volume.</p> </li> <li> <p> <code>client-token</code> - The idempotency token you provided when you launched the instance.</p> </li> <li> <p> <code>dns-name</code> - The public DNS name of the instance.</p> </li> <li> <p> <code>group-id</code> - The ID of the security group for the instance. EC2-Classic only.</p> </li> <li> <p> <code>group-name</code> - The name of the security group for the instance. EC2-Classic only.</p> </li> <li> <p> <code>host-id</code> - The ID of the Dedicated Host on which the instance is running, if applicable.</p> </li> <li> <p> <code>hypervisor</code> - The hypervisor type of the instance (<code>ovm</code> | <code>xen</code>).</p> </li> <li> <p> <code>iam-instance-profile.arn</code> - The instance profile associated with the instance. Specified as an ARN.</p> </li> <li> <p> <code>image-id</code> - The ID of the image used to launch the instance.</p> </li> <li> <p> <code>instance-id</code> - The ID of the instance.</p> </li> <li> <p> <code>instance-lifecycle</code> - Indicates whether this is a Spot Instance or a Scheduled Instance (<code>spot</code> | <code>scheduled</code>).</p> </li> <li> <p> <code>instance-state-code</code> - The state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).</p> </li> <li> <p> <code>instance-state-name</code> - The state of the instance (<code>pending</code> | <code>running</code> | <code>shutting-down</code> | <code>terminated</code> | <code>stopping</code> | <code>stopped</code>).</p> </li> <li> <p> <code>instance-type</code> - The type of instance (for example, <code>t2.micro</code>).</p> </li> <li> <p> <code>instance.group-id</code> - The ID of the security group for the instance. </p> </li> <li> <p> <code>instance.group-name</code> - The name of the security group for the instance. </p> </li> <li> <p> <code>ip-address</code> - The public IPv4 address of the instance.</p> </li> <li> <p> <code>kernel-id</code> - The kernel ID.</p> </li> <li> <p> <code>key-name</code> - The name of the key pair used when the instance was launched.</p> </li> <li> <p> <code>launch-index</code> - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on). </p> </li> <li> <p> <code>launch-time</code> - The time when the instance was launched.</p> </li> <li> <p> <code>monitoring-state</code> - Indicates whether detailed monitoring is enabled (<code>disabled</code> | <code>enabled</code>).</p> </li> <li> <p> <code>network-interface.addresses.private-ip-address</code> - The private IPv4 address associated with the network interface.</p> </li> <li> <p> <code>network-interface.addresses.primary</code> - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.</p> </li> <li> <p> <code>network-interface.addresses.association.public-ip</code> - The ID of the association of an Elastic IP address (IPv4) with a network interface.</p> </li> <li> <p> <code>network-interface.addresses.association.ip-owner-id</code> - The owner ID of the private IPv4 address associated with the network interface.</p> </li> <li> <p> <code>network-interface.association.public-ip</code> - The address of the Elastic IP address (IPv4) bound to the network interface.</p> </li> <li> <p> <code>network-interface.association.ip-owner-id</code> - The owner of the Elastic IP address (IPv4) associated with the network interface.</p> </li> <li> <p> <code>network-interface.association.allocation-id</code> - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.</p> </li> <li> <p> <code>network-interface.association.association-id</code> - The association ID returned when the network interface was associated with an IPv4 address.</p> </li> <li> <p> <code>network-interface.attachment.attachment-id</code> - The ID of the interface attachment.</p> </li> <li> <p> <code>network-interface.attachment.instance-id</code> - The ID of the instance to which the network interface is attached.</p> </li> <li> <p> <code>network-interface.attachment.instance-owner-id</code> - The owner ID of the instance to which the network interface is attached.</p> </li> <li> <p> <code>network-interface.attachment.device-index</code> - The device index to which the network interface is attached.</p> </li> <li> <p> <code>network-interface.attachment.status</code> - The status of the attachment (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p> </li> <li> <p> <code>network-interface.attachment.attach-time</code> - The time that the network interface was attached to an instance.</p> </li> <li> <p> <code>network-interface.attachment.delete-on-termination</code> - Specifies whether the attachment is deleted when an instance is terminated.</p> </li> <li> <p> <code>network-interface.availability-zone</code> - The Availability Zone for the network interface.</p> </li> <li> <p> <code>network-interface.description</code> - The description of the network interface.</p> </li> <li> <p> <code>network-interface.group-id</code> - The ID of a security group associated with the network interface.</p> </li> <li> <p> <code>network-interface.group-name</code> - The name of a security group associated with the network interface.</p> </li> <li> <p> <code>network-interface.ipv6-addresses.ipv6-address</code> - The IPv6 address associated with the network interface.</p> </li> <li> <p> <code>network-interface.mac-address</code> - The MAC address of the network interface.</p> </li> <li> <p> <code>network-interface.network-interface-id</code> - The ID of the network interface.</p> </li> <li> <p> <code>network-interface.owner-id</code> - The ID of the owner of the network interface.</p> </li> <li> <p> <code>network-interface.private-dns-name</code> - The private DNS name of the network interface.</p> </li> <li> <p> <code>network-interface.requester-id</code> - The requester ID for the network interface.</p> </li> <li> <p> <code>network-interface.requester-managed</code> - Indicates whether the network interface is being managed by AWS.</p> </li> <li> <p> <code>network-interface.status</code> - The status of the network interface (<code>available</code>) | <code>in-use</code>).</p> </li> <li> <p> <code>network-interface.source-dest-check</code> - Whether the network interface performs source/destination checking. A value of <code>true</code> means checking is enabled, and <code>false</code> means checking is disabled. The value must be <code>false</code> for the network interface to perform network address translation (NAT) in your VPC.</p> </li> <li> <p> <code>network-interface.subnet-id</code> - The ID of the subnet for the network interface.</p> </li> <li> <p> <code>network-interface.vpc-id</code> - The ID of the VPC for the network interface.</p> </li> <li> <p> <code>owner-id</code> - The AWS account ID of the instance owner.</p> </li> <li> <p> <code>placement-group-name</code> - The name of the placement group for the instance.</p> </li> <li> <p> <code>platform</code> - The platform. Use <code>windows</code> if you have Windows instances; otherwise, leave blank.</p> </li> <li> <p> <code>private-dns-name</code> - The private IPv4 DNS name of the instance.</p> </li> <li> <p> <code>private-ip-address</code> - The private IPv4 address of the instance.</p> </li> <li> <p> <code>product-code</code> - The product code associated with the AMI used to launch the instance.</p> </li> <li> <p> <code>product-code.type</code> - The type of product code (<code>devpay</code> | <code>marketplace</code>).</p> </li> <li> <p> <code>ramdisk-id</code> - The RAM disk ID.</p> </li> <li> <p> <code>reason</code> - The reason for the current state of the instance (for example, shows \"User Initiated [date]\" when you stop or terminate the instance). Similar to the state-reason-code filter.</p> </li> <li> <p> <code>requester-id</code> - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).</p> </li> <li> <p> <code>reservation-id</code> - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID.</p> </li> <li> <p> <code>root-device-name</code> - The name of the root device for the instance (for example, <code>/dev/sda1</code> or <code>/dev/xvda</code>).</p> </li> <li> <p> <code>root-device-type</code> - The type of root device that the instance uses (<code>ebs</code> | <code>instance-store</code>).</p> </li> <li> <p> <code>source-dest-check</code> - Indicates whether the instance performs source/destination checking. A value of <code>true</code> means that checking is enabled, and <code>false</code> means checking is disabled. The value must be <code>false</code> for the instance to perform network address translation (NAT) in your VPC. </p> </li> <li> <p> <code>spot-instance-request-id</code> - The ID of the Spot instance request.</p> </li> <li> <p> <code>state-reason-code</code> - The reason code for the state change.</p> </li> <li> <p> <code>state-reason-message</code> - A message that describes the state change.</p> </li> <li> <p> <code>subnet-id</code> - The ID of the subnet for the instance.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>tenancy</code> - The tenancy of an instance (<code>dedicated</code> | <code>default</code> | <code>host</code>).</p> </li> <li> <p> <code>virtualization-type</code> - The virtualization type of the instance (<code>paravirtual</code> | <code>hvm</code>).</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC that the instance is running in.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more instance IDs.</p> <p>Default: Describes all your instances.</p>"]
    pub instance_ids: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter or tag filters in the same call.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to request the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeInstancesRequest` contents to a `SignedRequest`.
struct DescribeInstancesRequestSerializer;
impl DescribeInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.instance_ids {
            InstanceIdStringListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "InstanceId"),
                                                      field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeInstancesResult {
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Zero or more reservations.</p>"]
    pub reservations: Option<Vec<Reservation>>,
}

struct DescribeInstancesResultDeserializer;
impl DescribeInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "reservationSet" => {
                            obj.reservations =
                                Some(try!(ReservationListDeserializer::deserialize("reservationSet",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeInternetGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeInternetGatewaysRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>attachment.state</code> - The current state of the attachment between the gateway and the VPC (<code>available</code>). Present only if a VPC is attached.</p> </li> <li> <p> <code>attachment.vpc-id</code> - The ID of an attached VPC.</p> </li> <li> <p> <code>internet-gateway-id</code> - The ID of the Internet gateway.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more Internet gateway IDs.</p> <p>Default: Describes all your Internet gateways.</p>"]
    pub internet_gateway_ids: Option<Vec<String>>,
}


/// Serialize `DescribeInternetGatewaysRequest` contents to a `SignedRequest`.
struct DescribeInternetGatewaysRequestSerializer;
impl DescribeInternetGatewaysRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeInternetGatewaysRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.internet_gateway_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "InternetGatewayId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeInternetGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeInternetGatewaysResult {
    #[doc="<p>Information about one or more Internet gateways.</p>"]
    pub internet_gateways: Option<Vec<InternetGateway>>,
}

struct DescribeInternetGatewaysResultDeserializer;
impl DescribeInternetGatewaysResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeInternetGatewaysResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeInternetGatewaysResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "internetGatewaySet" => {
                            obj.internet_gateways =
                                Some(try!(InternetGatewayListDeserializer::deserialize("internetGatewaySet",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeKeyPairs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeKeyPairsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>fingerprint</code> - The fingerprint of the key pair.</p> </li> <li> <p> <code>key-name</code> - The name of the key pair.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more key pair names.</p> <p>Default: Describes all your key pairs.</p>"]
    pub key_names: Option<Vec<String>>,
}


/// Serialize `DescribeKeyPairsRequest` contents to a `SignedRequest`.
struct DescribeKeyPairsRequestSerializer;
impl DescribeKeyPairsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeKeyPairsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.key_names {
            KeyNameStringListSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "KeyName"),
                                                   field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeKeyPairs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeKeyPairsResult {
    #[doc="<p>Information about one or more key pairs.</p>"]
    pub key_pairs: Option<Vec<KeyPairInfo>>,
}

struct DescribeKeyPairsResultDeserializer;
impl DescribeKeyPairsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeKeyPairsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeKeyPairsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "keySet" => {
                            obj.key_pairs = Some(try!(KeyPairListDeserializer::deserialize("keySet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeMovingAddresses.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeMovingAddressesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>moving-status</code> - The status of the Elastic IP address (<code>MovingToVpc</code> | <code>RestoringToClassic</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1000; if <code>MaxResults</code> is given a value outside of this range, an error is returned.</p> <p>Default: If no value is provided, the default is 1000.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to use to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more Elastic IP addresses.</p>"]
    pub public_ips: Option<Vec<String>>,
}


/// Serialize `DescribeMovingAddressesRequest` contents to a `SignedRequest`.
struct DescribeMovingAddressesRequestSerializer;
impl DescribeMovingAddressesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeMovingAddressesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.public_ips {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "PublicIp"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeMovingAddresses.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeMovingAddressesResult {
    #[doc="<p>The status for each Elastic IP address.</p>"]
    pub moving_address_statuses: Option<Vec<MovingAddressStatus>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeMovingAddressesResultDeserializer;
impl DescribeMovingAddressesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeMovingAddressesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeMovingAddressesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "movingAddressStatusSet" => {
                            obj.moving_address_statuses =
                                Some(try!(MovingAddressStatusSetDeserializer::deserialize("movingAddressStatusSet",
                                                                                          stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeNatGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNatGatewaysRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>nat-gateway-id</code> - The ID of the NAT gateway.</p> </li> <li> <p> <code>state</code> - The state of the NAT gateway (<code>pending</code> | <code>failed</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p> </li> <li> <p> <code>subnet-id</code> - The ID of the subnet in which the NAT gateway resides.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC in which the NAT gateway resides.</p> </li> </ul>"]
    pub filter: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p> <p>Constraint: If the value specified is greater than 1000, we return only 1000 items.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>One or more NAT gateway IDs.</p>"]
    pub nat_gateway_ids: Option<Vec<String>>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeNatGatewaysRequest` contents to a `SignedRequest`.
struct DescribeNatGatewaysRequestSerializer;
impl DescribeNatGatewaysRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeNatGatewaysRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filter {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.nat_gateway_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "NatGatewayId"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeNatGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNatGatewaysResult {
    #[doc="<p>Information about the NAT gateways.</p>"]
    pub nat_gateways: Option<Vec<NatGateway>>,
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
}

struct DescribeNatGatewaysResultDeserializer;
impl DescribeNatGatewaysResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeNatGatewaysResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeNatGatewaysResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "natGatewaySet" => {
                            obj.nat_gateways =
                                Some(try!(NatGatewayListDeserializer::deserialize("natGatewaySet",
                                                                                  stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeNetworkAcls.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkAclsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>association.association-id</code> - The ID of an association ID for the ACL.</p> </li> <li> <p> <code>association.network-acl-id</code> - The ID of the network ACL involved in the association.</p> </li> <li> <p> <code>association.subnet-id</code> - The ID of the subnet involved in the association.</p> </li> <li> <p> <code>default</code> - Indicates whether the ACL is the default network ACL for the VPC.</p> </li> <li> <p> <code>entry.cidr</code> - The IPv4 CIDR range specified in the entry.</p> </li> <li> <p> <code>entry.egress</code> - Indicates whether the entry applies to egress traffic.</p> </li> <li> <p> <code>entry.icmp.code</code> - The ICMP code specified in the entry, if any.</p> </li> <li> <p> <code>entry.icmp.type</code> - The ICMP type specified in the entry, if any.</p> </li> <li> <p> <code>entry.ipv6-cidr</code> - The IPv6 CIDR range specified in the entry.</p> </li> <li> <p> <code>entry.port-range.from</code> - The start of the port range specified in the entry. </p> </li> <li> <p> <code>entry.port-range.to</code> - The end of the port range specified in the entry. </p> </li> <li> <p> <code>entry.protocol</code> - The protocol specified in the entry (<code>tcp</code> | <code>udp</code> | <code>icmp</code> or a protocol number).</p> </li> <li> <p> <code>entry.rule-action</code> - Allows or denies the matching traffic (<code>allow</code> | <code>deny</code>).</p> </li> <li> <p> <code>entry.rule-number</code> - The number of an entry (in other words, rule) in the ACL's set of entries.</p> </li> <li> <p> <code>network-acl-id</code> - The ID of the network ACL.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC for the network ACL.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more network ACL IDs.</p> <p>Default: Describes all your network ACLs.</p>"]
    pub network_acl_ids: Option<Vec<String>>,
}


/// Serialize `DescribeNetworkAclsRequest` contents to a `SignedRequest`.
struct DescribeNetworkAclsRequestSerializer;
impl DescribeNetworkAclsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeNetworkAclsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.network_acl_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "NetworkAclId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeNetworkAcls.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkAclsResult {
    #[doc="<p>Information about one or more network ACLs.</p>"]
    pub network_acls: Option<Vec<NetworkAcl>>,
}

struct DescribeNetworkAclsResultDeserializer;
impl DescribeNetworkAclsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeNetworkAclsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeNetworkAclsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "networkAclSet" => {
                            obj.network_acls =
                                Some(try!(NetworkAclListDeserializer::deserialize("networkAclSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeNetworkInterfaceAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkInterfaceAttributeRequest {
    #[doc="<p>The attribute of the network interface. This parameter is required.</p>"]
    pub attribute: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
}


/// Serialize `DescribeNetworkInterfaceAttributeRequest` contents to a `SignedRequest`.
struct DescribeNetworkInterfaceAttributeRequestSerializer;
impl DescribeNetworkInterfaceAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeNetworkInterfaceAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attribute {
            params.put(&format!("{}{}", prefix, "Attribute"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DescribeNetworkInterfaceAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkInterfaceAttributeResult {
    #[doc="<p>The attachment (if any) of the network interface.</p>"]
    pub attachment: Option<NetworkInterfaceAttachment>,
    #[doc="<p>The description of the network interface.</p>"]
    pub description: Option<AttributeValue>,
    #[doc="<p>The security groups associated with the network interface.</p>"]
    pub groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>Indicates whether source/destination checking is enabled.</p>"]
    pub source_dest_check: Option<AttributeBooleanValue>,
}

struct DescribeNetworkInterfaceAttributeResultDeserializer;
impl DescribeNetworkInterfaceAttributeResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeNetworkInterfaceAttributeResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeNetworkInterfaceAttributeResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachment" => {
                            obj.attachment = Some(try!(NetworkInterfaceAttachmentDeserializer::deserialize("attachment", stack)));
                        }
                        "description" => {
                            obj.description =
                                Some(try!(AttributeValueDeserializer::deserialize("description",
                                                                                  stack)));
                        }
                        "groupSet" => {
                            obj.groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "sourceDestCheck" => {
                            obj.source_dest_check =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("sourceDestCheck",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeNetworkInterfacePermissions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkInterfacePermissionsRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>network-interface-permission.network-interface-permission-id</code> - The ID of the permission.</p> </li> <li> <p> <code>network-interface-permission.network-interface-id</code> - The ID of the network interface.</p> </li> <li> <p> <code>network-interface-permission.aws-account-id</code> - The AWS account ID.</p> </li> <li> <p> <code>network-interface-permission.aws-service</code> - The AWS service.</p> </li> <li> <p> <code>network-interface-permission.permission</code> - The type of permission (<code>INSTANCE-ATTACH</code> | <code>EIP-ASSOCIATE</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value. If this parameter is not specified, up to 50 results are returned by default.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>One or more network interface permission IDs.</p>"]
    pub network_interface_permission_ids: Option<Vec<String>>,
    #[doc="<p>The token to request the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeNetworkInterfacePermissionsRequest` contents to a `SignedRequest`.
struct DescribeNetworkInterfacePermissionsRequestSerializer;
impl DescribeNetworkInterfacePermissionsRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &DescribeNetworkInterfacePermissionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.network_interface_permission_ids {
            NetworkInterfacePermissionIdListSerializer::serialize(params,
                                                                  &format!("{}{}",
                                                                          prefix,
                                                                          "NetworkInterfacePermissionId"),
                                                                  field_value);
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for DescribeNetworkInterfacePermissions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkInterfacePermissionsResult {
    #[doc="<p>The network interface permissions.</p>"]
    pub network_interface_permissions: Option<Vec<NetworkInterfacePermission>>,
    #[doc="<p>The token to use to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}

struct DescribeNetworkInterfacePermissionsResultDeserializer;
impl DescribeNetworkInterfacePermissionsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeNetworkInterfacePermissionsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeNetworkInterfacePermissionsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "networkInterfacePermissions" => {
                            obj.network_interface_permissions = Some(try!(NetworkInterfacePermissionListDeserializer::deserialize("networkInterfacePermissions", stack)));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeNetworkInterfaces.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkInterfacesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>addresses.private-ip-address</code> - The private IPv4 addresses associated with the network interface.</p> </li> <li> <p> <code>addresses.primary</code> - Whether the private IPv4 address is the primary IP address associated with the network interface. </p> </li> <li> <p> <code>addresses.association.public-ip</code> - The association ID returned when the network interface was associated with the Elastic IP address (IPv4).</p> </li> <li> <p> <code>addresses.association.owner-id</code> - The owner ID of the addresses associated with the network interface.</p> </li> <li> <p> <code>association.association-id</code> - The association ID returned when the network interface was associated with an IPv4 address.</p> </li> <li> <p> <code>association.allocation-id</code> - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.</p> </li> <li> <p> <code>association.ip-owner-id</code> - The owner of the Elastic IP address (IPv4) associated with the network interface.</p> </li> <li> <p> <code>association.public-ip</code> - The address of the Elastic IP address (IPv4) bound to the network interface.</p> </li> <li> <p> <code>association.public-dns-name</code> - The public DNS name for the network interface (IPv4).</p> </li> <li> <p> <code>attachment.attachment-id</code> - The ID of the interface attachment.</p> </li> <li> <p> <code>attachment.attach.time</code> - The time that the network interface was attached to an instance.</p> </li> <li> <p> <code>attachment.delete-on-termination</code> - Indicates whether the attachment is deleted when an instance is terminated.</p> </li> <li> <p> <code>attachment.device-index</code> - The device index to which the network interface is attached.</p> </li> <li> <p> <code>attachment.instance-id</code> - The ID of the instance to which the network interface is attached.</p> </li> <li> <p> <code>attachment.instance-owner-id</code> - The owner ID of the instance to which the network interface is attached.</p> </li> <li> <p> <code>attachment.nat-gateway-id</code> - The ID of the NAT gateway to which the network interface is attached.</p> </li> <li> <p> <code>attachment.status</code> - The status of the attachment (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p> </li> <li> <p> <code>availability-zone</code> - The Availability Zone of the network interface.</p> </li> <li> <p> <code>description</code> - The description of the network interface.</p> </li> <li> <p> <code>group-id</code> - The ID of a security group associated with the network interface.</p> </li> <li> <p> <code>group-name</code> - The name of a security group associated with the network interface.</p> </li> <li> <p> <code>ipv6-addresses.ipv6-address</code> - An IPv6 address associated with the network interface.</p> </li> <li> <p> <code>mac-address</code> - The MAC address of the network interface.</p> </li> <li> <p> <code>network-interface-id</code> - The ID of the network interface.</p> </li> <li> <p> <code>owner-id</code> - The AWS account ID of the network interface owner.</p> </li> <li> <p> <code>private-ip-address</code> - The private IPv4 address or addresses of the network interface.</p> </li> <li> <p> <code>private-dns-name</code> - The private DNS name of the network interface (IPv4).</p> </li> <li> <p> <code>requester-id</code> - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).</p> </li> <li> <p> <code>requester-managed</code> - Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on).</p> </li> <li> <p> <code>source-desk-check</code> - Indicates whether the network interface performs source/destination checking. A value of <code>true</code> means checking is enabled, and <code>false</code> means checking is disabled. The value must be <code>false</code> for the network interface to perform network address translation (NAT) in your VPC. </p> </li> <li> <p> <code>status</code> - The status of the network interface. If the network interface is not attached to an instance, the status is <code>available</code>; if a network interface is attached to an instance the status is <code>in-use</code>.</p> </li> <li> <p> <code>subnet-id</code> - The ID of the subnet for the network interface.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC for the network interface.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more network interface IDs.</p> <p>Default: Describes all your network interfaces.</p>"]
    pub network_interface_ids: Option<Vec<String>>,
}


/// Serialize `DescribeNetworkInterfacesRequest` contents to a `SignedRequest`.
struct DescribeNetworkInterfacesRequestSerializer;
impl DescribeNetworkInterfacesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeNetworkInterfacesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.network_interface_ids {
            NetworkInterfaceIdListSerializer::serialize(params,
                                                        &format!("{}{}",
                                                                prefix,
                                                                "NetworkInterfaceId"),
                                                        field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeNetworkInterfaces.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeNetworkInterfacesResult {
    #[doc="<p>Information about one or more network interfaces.</p>"]
    pub network_interfaces: Option<Vec<NetworkInterface>>,
}

struct DescribeNetworkInterfacesResultDeserializer;
impl DescribeNetworkInterfacesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeNetworkInterfacesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeNetworkInterfacesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "networkInterfaceSet" => {
                            obj.network_interfaces =
                                Some(try!(NetworkInterfaceListDeserializer::deserialize("networkInterfaceSet",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribePlacementGroups.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribePlacementGroupsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>group-name</code> - The name of the placement group.</p> </li> <li> <p> <code>state</code> - The state of the placement group (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p> </li> <li> <p> <code>strategy</code> - The strategy of the placement group (<code>cluster</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more placement group names.</p> <p>Default: Describes all your placement groups, or only those otherwise specified.</p>"]
    pub group_names: Option<Vec<String>>,
}


/// Serialize `DescribePlacementGroupsRequest` contents to a `SignedRequest`.
struct DescribePlacementGroupsRequestSerializer;
impl DescribePlacementGroupsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribePlacementGroupsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.group_names {
            PlacementGroupStringListSerializer::serialize(params,
                                                          &format!("{}{}", prefix, "GroupName"),
                                                          field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribePlacementGroups.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribePlacementGroupsResult {
    #[doc="<p>One or more placement groups.</p>"]
    pub placement_groups: Option<Vec<PlacementGroup>>,
}

struct DescribePlacementGroupsResultDeserializer;
impl DescribePlacementGroupsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribePlacementGroupsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribePlacementGroupsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "placementGroupSet" => {
                            obj.placement_groups =
                                Some(try!(PlacementGroupListDeserializer::deserialize("placementGroupSet",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribePrefixLists.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribePrefixListsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>prefix-list-id</code>: The ID of a prefix list.</p> </li> <li> <p> <code>prefix-list-name</code>: The name of a prefix list.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p> <p>Constraint: If the value specified is greater than 1000, we return only 1000 items.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of items to return. (You received this token from a prior call.)</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more prefix list IDs.</p>"]
    pub prefix_list_ids: Option<Vec<String>>,
}


/// Serialize `DescribePrefixListsRequest` contents to a `SignedRequest`.
struct DescribePrefixListsRequestSerializer;
impl DescribePrefixListsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribePrefixListsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.prefix_list_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "PrefixListId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribePrefixLists.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribePrefixListsResult {
    #[doc="<p>The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>All available prefix lists.</p>"]
    pub prefix_lists: Option<Vec<PrefixList>>,
}

struct DescribePrefixListsResultDeserializer;
impl DescribePrefixListsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribePrefixListsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribePrefixListsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "prefixListSet" => {
                            obj.prefix_lists =
                                Some(try!(PrefixListSetDeserializer::deserialize("prefixListSet",
                                                                                 stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeRegions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeRegionsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>endpoint</code> - The endpoint of the region (for example, <code>ec2.us-east-1.amazonaws.com</code>).</p> </li> <li> <p> <code>region-name</code> - The name of the region (for example, <code>us-east-1</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The names of one or more regions.</p>"]
    pub region_names: Option<Vec<String>>,
}


/// Serialize `DescribeRegionsRequest` contents to a `SignedRequest`.
struct DescribeRegionsRequestSerializer;
impl DescribeRegionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeRegionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.region_names {
            RegionNameStringListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "RegionName"),
                                                      field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeRegions.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeRegionsResult {
    #[doc="<p>Information about one or more regions.</p>"]
    pub regions: Option<Vec<Region>>,
}

struct DescribeRegionsResultDeserializer;
impl DescribeRegionsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeRegionsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeRegionsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "regionInfo" => {
                            obj.regions = Some(try!(RegionListDeserializer::deserialize("regionInfo",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeReservedInstancesListings.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesListingsRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>reserved-instances-id</code> - The ID of the Reserved Instances.</p> </li> <li> <p> <code>reserved-instances-listing-id</code> - The ID of the Reserved Instances listing.</p> </li> <li> <p> <code>status</code> - The status of the Reserved Instance listing (<code>pending</code> | <code>active</code> | <code>cancelled</code> | <code>closed</code>).</p> </li> <li> <p> <code>status-message</code> - The reason for the status.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more Reserved Instance IDs.</p>"]
    pub reserved_instances_id: Option<String>,
    #[doc="<p>One or more Reserved Instance listing IDs.</p>"]
    pub reserved_instances_listing_id: Option<String>,
}


/// Serialize `DescribeReservedInstancesListingsRequest` contents to a `SignedRequest`.
struct DescribeReservedInstancesListingsRequestSerializer;
impl DescribeReservedInstancesListingsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeReservedInstancesListingsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.reserved_instances_id {
            params.put(&format!("{}{}", prefix, "ReservedInstancesId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.reserved_instances_listing_id {
            params.put(&format!("{}{}", prefix, "ReservedInstancesListingId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeReservedInstancesListings.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesListingsResult {
    #[doc="<p>Information about the Reserved Instance listing.</p>"]
    pub reserved_instances_listings: Option<Vec<ReservedInstancesListing>>,
}

struct DescribeReservedInstancesListingsResultDeserializer;
impl DescribeReservedInstancesListingsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeReservedInstancesListingsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeReservedInstancesListingsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesListingsSet" => {
                            obj.reserved_instances_listings = Some(try!(ReservedInstancesListingListDeserializer::deserialize("reservedInstancesListingsSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeReservedInstancesModifications.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesModificationsRequest {
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>client-token</code> - The idempotency token for the modification request.</p> </li> <li> <p> <code>create-date</code> - The time when the modification request was created.</p> </li> <li> <p> <code>effective-date</code> - The time when the modification becomes effective.</p> </li> <li> <p> <code>modification-result.reserved-instances-id</code> - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is <code>fulfilled</code>.</p> </li> <li> <p> <code>modification-result.target-configuration.availability-zone</code> - The Availability Zone for the new Reserved Instances.</p> </li> <li> <p> <code>modification-result.target-configuration.instance-count </code> - The number of new Reserved Instances.</p> </li> <li> <p> <code>modification-result.target-configuration.instance-type</code> - The instance type of the new Reserved Instances.</p> </li> <li> <p> <code>modification-result.target-configuration.platform</code> - The network platform of the new Reserved Instances (<code>EC2-Classic</code> | <code>EC2-VPC</code>).</p> </li> <li> <p> <code>reserved-instances-id</code> - The ID of the Reserved Instances modified.</p> </li> <li> <p> <code>reserved-instances-modification-id</code> - The ID of the modification request.</p> </li> <li> <p> <code>status</code> - The status of the Reserved Instances modification request (<code>processing</code> | <code>fulfilled</code> | <code>failed</code>).</p> </li> <li> <p> <code>status-message</code> - The reason for the status.</p> </li> <li> <p> <code>update-date</code> - The time when the modification request was last updated.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>IDs for the submitted modification request.</p>"]
    pub reserved_instances_modification_ids: Option<Vec<String>>,
}


/// Serialize `DescribeReservedInstancesModificationsRequest` contents to a `SignedRequest`.
struct DescribeReservedInstancesModificationsRequestSerializer;
impl DescribeReservedInstancesModificationsRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &DescribeReservedInstancesModificationsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.reserved_instances_modification_ids {
            ReservedInstancesModificationIdStringListSerializer::serialize(params,
                                                                           &format!("{}{}",
                                                                                   prefix,
                                                                                   "ReservedInstancesModificationId"),
                                                                           field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeReservedInstancesModifications.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesModificationsResult {
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The Reserved Instance modification information.</p>"]
    pub reserved_instances_modifications: Option<Vec<ReservedInstancesModification>>,
}

struct DescribeReservedInstancesModificationsResultDeserializer;
impl DescribeReservedInstancesModificationsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeReservedInstancesModificationsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeReservedInstancesModificationsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "reservedInstancesModificationsSet" => {
                            obj.reserved_instances_modifications = Some(try!(ReservedInstancesModificationListDeserializer::deserialize("reservedInstancesModificationsSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeReservedInstancesOfferings.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesOfferingsRequest {
    #[doc="<p>The Availability Zone in which the Reserved Instance can be used.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone where the Reserved Instance can be used.</p> </li> <li> <p> <code>duration</code> - The duration of the Reserved Instance (for example, one year or three years), in seconds (<code>31536000</code> | <code>94608000</code>).</p> </li> <li> <p> <code>fixed-price</code> - The purchase price of the Reserved Instance (for example, 9800.0).</p> </li> <li> <p> <code>instance-type</code> - The instance type that is covered by the reservation.</p> </li> <li> <p> <code>marketplace</code> - Set to <code>true</code> to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed.</p> </li> <li> <p> <code>product-description</code> - The Reserved Instance product platform description. Instances that include <code>(Amazon VPC)</code> in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (<code>Linux/UNIX</code> | <code>Linux/UNIX (Amazon VPC)</code> | <code>SUSE Linux</code> | <code>SUSE Linux (Amazon VPC)</code> | <code>Red Hat Enterprise Linux</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> | <code>Windows</code> | <code>Windows (Amazon VPC)</code> | <code>Windows with SQL Server Standard</code> | <code>Windows with SQL Server Standard (Amazon VPC)</code> | <code>Windows with SQL Server Web</code> | <code> Windows with SQL Server Web (Amazon VPC)</code> | <code>Windows with SQL Server Enterprise</code> | <code>Windows with SQL Server Enterprise (Amazon VPC)</code>) </p> </li> <li> <p> <code>reserved-instances-offering-id</code> - The Reserved Instances offering ID.</p> </li> <li> <p> <code>scope</code> - The scope of the Reserved Instance (<code>Availability Zone</code> or <code>Region</code>).</p> </li> <li> <p> <code>usage-price</code> - The usage price of the Reserved Instance, per hour (for example, 0.84).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>Include Reserved Instance Marketplace offerings in the response.</p>"]
    pub include_marketplace: Option<bool>,
    #[doc="<p>The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of <code>dedicated</code> is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).</p> <p> <b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p> <p>Default: <code>default</code> </p>"]
    pub instance_tenancy: Option<String>,
    #[doc="<p>The instance type that the reservation will cover (for example, <code>m1.small</code>). For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html\">Instance Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The maximum duration (in seconds) to filter when searching for offerings.</p> <p>Default: 94608000 (3 years)</p>"]
    pub max_duration: Option<i64>,
    #[doc="<p>The maximum number of instances to filter when searching for offerings.</p> <p>Default: 20</p>"]
    pub max_instance_count: Option<i64>,
    #[doc="<p>The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. The maximum is 100.</p> <p>Default: 100</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The minimum duration (in seconds) to filter when searching for offerings.</p> <p>Default: 2592000 (1 month)</p>"]
    pub min_duration: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The offering class of the Reserved Instance. Can be <code>standard</code> or <code>convertible</code>.</p>"]
    pub offering_class: Option<String>,
    #[doc="<p>The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the <code>Medium Utilization</code> Reserved Instance offering type. </p>"]
    pub offering_type: Option<String>,
    #[doc="<p>The Reserved Instance product platform description. Instances that include <code>(Amazon VPC)</code> in the description are for use with Amazon VPC.</p>"]
    pub product_description: Option<String>,
    #[doc="<p>One or more Reserved Instances offering IDs.</p>"]
    pub reserved_instances_offering_ids: Option<Vec<String>>,
}


/// Serialize `DescribeReservedInstancesOfferingsRequest` contents to a `SignedRequest`.
struct DescribeReservedInstancesOfferingsRequestSerializer;
impl DescribeReservedInstancesOfferingsRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &DescribeReservedInstancesOfferingsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.include_marketplace {
            params.put(&format!("{}{}", prefix, "IncludeMarketplace"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_tenancy {
            params.put(&format!("{}{}", prefix, "InstanceTenancy"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_type {
            params.put(&format!("{}{}", prefix, "InstanceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_duration {
            params.put(&format!("{}{}", prefix, "MaxDuration"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_instance_count {
            params.put(&format!("{}{}", prefix, "MaxInstanceCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.min_duration {
            params.put(&format!("{}{}", prefix, "MinDuration"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.offering_class {
            params.put(&format!("{}{}", prefix, "OfferingClass"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.offering_type {
            params.put(&format!("{}{}", prefix, "OfferingType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.product_description {
            params.put(&format!("{}{}", prefix, "ProductDescription"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.reserved_instances_offering_ids {
            ReservedInstancesOfferingIdStringListSerializer::serialize(params,
                                                                       &format!("{}{}",
                                                                               prefix,
                                                                               "ReservedInstancesOfferingId"),
                                                                       field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeReservedInstancesOfferings.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesOfferingsResult {
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>A list of Reserved Instances offerings.</p>"]
    pub reserved_instances_offerings: Option<Vec<ReservedInstancesOffering>>,
}

struct DescribeReservedInstancesOfferingsResultDeserializer;
impl DescribeReservedInstancesOfferingsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeReservedInstancesOfferingsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeReservedInstancesOfferingsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "reservedInstancesOfferingsSet" => {
                            obj.reserved_instances_offerings = Some(try!(ReservedInstancesOfferingListDeserializer::deserialize("reservedInstancesOfferingsSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeReservedInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone where the Reserved Instance can be used.</p> </li> <li> <p> <code>duration</code> - The duration of the Reserved Instance (one year or three years), in seconds (<code>31536000</code> | <code>94608000</code>).</p> </li> <li> <p> <code>end</code> - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).</p> </li> <li> <p> <code>fixed-price</code> - The purchase price of the Reserved Instance (for example, 9800.0).</p> </li> <li> <p> <code>instance-type</code> - The instance type that is covered by the reservation.</p> </li> <li> <p> <code>scope</code> - The scope of the Reserved Instance (<code>Region</code> or <code>Availability Zone</code>).</p> </li> <li> <p> <code>product-description</code> - The Reserved Instance product platform description. Instances that include <code>(Amazon VPC)</code> in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC (<code>Linux/UNIX</code> | <code>Linux/UNIX (Amazon VPC)</code> | <code>SUSE Linux</code> | <code>SUSE Linux (Amazon VPC)</code> | <code>Red Hat Enterprise Linux</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> | <code>Windows</code> | <code>Windows (Amazon VPC)</code> | <code>Windows with SQL Server Standard</code> | <code>Windows with SQL Server Standard (Amazon VPC)</code> | <code>Windows with SQL Server Web</code> | <code>Windows with SQL Server Web (Amazon VPC)</code> | <code>Windows with SQL Server Enterprise</code> | <code>Windows with SQL Server Enterprise (Amazon VPC)</code>).</p> </li> <li> <p> <code>reserved-instances-id</code> - The ID of the Reserved Instance.</p> </li> <li> <p> <code>start</code> - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).</p> </li> <li> <p> <code>state</code> - The state of the Reserved Instance (<code>payment-pending</code> | <code>active</code> | <code>payment-failed</code> | <code>retired</code>).</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>usage-price</code> - The usage price of the Reserved Instance, per hour (for example, 0.84).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>Describes whether the Reserved Instance is Standard or Convertible.</p>"]
    pub offering_class: Option<String>,
    #[doc="<p>The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the <code>Medium Utilization</code> Reserved Instance offering type.</p>"]
    pub offering_type: Option<String>,
    #[doc="<p>One or more Reserved Instance IDs.</p> <p>Default: Describes all your Reserved Instances, or only those otherwise specified.</p>"]
    pub reserved_instances_ids: Option<Vec<String>>,
}


/// Serialize `DescribeReservedInstancesRequest` contents to a `SignedRequest`.
struct DescribeReservedInstancesRequestSerializer;
impl DescribeReservedInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeReservedInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.offering_class {
            params.put(&format!("{}{}", prefix, "OfferingClass"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.offering_type {
            params.put(&format!("{}{}", prefix, "OfferingType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.reserved_instances_ids {
            ReservedInstancesIdStringListSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "ReservedInstancesId"),
                                                               field_value);
        }

    }
}

#[doc="<p>Contains the output for DescribeReservedInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeReservedInstancesResult {
    #[doc="<p>A list of Reserved Instances.</p>"]
    pub reserved_instances: Option<Vec<ReservedInstances>>,
}

struct DescribeReservedInstancesResultDeserializer;
impl DescribeReservedInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeReservedInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeReservedInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesSet" => {
                            obj.reserved_instances =
                                Some(try!(ReservedInstancesListDeserializer::deserialize("reservedInstancesSet",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeRouteTables.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeRouteTablesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>association.route-table-association-id</code> - The ID of an association ID for the route table.</p> </li> <li> <p> <code>association.route-table-id</code> - The ID of the route table involved in the association.</p> </li> <li> <p> <code>association.subnet-id</code> - The ID of the subnet involved in the association.</p> </li> <li> <p> <code>association.main</code> - Indicates whether the route table is the main route table for the VPC (<code>true</code> | <code>false</code>). Route tables that do not have an association ID are not returned in the response.</p> </li> <li> <p> <code>route-table-id</code> - The ID of the route table.</p> </li> <li> <p> <code>route.destination-cidr-block</code> - The IPv4 CIDR range specified in a route in the table.</p> </li> <li> <p> <code>route.destination-ipv6-cidr-block</code> - The IPv6 CIDR range specified in a route in the route table.</p> </li> <li> <p> <code>route.destination-prefix-list-id</code> - The ID (prefix) of the AWS service specified in a route in the table.</p> </li> <li> <p> <code>route.egress-only-internet-gateway-id</code> - The ID of an egress-only Internet gateway specified in a route in the route table.</p> </li> <li> <p> <code>route.gateway-id</code> - The ID of a gateway specified in a route in the table.</p> </li> <li> <p> <code>route.instance-id</code> - The ID of an instance specified in a route in the table.</p> </li> <li> <p> <code>route.nat-gateway-id</code> - The ID of a NAT gateway.</p> </li> <li> <p> <code>route.origin</code> - Describes how the route was created. <code>CreateRouteTable</code> indicates that the route was automatically created when the route table was created; <code>CreateRoute</code> indicates that the route was manually added to the route table; <code>EnableVgwRoutePropagation</code> indicates that the route was propagated by route propagation.</p> </li> <li> <p> <code>route.state</code> - The state of a route in the route table (<code>active</code> | <code>blackhole</code>). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on).</p> </li> <li> <p> <code>route.vpc-peering-connection-id</code> - The ID of a VPC peering connection specified in a route in the table.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC for the route table.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more route table IDs.</p> <p>Default: Describes all your route tables.</p>"]
    pub route_table_ids: Option<Vec<String>>,
}


/// Serialize `DescribeRouteTablesRequest` contents to a `SignedRequest`.
struct DescribeRouteTablesRequestSerializer;
impl DescribeRouteTablesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeRouteTablesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.route_table_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "RouteTableId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeRouteTables.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeRouteTablesResult {
    #[doc="<p>Information about one or more route tables.</p>"]
    pub route_tables: Option<Vec<RouteTable>>,
}

struct DescribeRouteTablesResultDeserializer;
impl DescribeRouteTablesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeRouteTablesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeRouteTablesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "routeTableSet" => {
                            obj.route_tables =
                                Some(try!(RouteTableListDeserializer::deserialize("routeTableSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeScheduledInstanceAvailability.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeScheduledInstanceAvailabilityRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone (for example, <code>us-west-2a</code>).</p> </li> <li> <p> <code>instance-type</code> - The instance type (for example, <code>c4.large</code>).</p> </li> <li> <p> <code>network-platform</code> - The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p> </li> <li> <p> <code>platform</code> - The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The time period for the first schedule to start.</p>"]
    pub first_slot_start_time_range: SlotDateTimeRangeRequest,
    #[doc="<p>The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The maximum available duration, in hours. This value must be greater than <code>MinSlotDurationInHours</code> and less than 1,720.</p>"]
    pub max_slot_duration_in_hours: Option<i64>,
    #[doc="<p>The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.</p>"]
    pub min_slot_duration_in_hours: Option<i64>,
    #[doc="<p>The token for the next set of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The schedule recurrence.</p>"]
    pub recurrence: ScheduledInstanceRecurrenceRequest,
}


/// Serialize `DescribeScheduledInstanceAvailabilityRequest` contents to a `SignedRequest`.
struct DescribeScheduledInstanceAvailabilityRequestSerializer;
impl DescribeScheduledInstanceAvailabilityRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &DescribeScheduledInstanceAvailabilityRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        SlotDateTimeRangeRequestSerializer::serialize(params,
                                                      &format!("{}{}",
                                                              prefix,
                                                              "FirstSlotStartTimeRange"),
                                                      &obj.first_slot_start_time_range);
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_slot_duration_in_hours {
            params.put(&format!("{}{}", prefix, "MaxSlotDurationInHours"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.min_slot_duration_in_hours {
            params.put(&format!("{}{}", prefix, "MinSlotDurationInHours"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        ScheduledInstanceRecurrenceRequestSerializer::serialize(params,
                                                                &format!("{}{}",
                                                                        prefix,
                                                                        "Recurrence"),
                                                                &obj.recurrence);

    }
}

#[doc="<p>Contains the output of DescribeScheduledInstanceAvailability.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeScheduledInstanceAvailabilityResult {
    #[doc="<p>The token required to retrieve the next set of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the available Scheduled Instances.</p>"]
    pub scheduled_instance_availability_set: Option<Vec<ScheduledInstanceAvailability>>,
}

struct DescribeScheduledInstanceAvailabilityResultDeserializer;
impl DescribeScheduledInstanceAvailabilityResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeScheduledInstanceAvailabilityResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeScheduledInstanceAvailabilityResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "scheduledInstanceAvailabilitySet" => {
                            obj.scheduled_instance_availability_set = Some(try!(ScheduledInstanceAvailabilitySetDeserializer::deserialize("scheduledInstanceAvailabilitySet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeScheduledInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeScheduledInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone (for example, <code>us-west-2a</code>).</p> </li> <li> <p> <code>instance-type</code> - The instance type (for example, <code>c4.large</code>).</p> </li> <li> <p> <code>network-platform</code> - The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p> </li> <li> <p> <code>platform</code> - The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 100. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more Scheduled Instance IDs.</p>"]
    pub scheduled_instance_ids: Option<Vec<String>>,
    #[doc="<p>The time period for the first schedule to start.</p>"]
    pub slot_start_time_range: Option<SlotStartTimeRangeRequest>,
}


/// Serialize `DescribeScheduledInstancesRequest` contents to a `SignedRequest`.
struct DescribeScheduledInstancesRequestSerializer;
impl DescribeScheduledInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeScheduledInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.scheduled_instance_ids {
            ScheduledInstanceIdRequestSetSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "ScheduledInstanceId"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.slot_start_time_range {
            SlotStartTimeRangeRequestSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "SlotStartTimeRange"),
                                                           field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeScheduledInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeScheduledInstancesResult {
    #[doc="<p>The token required to retrieve the next set of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the Scheduled Instances.</p>"]
    pub scheduled_instance_set: Option<Vec<ScheduledInstance>>,
}

struct DescribeScheduledInstancesResultDeserializer;
impl DescribeScheduledInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeScheduledInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeScheduledInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "scheduledInstanceSet" => {
                            obj.scheduled_instance_set =
                                Some(try!(ScheduledInstanceSetDeserializer::deserialize("scheduledInstanceSet",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeSecurityGroupReferencesRequest {
    #[doc="<p>Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more security group IDs in your account.</p>"]
    pub group_id: Vec<String>,
}


/// Serialize `DescribeSecurityGroupReferencesRequest` contents to a `SignedRequest`.
struct DescribeSecurityGroupReferencesRequestSerializer;
impl DescribeSecurityGroupReferencesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSecurityGroupReferencesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        GroupIdsSerializer::serialize(params, &format!("{}{}", prefix, "GroupId"), &obj.group_id);

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeSecurityGroupReferencesResult {
    #[doc="<p>Information about the VPCs with the referencing security groups.</p>"]
    pub security_group_reference_set: Option<Vec<SecurityGroupReference>>,
}

struct DescribeSecurityGroupReferencesResultDeserializer;
impl DescribeSecurityGroupReferencesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeSecurityGroupReferencesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSecurityGroupReferencesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "securityGroupReferenceSet" => {
                            obj.security_group_reference_set =
                                Some(try!(SecurityGroupReferencesDeserializer::deserialize("securityGroupReferenceSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSecurityGroups.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSecurityGroupsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.</p> <ul> <li> <p> <code>description</code> - The description of the security group.</p> </li> <li> <p> <code>egress.ip-permission.prefix-list-id</code> - The ID (prefix) of the AWS service to which the security group allows access.</p> </li> <li> <p> <code>group-id</code> - The ID of the security group. </p> </li> <li> <p> <code>group-name</code> - The name of the security group.</p> </li> <li> <p> <code>ip-permission.cidr</code> - An IPv4 CIDR range that has been granted permission in a security group rule.</p> </li> <li> <p> <code>ip-permission.from-port</code> - The start of port range for the TCP and UDP protocols, or an ICMP type number.</p> </li> <li> <p> <code>ip-permission.group-id</code> - The ID of a security group that has been granted permission.</p> </li> <li> <p> <code>ip-permission.group-name</code> - The name of a security group that has been granted permission.</p> </li> <li> <p> <code>ip-permission.ipv6-cidr</code> - An IPv6 CIDR range that has been granted permission in a security group rule.</p> </li> <li> <p> <code>ip-permission.protocol</code> - The IP protocol for the permission (<code>tcp</code> | <code>udp</code> | <code>icmp</code> or a protocol number).</p> </li> <li> <p> <code>ip-permission.to-port</code> - The end of port range for the TCP and UDP protocols, or an ICMP code.</p> </li> <li> <p> <code>ip-permission.user-id</code> - The ID of an AWS account that has been granted permission.</p> </li> <li> <p> <code>owner-id</code> - The AWS account ID of the owner of the security group.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the security group.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the security group.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC specified when the security group was created.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more security group IDs. Required for security groups in a nondefault VPC.</p> <p>Default: Describes all your security groups.</p>"]
    pub group_ids: Option<Vec<String>>,
    #[doc="<p>[EC2-Classic and default VPC only] One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the <code>group-name</code> filter to describe security groups by name.</p> <p>Default: Describes all your security groups.</p>"]
    pub group_names: Option<Vec<String>>,
}


/// Serialize `DescribeSecurityGroupsRequest` contents to a `SignedRequest`.
struct DescribeSecurityGroupsRequestSerializer;
impl DescribeSecurityGroupsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSecurityGroupsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.group_ids {
            GroupIdStringListSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "GroupId"),
                                                   field_value);
        }
        if let Some(ref field_value) = obj.group_names {
            GroupNameStringListSerializer::serialize(params,
                                                     &format!("{}{}", prefix, "GroupName"),
                                                     field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeSecurityGroups.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSecurityGroupsResult {
    #[doc="<p>Information about one or more security groups.</p>"]
    pub security_groups: Option<Vec<SecurityGroup>>,
}

struct DescribeSecurityGroupsResultDeserializer;
impl DescribeSecurityGroupsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeSecurityGroupsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSecurityGroupsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "securityGroupInfo" => {
                            obj.security_groups =
                                Some(try!(SecurityGroupListDeserializer::deserialize("securityGroupInfo",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSnapshotAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSnapshotAttributeRequest {
    #[doc="<p>The snapshot attribute you would like to view.</p>"]
    pub attribute: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the EBS snapshot.</p>"]
    pub snapshot_id: String,
}


/// Serialize `DescribeSnapshotAttributeRequest` contents to a `SignedRequest`.
struct DescribeSnapshotAttributeRequestSerializer;
impl DescribeSnapshotAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSnapshotAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Attribute"),
                   &obj.attribute.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SnapshotId"),
                   &obj.snapshot_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DescribeSnapshotAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSnapshotAttributeResult {
    #[doc="<p>A list of permissions for creating volumes from the snapshot.</p>"]
    pub create_volume_permissions: Option<Vec<CreateVolumePermission>>,
    #[doc="<p>A list of product codes.</p>"]
    pub product_codes: Option<Vec<ProductCode>>,
    #[doc="<p>The ID of the EBS snapshot.</p>"]
    pub snapshot_id: Option<String>,
}

struct DescribeSnapshotAttributeResultDeserializer;
impl DescribeSnapshotAttributeResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeSnapshotAttributeResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSnapshotAttributeResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "createVolumePermission" => {
                            obj.create_volume_permissions = Some(try!(CreateVolumePermissionListDeserializer::deserialize("createVolumePermission", stack)));
                        }
                        "productCodes" => {
                            obj.product_codes =
                                Some(try!(ProductCodeListDeserializer::deserialize("productCodes",
                                                                                   stack)));
                        }
                        "snapshotId" => {
                            obj.snapshot_id = Some(try!(StringDeserializer::deserialize("snapshotId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSnapshots.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSnapshotsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>description</code> - A description of the snapshot.</p> </li> <li> <p> <code>owner-alias</code> - Value from an Amazon-maintained list (<code>amazon</code> | <code>aws-marketplace</code> | <code>microsoft</code>) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console.</p> </li> <li> <p> <code>owner-id</code> - The ID of the AWS account that owns the snapshot.</p> </li> <li> <p> <code>progress</code> - The progress of the snapshot, as a percentage (for example, 80%).</p> </li> <li> <p> <code>snapshot-id</code> - The snapshot ID.</p> </li> <li> <p> <code>start-time</code> - The time stamp when the snapshot was initiated.</p> </li> <li> <p> <code>status</code> - The status of the snapshot (<code>pending</code> | <code>completed</code> | <code>error</code>).</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>volume-id</code> - The ID of the volume the snapshot is for.</p> </li> <li> <p> <code>volume-size</code> - The size of the volume, in GiB.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of snapshot results returned by <code>DescribeSnapshots</code> in paginated output. When this parameter is used, <code>DescribeSnapshots</code> only returns <code>MaxResults</code> results in a single page along with a <code>NextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeSnapshots</code> request with the returned <code>NextToken</code> value. This value can be between 5 and 1000; if <code>MaxResults</code> is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then <code>DescribeSnapshots</code> returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The <code>NextToken</code> value returned from a previous paginated <code>DescribeSnapshots</code> request where <code>MaxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>NextToken</code> value. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Returns the snapshots owned by the specified owner. Multiple owners can be specified.</p>"]
    pub owner_ids: Option<Vec<String>>,
    #[doc="<p>One or more AWS accounts IDs that can create volumes from the snapshot.</p>"]
    pub restorable_by_user_ids: Option<Vec<String>>,
    #[doc="<p>One or more snapshot IDs.</p> <p>Default: Describes snapshots for which you have launch permissions.</p>"]
    pub snapshot_ids: Option<Vec<String>>,
}


/// Serialize `DescribeSnapshotsRequest` contents to a `SignedRequest`.
struct DescribeSnapshotsRequestSerializer;
impl DescribeSnapshotsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSnapshotsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.owner_ids {
            OwnerStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "Owner"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.restorable_by_user_ids {
            RestorableByStringListSerializer::serialize(params,
                                                        &format!("{}{}", prefix, "RestorableBy"),
                                                        field_value);
        }
        if let Some(ref field_value) = obj.snapshot_ids {
            SnapshotIdStringListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "SnapshotId"),
                                                      field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeSnapshots.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSnapshotsResult {
    #[doc="<p>The <code>NextToken</code> value to include in a future <code>DescribeSnapshots</code> request. When the results of a <code>DescribeSnapshots</code> request exceed <code>MaxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the snapshots.</p>"]
    pub snapshots: Option<Vec<Snapshot>>,
}

struct DescribeSnapshotsResultDeserializer;
impl DescribeSnapshotsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeSnapshotsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSnapshotsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "snapshotSet" => {
                            obj.snapshots =
                                Some(try!(SnapshotListDeserializer::deserialize("snapshotSet",
                                                                                stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSpotDatafeedSubscription.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotDatafeedSubscriptionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `DescribeSpotDatafeedSubscriptionRequest` contents to a `SignedRequest`.
struct DescribeSpotDatafeedSubscriptionRequestSerializer;
impl DescribeSpotDatafeedSubscriptionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSpotDatafeedSubscriptionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeSpotDatafeedSubscription.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotDatafeedSubscriptionResult {
    #[doc="<p>The Spot instance data feed subscription.</p>"]
    pub spot_datafeed_subscription: Option<SpotDatafeedSubscription>,
}

struct DescribeSpotDatafeedSubscriptionResultDeserializer;
impl DescribeSpotDatafeedSubscriptionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeSpotDatafeedSubscriptionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSpotDatafeedSubscriptionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "spotDatafeedSubscription" => {
                            obj.spot_datafeed_subscription = Some(try!(SpotDatafeedSubscriptionDeserializer::deserialize("spotDatafeedSubscription", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSpotFleetInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotFleetInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
}


/// Serialize `DescribeSpotFleetInstancesRequest` contents to a `SignedRequest`.
struct DescribeSpotFleetInstancesRequestSerializer;
impl DescribeSpotFleetInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSpotFleetInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SpotFleetRequestId"),
                   &obj.spot_fleet_request_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DescribeSpotFleetInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotFleetInstancesResponse {
    #[doc="<p>The running instances. Note that this list is refreshed periodically and might be out of date.</p>"]
    pub active_instances: Vec<ActiveInstance>,
    #[doc="<p>The token required to retrieve the next set of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
}

struct DescribeSpotFleetInstancesResponseDeserializer;
impl DescribeSpotFleetInstancesResponseDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeSpotFleetInstancesResponse, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSpotFleetInstancesResponse::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "activeInstanceSet" => {
                            obj.active_instances =
                                try!(ActiveInstanceSetDeserializer::deserialize("activeInstanceSet",
                                                                                stack));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "spotFleetRequestId" => {
                            obj.spot_fleet_request_id =
                                try!(StringDeserializer::deserialize("spotFleetRequestId", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSpotFleetRequestHistory.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotFleetRequestHistoryRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The type of events to describe. By default, all events are described.</p>"]
    pub event_type: Option<String>,
    #[doc="<p>The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
    #[doc="<p>The starting date and time for the events, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub start_time: String,
}


/// Serialize `DescribeSpotFleetRequestHistoryRequest` contents to a `SignedRequest`.
struct DescribeSpotFleetRequestHistoryRequestSerializer;
impl DescribeSpotFleetRequestHistoryRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSpotFleetRequestHistoryRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.event_type {
            params.put(&format!("{}{}", prefix, "EventType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SpotFleetRequestId"),
                   &obj.spot_fleet_request_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "StartTime"),
                   &obj.start_time.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DescribeSpotFleetRequestHistory.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotFleetRequestHistoryResponse {
    #[doc="<p>Information about the events in the history of the Spot fleet request.</p>"]
    pub history_records: Vec<HistoryRecord>,
    #[doc="<p>The last date and time for the events, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). All records up to this time were retrieved.</p> <p>If <code>nextToken</code> indicates that there are more results, this value is not present.</p>"]
    pub last_evaluated_time: String,
    #[doc="<p>The token required to retrieve the next set of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
    #[doc="<p>The starting date and time for the events, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub start_time: String,
}

struct DescribeSpotFleetRequestHistoryResponseDeserializer;
impl DescribeSpotFleetRequestHistoryResponseDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeSpotFleetRequestHistoryResponse, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSpotFleetRequestHistoryResponse::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "historyRecordSet" => {
                            obj.history_records =
                                try!(HistoryRecordsDeserializer::deserialize("historyRecordSet",
                                                                             stack));
                        }
                        "lastEvaluatedTime" => {
                            obj.last_evaluated_time =
                                try!(DateTimeDeserializer::deserialize("lastEvaluatedTime", stack));
                        }
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "spotFleetRequestId" => {
                            obj.spot_fleet_request_id =
                                try!(StringDeserializer::deserialize("spotFleetRequestId", stack));
                        }
                        "startTime" => {
                            obj.start_time = try!(DateTimeDeserializer::deserialize("startTime",
                                                                                    stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSpotFleetRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotFleetRequestsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The IDs of the Spot fleet requests.</p>"]
    pub spot_fleet_request_ids: Option<Vec<String>>,
}


/// Serialize `DescribeSpotFleetRequestsRequest` contents to a `SignedRequest`.
struct DescribeSpotFleetRequestsRequestSerializer;
impl DescribeSpotFleetRequestsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSpotFleetRequestsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.spot_fleet_request_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "SpotFleetRequestId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeSpotFleetRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotFleetRequestsResponse {
    #[doc="<p>The token required to retrieve the next set of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the configuration of your Spot fleet.</p>"]
    pub spot_fleet_request_configs: Vec<SpotFleetRequestConfig>,
}

struct DescribeSpotFleetRequestsResponseDeserializer;
impl DescribeSpotFleetRequestsResponseDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeSpotFleetRequestsResponse, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSpotFleetRequestsResponse::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "spotFleetRequestConfigSet" => {
                            obj.spot_fleet_request_configs =
                                try!(SpotFleetRequestConfigSetDeserializer::deserialize("spotFleetRequestConfigSet",
                                                                                        stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSpotInstanceRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotInstanceRequestsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone-group</code> - The Availability Zone group.</p> </li> <li> <p> <code>create-time</code> - The time stamp when the Spot instance request was created.</p> </li> <li> <p> <code>fault-code</code> - The fault code related to the request.</p> </li> <li> <p> <code>fault-message</code> - The fault message related to the request.</p> </li> <li> <p> <code>instance-id</code> - The ID of the instance that fulfilled the request.</p> </li> <li> <p> <code>launch-group</code> - The Spot instance launch group.</p> </li> <li> <p> <code>launch.block-device-mapping.delete-on-termination</code> - Indicates whether the Amazon EBS volume is deleted on instance termination.</p> </li> <li> <p> <code>launch.block-device-mapping.device-name</code> - The device name for the Amazon EBS volume (for example, <code>/dev/sdh</code>).</p> </li> <li> <p> <code>launch.block-device-mapping.snapshot-id</code> - The ID of the snapshot used for the Amazon EBS volume.</p> </li> <li> <p> <code>launch.block-device-mapping.volume-size</code> - The size of the Amazon EBS volume, in GiB.</p> </li> <li> <p> <code>launch.block-device-mapping.volume-type</code> - The type of the Amazon EBS volume: <code>gp2</code> for General Purpose SSD, <code>io1</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code>for Cold HDD, or <code>standard</code> for Magnetic.</p> </li> <li> <p> <code>launch.group-id</code> - The security group for the instance.</p> </li> <li> <p> <code>launch.image-id</code> - The ID of the AMI.</p> </li> <li> <p> <code>launch.instance-type</code> - The type of instance (for example, <code>m3.medium</code>).</p> </li> <li> <p> <code>launch.kernel-id</code> - The kernel ID.</p> </li> <li> <p> <code>launch.key-name</code> - The name of the key pair the instance launched with.</p> </li> <li> <p> <code>launch.monitoring-enabled</code> - Whether monitoring is enabled for the Spot instance.</p> </li> <li> <p> <code>launch.ramdisk-id</code> - The RAM disk ID.</p> </li> <li> <p> <code>network-interface.network-interface-id</code> - The ID of the network interface.</p> </li> <li> <p> <code>network-interface.device-index</code> - The index of the device for the network interface attachment on the instance.</p> </li> <li> <p> <code>network-interface.subnet-id</code> - The ID of the subnet for the instance.</p> </li> <li> <p> <code>network-interface.description</code> - A description of the network interface.</p> </li> <li> <p> <code>network-interface.private-ip-address</code> - The primary private IP address of the network interface.</p> </li> <li> <p> <code>network-interface.delete-on-termination</code> - Indicates whether the network interface is deleted when the instance is terminated.</p> </li> <li> <p> <code>network-interface.group-id</code> - The ID of the security group associated with the network interface.</p> </li> <li> <p> <code>network-interface.group-name</code> - The name of the security group associated with the network interface.</p> </li> <li> <p> <code>network-interface.addresses.primary</code> - Indicates whether the IP address is the primary private IP address.</p> </li> <li> <p> <code>product-description</code> - The product description associated with the instance (<code>Linux/UNIX</code> | <code>Windows</code>).</p> </li> <li> <p> <code>spot-instance-request-id</code> - The Spot instance request ID.</p> </li> <li> <p> <code>spot-price</code> - The maximum hourly price for any Spot instance launched to fulfill the request.</p> </li> <li> <p> <code>state</code> - The state of the Spot instance request (<code>open</code> | <code>active</code> | <code>closed</code> | <code>cancelled</code> | <code>failed</code>). Spot bid status information can help you track your Amazon EC2 Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html\">Spot Bid Status</a> in the Amazon Elastic Compute Cloud User Guide.</p> </li> <li> <p> <code>status-code</code> - The short code describing the most recent evaluation of your Spot instance request.</p> </li> <li> <p> <code>status-message</code> - The message explaining the status of the Spot instance request.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>type</code> - The type of Spot instance request (<code>one-time</code> | <code>persistent</code>).</p> </li> <li> <p> <code>launched-availability-zone</code> - The Availability Zone in which the bid is launched.</p> </li> <li> <p> <code>valid-from</code> - The start date of the request.</p> </li> <li> <p> <code>valid-until</code> - The end date of the request.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more Spot instance request IDs.</p>"]
    pub spot_instance_request_ids: Option<Vec<String>>,
}


/// Serialize `DescribeSpotInstanceRequestsRequest` contents to a `SignedRequest`.
struct DescribeSpotInstanceRequestsRequestSerializer;
impl DescribeSpotInstanceRequestsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSpotInstanceRequestsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.spot_instance_request_ids {
            SpotInstanceRequestIdListSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "SpotInstanceRequestId"),
                                                           field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeSpotInstanceRequests.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotInstanceRequestsResult {
    #[doc="<p>One or more Spot instance requests.</p>"]
    pub spot_instance_requests: Option<Vec<SpotInstanceRequest>>,
}

struct DescribeSpotInstanceRequestsResultDeserializer;
impl DescribeSpotInstanceRequestsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeSpotInstanceRequestsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSpotInstanceRequestsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "spotInstanceRequestSet" => {
                            obj.spot_instance_requests =
                                Some(try!(SpotInstanceRequestListDeserializer::deserialize("spotInstanceRequestSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSpotPriceHistory.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotPriceHistoryRequest {
    #[doc="<p>Filters the results by the specified Availability Zone.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub end_time: Option<String>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availability-zone</code> - The Availability Zone for which prices should be returned.</p> </li> <li> <p> <code>instance-type</code> - The type of instance (for example, <code>m3.medium</code>).</p> </li> <li> <p> <code>product-description</code> - The product description for the Spot price (<code>Linux/UNIX</code> | <code>SUSE Linux</code> | <code>Windows</code> | <code>Linux/UNIX (Amazon VPC)</code> | <code>SUSE Linux (Amazon VPC)</code> | <code>Windows (Amazon VPC)</code>).</p> </li> <li> <p> <code>spot-price</code> - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).</p> </li> <li> <p> <code>timestamp</code> - The timestamp of the Spot price history, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>Filters the results by the specified instance types. Note that T2 and HS1 instance types are not supported.</p>"]
    pub instance_types: Option<Vec<String>>,
    #[doc="<p>The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of results.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Filters the results by the specified basic product descriptions.</p>"]
    pub product_descriptions: Option<Vec<String>>,
    #[doc="<p>The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub start_time: Option<String>,
}


/// Serialize `DescribeSpotPriceHistoryRequest` contents to a `SignedRequest`.
struct DescribeSpotPriceHistoryRequestSerializer;
impl DescribeSpotPriceHistoryRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSpotPriceHistoryRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.end_time {
            params.put(&format!("{}{}", prefix, "EndTime"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.instance_types {
            InstanceTypeListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceType"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.product_descriptions {
            ProductDescriptionListSerializer::serialize(params,
                                                        &format!("{}{}",
                                                                prefix,
                                                                "ProductDescription"),
                                                        field_value);
        }
        if let Some(ref field_value) = obj.start_time {
            params.put(&format!("{}{}", prefix, "StartTime"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeSpotPriceHistory.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSpotPriceHistoryResult {
    #[doc="<p>The token required to retrieve the next set of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The historical Spot prices.</p>"]
    pub spot_price_history: Option<Vec<SpotPrice>>,
}

struct DescribeSpotPriceHistoryResultDeserializer;
impl DescribeSpotPriceHistoryResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeSpotPriceHistoryResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSpotPriceHistoryResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "spotPriceHistorySet" => {
                            obj.spot_price_history =
                                Some(try!(SpotPriceHistoryListDeserializer::deserialize("spotPriceHistorySet",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeStaleSecurityGroupsRequest {
    #[doc="<p>Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of items to return. (You received this token from a prior call.)</p>"]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `DescribeStaleSecurityGroupsRequest` contents to a `SignedRequest`.
struct DescribeStaleSecurityGroupsRequestSerializer;
impl DescribeStaleSecurityGroupsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeStaleSecurityGroupsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeStaleSecurityGroupsResult {
    #[doc="<p>The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the stale security groups.</p>"]
    pub stale_security_group_set: Option<Vec<StaleSecurityGroup>>,
}

struct DescribeStaleSecurityGroupsResultDeserializer;
impl DescribeStaleSecurityGroupsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeStaleSecurityGroupsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeStaleSecurityGroupsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "staleSecurityGroupSet" => {
                            obj.stale_security_group_set =
                                Some(try!(StaleSecurityGroupSetDeserializer::deserialize("staleSecurityGroupSet",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeSubnets.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSubnetsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>availabilityZone</code> - The Availability Zone for the subnet. You can also use <code>availability-zone</code> as the filter name.</p> </li> <li> <p> <code>available-ip-address-count</code> - The number of IPv4 addresses in the subnet that are available.</p> </li> <li> <p> <code>cidrBlock</code> - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use <code>cidr</code> or <code>cidr-block</code> as the filter names.</p> </li> <li> <p> <code>defaultForAz</code> - Indicates whether this is the default subnet for the Availability Zone. You can also use <code>default-for-az</code> as the filter name.</p> </li> <li> <p> <code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the subnet.</p> </li> <li> <p> <code>ipv6-cidr-block-association.association-id</code> - An association ID for an IPv6 CIDR block associated with the subnet.</p> </li> <li> <p> <code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the subnet.</p> </li> <li> <p> <code>state</code> - The state of the subnet (<code>pending</code> | <code>available</code>).</p> </li> <li> <p> <code>subnet-id</code> - The ID of the subnet.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC for the subnet.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more subnet IDs.</p> <p>Default: Describes all your subnets.</p>"]
    pub subnet_ids: Option<Vec<String>>,
}


/// Serialize `DescribeSubnetsRequest` contents to a `SignedRequest`.
struct DescribeSubnetsRequestSerializer;
impl DescribeSubnetsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeSubnetsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.subnet_ids {
            SubnetIdStringListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "SubnetId"),
                                                    field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeSubnets.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeSubnetsResult {
    #[doc="<p>Information about one or more subnets.</p>"]
    pub subnets: Option<Vec<Subnet>>,
}

struct DescribeSubnetsResultDeserializer;
impl DescribeSubnetsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeSubnetsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeSubnetsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "subnetSet" => {
                            obj.subnets = Some(try!(SubnetListDeserializer::deserialize("subnetSet",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeTags.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeTagsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>key</code> - The tag key.</p> </li> <li> <p> <code>resource-id</code> - The resource ID.</p> </li> <li> <p> <code>resource-type</code> - The resource type (<code>customer-gateway</code> | <code>dhcp-options</code> | <code>image</code> | <code>instance</code> | <code>internet-gateway</code> | <code>network-acl</code> | <code>network-interface</code> | <code>reserved-instances</code> | <code>route-table</code> | <code>security-group</code> | <code>snapshot</code> | <code>spot-instances-request</code> | <code>subnet</code> | <code>volume</code> | <code>vpc</code> | <code>vpn-connection</code> | <code>vpn-gateway</code>).</p> </li> <li> <p> <code>value</code> - The tag value.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token to retrieve the next page of results.</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeTagsRequest` contents to a `SignedRequest`.
struct DescribeTagsRequestSerializer;
impl DescribeTagsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeTagsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeTags.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeTagsResult {
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return..</p>"]
    pub next_token: Option<String>,
    #[doc="<p>A list of tags.</p>"]
    pub tags: Option<Vec<TagDescription>>,
}

struct DescribeTagsResultDeserializer;
impl DescribeTagsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeTagsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeTagsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "tagSet" => {
                            obj.tags =
                                Some(try!(TagDescriptionListDeserializer::deserialize("tagSet",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVolumeAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVolumeAttributeRequest {
    #[doc="<p>The attribute of the volume. This parameter is required.</p>"]
    pub attribute: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: String,
}


/// Serialize `DescribeVolumeAttributeRequest` contents to a `SignedRequest`.
struct DescribeVolumeAttributeRequestSerializer;
impl DescribeVolumeAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVolumeAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attribute {
            params.put(&format!("{}{}", prefix, "Attribute"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DescribeVolumeAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVolumeAttributeResult {
    #[doc="<p>The state of <code>autoEnableIO</code> attribute.</p>"]
    pub auto_enable_io: Option<AttributeBooleanValue>,
    #[doc="<p>A list of product codes.</p>"]
    pub product_codes: Option<Vec<ProductCode>>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: Option<String>,
}

struct DescribeVolumeAttributeResultDeserializer;
impl DescribeVolumeAttributeResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVolumeAttributeResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVolumeAttributeResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "autoEnableIO" => {
                            obj.auto_enable_io =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("autoEnableIO",
                                                                                         stack)));
                        }
                        "productCodes" => {
                            obj.product_codes =
                                Some(try!(ProductCodeListDeserializer::deserialize("productCodes",
                                                                                   stack)));
                        }
                        "volumeId" => {
                            obj.volume_id = Some(try!(StringDeserializer::deserialize("volumeId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVolumeStatus.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVolumeStatusRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>action.code</code> - The action code for the event (for example, <code>enable-volume-io</code>).</p> </li> <li> <p> <code>action.description</code> - A description of the action.</p> </li> <li> <p> <code>action.event-id</code> - The event ID associated with the action.</p> </li> <li> <p> <code>availability-zone</code> - The Availability Zone of the instance.</p> </li> <li> <p> <code>event.description</code> - A description of the event.</p> </li> <li> <p> <code>event.event-id</code> - The event ID.</p> </li> <li> <p> <code>event.event-type</code> - The event type (for <code>io-enabled</code>: <code>passed</code> | <code>failed</code>; for <code>io-performance</code>: <code>io-performance:degraded</code> | <code>io-performance:severely-degraded</code> | <code>io-performance:stalled</code>).</p> </li> <li> <p> <code>event.not-after</code> - The latest end time for the event.</p> </li> <li> <p> <code>event.not-before</code> - The earliest start time for the event.</p> </li> <li> <p> <code>volume-status.details-name</code> - The cause for <code>volume-status.status</code> (<code>io-enabled</code> | <code>io-performance</code>).</p> </li> <li> <p> <code>volume-status.details-status</code> - The status of <code>volume-status.details-name</code> (for <code>io-enabled</code>: <code>passed</code> | <code>failed</code>; for <code>io-performance</code>: <code>normal</code> | <code>degraded</code> | <code>severely-degraded</code> | <code>stalled</code>).</p> </li> <li> <p> <code>volume-status.status</code> - The status of the volume (<code>ok</code> | <code>impaired</code> | <code>warning</code> | <code>insufficient-data</code>).</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of volume results returned by <code>DescribeVolumeStatus</code> in paginated output. When this parameter is used, the request only returns <code>MaxResults</code> results in a single page along with a <code>NextToken</code> response element. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1000; if <code>MaxResults</code> is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then <code>DescribeVolumeStatus</code> returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The <code>NextToken</code> value to include in a future <code>DescribeVolumeStatus</code> request. When the results of the request exceed <code>MaxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more volume IDs.</p> <p>Default: Describes all your volumes.</p>"]
    pub volume_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVolumeStatusRequest` contents to a `SignedRequest`.
struct DescribeVolumeStatusRequestSerializer;
impl DescribeVolumeStatusRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVolumeStatusRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_ids {
            VolumeIdStringListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "VolumeId"),
                                                    field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVolumeStatus.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVolumeStatusResult {
    #[doc="<p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>A list of volumes.</p>"]
    pub volume_statuses: Option<Vec<VolumeStatusItem>>,
}

struct DescribeVolumeStatusResultDeserializer;
impl DescribeVolumeStatusResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVolumeStatusResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVolumeStatusResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "volumeStatusSet" => {
                            obj.volume_statuses =
                                Some(try!(VolumeStatusListDeserializer::deserialize("volumeStatusSet",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DescribeVolumesModificationsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters. Supported filters: <code>volume-id</code>, <code>modification-state</code>, <code>target-size</code>, <code>target-iops</code>, <code>target-volume-type</code>, <code>original-size</code>, <code>original-iops</code>, <code>original-volume-type</code>, <code>start-time</code>. </p>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of results (up to a limit of 500) to be returned in a paginated request.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The <code>nextToken</code> value returned by a previous paginated request.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more volume IDs for which in-progress modifications will be described.</p>"]
    pub volume_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVolumesModificationsRequest` contents to a `SignedRequest`.
struct DescribeVolumesModificationsRequestSerializer;
impl DescribeVolumesModificationsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVolumesModificationsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_ids {
            VolumeIdStringListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "VolumeId"),
                                                    field_value);
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DescribeVolumesModificationsResult {
    #[doc="<p>Token for pagination, null if there are no more results </p>"]
    pub next_token: Option<String>,
    #[doc="<p>A list of returned <a>VolumeModification</a> objects.</p>"]
    pub volumes_modifications: Option<Vec<VolumeModification>>,
}

struct DescribeVolumesModificationsResultDeserializer;
impl DescribeVolumesModificationsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeVolumesModificationsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVolumesModificationsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "volumeModificationSet" => {
                            obj.volumes_modifications =
                                Some(try!(VolumeModificationListDeserializer::deserialize("volumeModificationSet",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVolumes.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVolumesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>attachment.attach-time</code> - The time stamp when the attachment initiated.</p> </li> <li> <p> <code>attachment.delete-on-termination</code> - Whether the volume is deleted on instance termination.</p> </li> <li> <p> <code>attachment.device</code> - The device name that is exposed to the instance (for example, <code>/dev/sda1</code>).</p> </li> <li> <p> <code>attachment.instance-id</code> - The ID of the instance the volume is attached to.</p> </li> <li> <p> <code>attachment.status</code> - The attachment state (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p> </li> <li> <p> <code>availability-zone</code> - The Availability Zone in which the volume was created.</p> </li> <li> <p> <code>create-time</code> - The time stamp when the volume was created.</p> </li> <li> <p> <code>encrypted</code> - The encryption status of the volume.</p> </li> <li> <p> <code>size</code> - The size of the volume, in GiB.</p> </li> <li> <p> <code>snapshot-id</code> - The snapshot from which the volume was created.</p> </li> <li> <p> <code>status</code> - The status of the volume (<code>creating</code> | <code>available</code> | <code>in-use</code> | <code>deleting</code> | <code>deleted</code> | <code>error</code>).</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>volume-id</code> - The volume ID.</p> </li> <li> <p> <code>volume-type</code> - The Amazon EBS volume type. This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of volume results returned by <code>DescribeVolumes</code> in paginated output. When this parameter is used, <code>DescribeVolumes</code> only returns <code>MaxResults</code> results in a single page along with a <code>NextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>DescribeVolumes</code> request with the returned <code>NextToken</code> value. This value can be between 5 and 500; if <code>MaxResults</code> is given a value larger than 500, only 500 results are returned. If this parameter is not used, then <code>DescribeVolumes</code> returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The <code>NextToken</code> value returned from a previous paginated <code>DescribeVolumes</code> request where <code>MaxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>NextToken</code> value. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more volume IDs.</p>"]
    pub volume_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVolumesRequest` contents to a `SignedRequest`.
struct DescribeVolumesRequestSerializer;
impl DescribeVolumesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVolumesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_ids {
            VolumeIdStringListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "VolumeId"),
                                                    field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVolumes.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVolumesResult {
    #[doc="<p>The <code>NextToken</code> value to include in a future <code>DescribeVolumes</code> request. When the results of a <code>DescribeVolumes</code> request exceed <code>MaxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the volumes.</p>"]
    pub volumes: Option<Vec<Volume>>,
}

struct DescribeVolumesResultDeserializer;
impl DescribeVolumesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVolumesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVolumesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "volumeSet" => {
                            obj.volumes = Some(try!(VolumeListDeserializer::deserialize("volumeSet",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpcAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcAttributeRequest {
    #[doc="<p>The VPC attribute.</p>"]
    pub attribute: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `DescribeVpcAttributeRequest` contents to a `SignedRequest`.
struct DescribeVpcAttributeRequestSerializer;
impl DescribeVpcAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpcAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Attribute"),
                   &obj.attribute.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DescribeVpcAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcAttributeResult {
    #[doc="<p>Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is <code>true</code>, instances in the VPC get DNS hostnames; otherwise, they do not.</p>"]
    pub enable_dns_hostnames: Option<AttributeBooleanValue>,
    #[doc="<p>Indicates whether DNS resolution is enabled for the VPC. If this attribute is <code>true</code>, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.</p>"]
    pub enable_dns_support: Option<AttributeBooleanValue>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct DescribeVpcAttributeResultDeserializer;
impl DescribeVpcAttributeResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVpcAttributeResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpcAttributeResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "enableDnsHostnames" => {
                            obj.enable_dns_hostnames =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("enableDnsHostnames",
                                                                                         stack)));
                        }
                        "enableDnsSupport" => {
                            obj.enable_dns_support =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("enableDnsSupport",
                                                                                         stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpcClassicLinkDnsSupport.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcClassicLinkDnsSupportRequest {
    #[doc="<p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of items to return. (You received this token from a prior call.)</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more VPC IDs.</p>"]
    pub vpc_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVpcClassicLinkDnsSupportRequest` contents to a `SignedRequest`.
struct DescribeVpcClassicLinkDnsSupportRequestSerializer;
impl DescribeVpcClassicLinkDnsSupportRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpcClassicLinkDnsSupportRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.vpc_ids {
            VpcClassicLinkIdListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "VpcIds"),
                                                      field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVpcClassicLinkDnsSupport.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcClassicLinkDnsSupportResult {
    #[doc="<p>The token to use when requesting the next set of items.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the ClassicLink DNS support status of the VPCs.</p>"]
    pub vpcs: Option<Vec<ClassicLinkDnsSupport>>,
}

struct DescribeVpcClassicLinkDnsSupportResultDeserializer;
impl DescribeVpcClassicLinkDnsSupportResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeVpcClassicLinkDnsSupportResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpcClassicLinkDnsSupportResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(NextTokenDeserializer::deserialize("nextToken",
                                                                                          stack)));
                        }
                        "vpcs" => {
                            obj.vpcs = Some(try!(ClassicLinkDnsSupportListDeserializer::deserialize("vpcs", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpcClassicLink.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcClassicLinkRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>is-classic-link-enabled</code> - Whether the VPC is enabled for ClassicLink (<code>true</code> | <code>false</code>).</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more VPCs for which you want to describe the ClassicLink status.</p>"]
    pub vpc_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVpcClassicLinkRequest` contents to a `SignedRequest`.
struct DescribeVpcClassicLinkRequestSerializer;
impl DescribeVpcClassicLinkRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpcClassicLinkRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.vpc_ids {
            VpcClassicLinkIdListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "VpcId"),
                                                      field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVpcClassicLink.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcClassicLinkResult {
    #[doc="<p>The ClassicLink status of one or more VPCs.</p>"]
    pub vpcs: Option<Vec<VpcClassicLink>>,
}

struct DescribeVpcClassicLinkResultDeserializer;
impl DescribeVpcClassicLinkResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVpcClassicLinkResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpcClassicLinkResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpcSet" => {
                            obj.vpcs =
                                Some(try!(VpcClassicLinkListDeserializer::deserialize("vpcSet",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpcEndpointServices.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcEndpointServicesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p> <p>Constraint: If the value is greater than 1000, we return only 1000 items.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of items to return. (You received this token from a prior call.)</p>"]
    pub next_token: Option<String>,
}


/// Serialize `DescribeVpcEndpointServicesRequest` contents to a `SignedRequest`.
struct DescribeVpcEndpointServicesRequestSerializer;
impl DescribeVpcEndpointServicesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpcEndpointServicesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DescribeVpcEndpointServices.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcEndpointServicesResult {
    #[doc="<p>The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>A list of supported AWS services.</p>"]
    pub service_names: Option<Vec<String>>,
}

struct DescribeVpcEndpointServicesResultDeserializer;
impl DescribeVpcEndpointServicesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeVpcEndpointServicesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpcEndpointServicesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "serviceNameSet" => {
                            obj.service_names =
                                Some(try!(ValueStringListDeserializer::deserialize("serviceNameSet",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpcEndpoints.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcEndpointsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>service-name</code>: The name of the AWS service.</p> </li> <li> <p> <code>vpc-id</code>: The ID of the VPC in which the endpoint resides.</p> </li> <li> <p> <code>vpc-endpoint-id</code>: The ID of the endpoint.</p> </li> <li> <p> <code>vpc-endpoint-state</code>: The state of the endpoint. (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>)</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p> <p>Constraint: If the value is greater than 1000, we return only 1000 items.</p>"]
    pub max_results: Option<i64>,
    #[doc="<p>The token for the next set of items to return. (You received this token from a prior call.)</p>"]
    pub next_token: Option<String>,
    #[doc="<p>One or more endpoint IDs.</p>"]
    pub vpc_endpoint_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVpcEndpointsRequest` contents to a `SignedRequest`.
struct DescribeVpcEndpointsRequestSerializer;
impl DescribeVpcEndpointsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpcEndpointsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.max_results {
            params.put(&format!("{}{}", prefix, "MaxResults"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.next_token {
            params.put(&format!("{}{}", prefix, "NextToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.vpc_endpoint_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "VpcEndpointId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVpcEndpoints.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcEndpointsResult {
    #[doc="<p>The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.</p>"]
    pub next_token: Option<String>,
    #[doc="<p>Information about the endpoints.</p>"]
    pub vpc_endpoints: Option<Vec<VpcEndpoint>>,
}

struct DescribeVpcEndpointsResultDeserializer;
impl DescribeVpcEndpointsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVpcEndpointsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpcEndpointsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "nextToken" => {
                            obj.next_token = Some(try!(StringDeserializer::deserialize("nextToken",
                                                                                       stack)));
                        }
                        "vpcEndpointSet" => {
                            obj.vpc_endpoints =
                                Some(try!(VpcEndpointSetDeserializer::deserialize("vpcEndpointSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpcPeeringConnections.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcPeeringConnectionsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>accepter-vpc-info.cidr-block</code> - The IPv4 CIDR block of the peer VPC.</p> </li> <li> <p> <code>accepter-vpc-info.owner-id</code> - The AWS account ID of the owner of the peer VPC.</p> </li> <li> <p> <code>accepter-vpc-info.vpc-id</code> - The ID of the peer VPC.</p> </li> <li> <p> <code>expiration-time</code> - The expiration date and time for the VPC peering connection.</p> </li> <li> <p> <code>requester-vpc-info.cidr-block</code> - The IPv4 CIDR block of the requester's VPC.</p> </li> <li> <p> <code>requester-vpc-info.owner-id</code> - The AWS account ID of the owner of the requester VPC.</p> </li> <li> <p> <code>requester-vpc-info.vpc-id</code> - The ID of the requester VPC.</p> </li> <li> <p> <code>status-code</code> - The status of the VPC peering connection (<code>pending-acceptance</code> | <code>failed</code> | <code>expired</code> | <code>provisioning</code> | <code>active</code> | <code>deleted</code> | <code>rejected</code>).</p> </li> <li> <p> <code>status-message</code> - A message that provides more information about the status of the VPC peering connection, if applicable.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>vpc-peering-connection-id</code> - The ID of the VPC peering connection.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more VPC peering connection IDs.</p> <p>Default: Describes all your VPC peering connections.</p>"]
    pub vpc_peering_connection_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVpcPeeringConnectionsRequest` contents to a `SignedRequest`.
struct DescribeVpcPeeringConnectionsRequestSerializer;
impl DescribeVpcPeeringConnectionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpcPeeringConnectionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.vpc_peering_connection_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}",
                                                         prefix,
                                                         "VpcPeeringConnectionId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVpcPeeringConnections.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcPeeringConnectionsResult {
    #[doc="<p>Information about the VPC peering connections.</p>"]
    pub vpc_peering_connections: Option<Vec<VpcPeeringConnection>>,
}

struct DescribeVpcPeeringConnectionsResultDeserializer;
impl DescribeVpcPeeringConnectionsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DescribeVpcPeeringConnectionsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpcPeeringConnectionsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpcPeeringConnectionSet" => {
                            obj.vpc_peering_connections = Some(try!(VpcPeeringConnectionListDeserializer::deserialize("vpcPeeringConnectionSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpcs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>cidr</code> - The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, <code>/28</code>).</p> </li> <li> <p> <code>dhcp-options-id</code> - The ID of a set of DHCP options.</p> </li> <li> <p> <code>ipv6-cidr-block-association.ipv6-cidr-block</code> - An IPv6 CIDR block associated with the VPC.</p> </li> <li> <p> <code>ipv6-cidr-block-association.association-id</code> - The association ID for an IPv6 CIDR block associated with the VPC.</p> </li> <li> <p> <code>ipv6-cidr-block-association.state</code> - The state of an IPv6 CIDR block associated with the VPC.</p> </li> <li> <p> <code>isDefault</code> - Indicates whether the VPC is the default VPC.</p> </li> <li> <p> <code>state</code> - The state of the VPC (<code>pending</code> | <code>available</code>).</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>vpc-id</code> - The ID of the VPC.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more VPC IDs.</p> <p>Default: Describes all your VPCs.</p>"]
    pub vpc_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVpcsRequest` contents to a `SignedRequest`.
struct DescribeVpcsRequestSerializer;
impl DescribeVpcsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpcsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.vpc_ids {
            VpcIdStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "VpcId"),
                                                 field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVpcs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpcsResult {
    #[doc="<p>Information about one or more VPCs.</p>"]
    pub vpcs: Option<Vec<Vpc>>,
}

struct DescribeVpcsResultDeserializer;
impl DescribeVpcsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVpcsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpcsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpcSet" => {
                            obj.vpcs = Some(try!(VpcListDeserializer::deserialize("vpcSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpnConnections.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpnConnectionsRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>customer-gateway-configuration</code> - The configuration information for the customer gateway.</p> </li> <li> <p> <code>customer-gateway-id</code> - The ID of a customer gateway associated with the VPN connection.</p> </li> <li> <p> <code>state</code> - The state of the VPN connection (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p> </li> <li> <p> <code>option.static-routes-only</code> - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).</p> </li> <li> <p> <code>route.destination-cidr-block</code> - The destination CIDR block. This corresponds to the subnet used in a customer data center.</p> </li> <li> <p> <code>bgp-asn</code> - The BGP Autonomous System Number (ASN) associated with a BGP device.</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>type</code> - The type of VPN connection. Currently the only supported type is <code>ipsec.1</code>.</p> </li> <li> <p> <code>vpn-connection-id</code> - The ID of the VPN connection.</p> </li> <li> <p> <code>vpn-gateway-id</code> - The ID of a virtual private gateway associated with the VPN connection.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more VPN connection IDs.</p> <p>Default: Describes your VPN connections.</p>"]
    pub vpn_connection_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVpnConnectionsRequest` contents to a `SignedRequest`.
struct DescribeVpnConnectionsRequestSerializer;
impl DescribeVpnConnectionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpnConnectionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.vpn_connection_ids {
            VpnConnectionIdStringListSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "VpnConnectionId"),
                                                           field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVpnConnections.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpnConnectionsResult {
    #[doc="<p>Information about one or more VPN connections.</p>"]
    pub vpn_connections: Option<Vec<VpnConnection>>,
}

struct DescribeVpnConnectionsResultDeserializer;
impl DescribeVpnConnectionsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVpnConnectionsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpnConnectionsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpnConnectionSet" => {
                            obj.vpn_connections =
                                Some(try!(VpnConnectionListDeserializer::deserialize("vpnConnectionSet",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DescribeVpnGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpnGatewaysRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more filters.</p> <ul> <li> <p> <code>attachment.state</code> - The current state of the attachment between the gateway and the VPC (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p> </li> <li> <p> <code>attachment.vpc-id</code> - The ID of an attached VPC.</p> </li> <li> <p> <code>availability-zone</code> - The Availability Zone for the virtual private gateway (if applicable).</p> </li> <li> <p> <code>state</code> - The state of the virtual private gateway (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p> </li> <li> <p> <code>tag</code>:<i>key</i>=<i>value</i> - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify <code>tag:Purpose</code> for the filter name and <code>X</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. This filter is independent of the <code>tag-value</code> filter. For example, if you use both the filter \"tag-key=Purpose\" and the filter \"tag-value=X\", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the <code>tag</code>:<i>key</i>=<i>value</i> filter.</p> </li> <li> <p> <code>tag-value</code> - The value of a tag assigned to the resource. This filter is independent of the <code>tag-key</code> filter.</p> </li> <li> <p> <code>type</code> - The type of virtual private gateway. Currently the only supported type is <code>ipsec.1</code>.</p> </li> <li> <p> <code>vpn-gateway-id</code> - The ID of the virtual private gateway.</p> </li> </ul>"]
    pub filters: Option<Vec<Filter>>,
    #[doc="<p>One or more virtual private gateway IDs.</p> <p>Default: Describes all your virtual private gateways.</p>"]
    pub vpn_gateway_ids: Option<Vec<String>>,
}


/// Serialize `DescribeVpnGatewaysRequest` contents to a `SignedRequest`.
struct DescribeVpnGatewaysRequestSerializer;
impl DescribeVpnGatewaysRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DescribeVpnGatewaysRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.filters {
            FilterListSerializer::serialize(params,
                                            &format!("{}{}", prefix, "Filter"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.vpn_gateway_ids {
            VpnGatewayIdStringListSerializer::serialize(params,
                                                        &format!("{}{}", prefix, "VpnGatewayId"),
                                                        field_value);
        }

    }
}

#[doc="<p>Contains the output of DescribeVpnGateways.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DescribeVpnGatewaysResult {
    #[doc="<p>Information about one or more virtual private gateways.</p>"]
    pub vpn_gateways: Option<Vec<VpnGateway>>,
}

struct DescribeVpnGatewaysResultDeserializer;
impl DescribeVpnGatewaysResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DescribeVpnGatewaysResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DescribeVpnGatewaysResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "vpnGatewaySet" => {
                            obj.vpn_gateways =
                                Some(try!(VpnGatewayListDeserializer::deserialize("vpnGatewaySet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DetachClassicLinkVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DetachClassicLinkVpcRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance to unlink from the VPC.</p>"]
    pub instance_id: String,
    #[doc="<p>The ID of the VPC to which the instance is linked.</p>"]
    pub vpc_id: String,
}


/// Serialize `DetachClassicLinkVpcRequest` contents to a `SignedRequest`.
struct DetachClassicLinkVpcRequestSerializer;
impl DetachClassicLinkVpcRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DetachClassicLinkVpcRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DetachClassicLinkVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DetachClassicLinkVpcResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct DetachClassicLinkVpcResultDeserializer;
impl DetachClassicLinkVpcResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DetachClassicLinkVpcResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DetachClassicLinkVpcResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DetachInternetGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DetachInternetGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the Internet gateway.</p>"]
    pub internet_gateway_id: String,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `DetachInternetGatewayRequest` contents to a `SignedRequest`.
struct DetachInternetGatewayRequestSerializer;
impl DetachInternetGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DetachInternetGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InternetGatewayId"),
                   &obj.internet_gateway_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DetachNetworkInterface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DetachNetworkInterfaceRequest {
    #[doc="<p>The ID of the attachment.</p>"]
    pub attachment_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Specifies whether to force a detachment.</p>"]
    pub force: Option<bool>,
}


/// Serialize `DetachNetworkInterfaceRequest` contents to a `SignedRequest`.
struct DetachNetworkInterfaceRequestSerializer;
impl DetachNetworkInterfaceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DetachNetworkInterfaceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AttachmentId"),
                   &obj.attachment_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.force {
            params.put(&format!("{}{}", prefix, "Force"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for DetachVolume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DetachVolumeRequest {
    #[doc="<p>The device name.</p>"]
    pub device: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.</p>"]
    pub force: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: String,
}


/// Serialize `DetachVolumeRequest` contents to a `SignedRequest`.
struct DetachVolumeRequestSerializer;
impl DetachVolumeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DetachVolumeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.device {
            params.put(&format!("{}{}", prefix, "Device"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.force {
            params.put(&format!("{}{}", prefix, "Force"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_id {
            params.put(&format!("{}{}", prefix, "InstanceId"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DetachVpnGateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DetachVpnGatewayRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
    #[doc="<p>The ID of the virtual private gateway.</p>"]
    pub vpn_gateway_id: String,
}


/// Serialize `DetachVpnGatewayRequest` contents to a `SignedRequest`.
struct DetachVpnGatewayRequestSerializer;
impl DetachVpnGatewayRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DetachVpnGatewayRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "VpnGatewayId"),
                   &obj.vpn_gateway_id.replace("+", "%2B"));

    }
}

struct DeviceTypeDeserializer;
impl DeviceTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a DHCP configuration option.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DhcpConfiguration {
    #[doc="<p>The name of a DHCP option.</p>"]
    pub key: Option<String>,
    #[doc="<p>One or more values for the DHCP option.</p>"]
    pub values: Option<Vec<AttributeValue>>,
}

struct DhcpConfigurationDeserializer;
impl DhcpConfigurationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DhcpConfiguration, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DhcpConfiguration::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "key" => {
                            obj.key = Some(try!(StringDeserializer::deserialize("key", stack)));
                        }
                        "valueSet" => {
                            obj.values = Some(try!(DhcpConfigurationValueListDeserializer::deserialize("valueSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct DhcpConfigurationListDeserializer;
impl DhcpConfigurationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<DhcpConfiguration>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(DhcpConfigurationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct DhcpConfigurationValueListDeserializer;
impl DhcpConfigurationValueListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<AttributeValue>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(AttributeValueDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a set of DHCP options.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DhcpOptions {
    #[doc="<p>One or more DHCP options in the set.</p>"]
    pub dhcp_configurations: Option<Vec<DhcpConfiguration>>,
    #[doc="<p>The ID of the set of DHCP options.</p>"]
    pub dhcp_options_id: Option<String>,
    #[doc="<p>Any tags assigned to the DHCP options set.</p>"]
    pub tags: Option<Vec<Tag>>,
}

struct DhcpOptionsDeserializer;
impl DhcpOptionsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DhcpOptions, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DhcpOptions::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "dhcpConfigurationSet" => {
                            obj.dhcp_configurations =
                                Some(try!(DhcpConfigurationListDeserializer::deserialize("dhcpConfigurationSet",
                                                                                         stack)));
                        }
                        "dhcpOptionsId" => {
                            obj.dhcp_options_id =
                                Some(try!(StringDeserializer::deserialize("dhcpOptionsId", stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `DhcpOptionsIdStringList` contents to a `SignedRequest`.
struct DhcpOptionsIdStringListSerializer;
impl DhcpOptionsIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct DhcpOptionsListDeserializer;
impl DhcpOptionsListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<DhcpOptions>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(DhcpOptionsDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DisableVgwRoutePropagation.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DisableVgwRoutePropagationRequest {
    #[doc="<p>The ID of the virtual private gateway.</p>"]
    pub gateway_id: String,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: String,
}


/// Serialize `DisableVgwRoutePropagationRequest` contents to a `SignedRequest`.
struct DisableVgwRoutePropagationRequestSerializer;
impl DisableVgwRoutePropagationRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisableVgwRoutePropagationRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "GatewayId"),
                   &obj.gateway_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for DisableVpcClassicLinkDnsSupport.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DisableVpcClassicLinkDnsSupportRequest {
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}


/// Serialize `DisableVpcClassicLinkDnsSupportRequest` contents to a `SignedRequest`.
struct DisableVpcClassicLinkDnsSupportRequestSerializer;
impl DisableVpcClassicLinkDnsSupportRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisableVpcClassicLinkDnsSupportRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.vpc_id {
            params.put(&format!("{}{}", prefix, "VpcId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of DisableVpcClassicLinkDnsSupport.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DisableVpcClassicLinkDnsSupportResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct DisableVpcClassicLinkDnsSupportResultDeserializer;
impl DisableVpcClassicLinkDnsSupportResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DisableVpcClassicLinkDnsSupportResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DisableVpcClassicLinkDnsSupportResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DisableVpcClassicLink.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DisableVpcClassicLinkRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `DisableVpcClassicLinkRequest` contents to a `SignedRequest`.
struct DisableVpcClassicLinkRequestSerializer;
impl DisableVpcClassicLinkRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisableVpcClassicLinkRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of DisableVpcClassicLink.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DisableVpcClassicLinkResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct DisableVpcClassicLinkResultDeserializer;
impl DisableVpcClassicLinkResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DisableVpcClassicLinkResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DisableVpcClassicLinkResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DisassociateAddress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DisassociateAddressRequest {
    #[doc="<p>[EC2-VPC] The association ID. Required for EC2-VPC.</p>"]
    pub association_id: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>[EC2-Classic] The Elastic IP address. Required for EC2-Classic.</p>"]
    pub public_ip: Option<String>,
}


/// Serialize `DisassociateAddressRequest` contents to a `SignedRequest`.
struct DisassociateAddressRequestSerializer;
impl DisassociateAddressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisassociateAddressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.association_id {
            params.put(&format!("{}{}", prefix, "AssociationId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.public_ip {
            params.put(&format!("{}{}", prefix, "PublicIp"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DisassociateIamInstanceProfileRequest {
    #[doc="<p>The ID of the IAM instance profile association.</p>"]
    pub association_id: String,
}


/// Serialize `DisassociateIamInstanceProfileRequest` contents to a `SignedRequest`.
struct DisassociateIamInstanceProfileRequestSerializer;
impl DisassociateIamInstanceProfileRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisassociateIamInstanceProfileRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AssociationId"),
                   &obj.association_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct DisassociateIamInstanceProfileResult {
    #[doc="<p>Information about the IAM instance profile association.</p>"]
    pub iam_instance_profile_association: Option<IamInstanceProfileAssociation>,
}

struct DisassociateIamInstanceProfileResultDeserializer;
impl DisassociateIamInstanceProfileResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DisassociateIamInstanceProfileResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DisassociateIamInstanceProfileResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "iamInstanceProfileAssociation" => {
                            obj.iam_instance_profile_association = Some(try!(IamInstanceProfileAssociationDeserializer::deserialize("iamInstanceProfileAssociation", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for DisassociateRouteTable.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DisassociateRouteTableRequest {
    #[doc="<p>The association ID representing the current association between the route table and subnet.</p>"]
    pub association_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
}


/// Serialize `DisassociateRouteTableRequest` contents to a `SignedRequest`.
struct DisassociateRouteTableRequestSerializer;
impl DisassociateRouteTableRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisassociateRouteTableRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AssociationId"),
                   &obj.association_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct DisassociateSubnetCidrBlockRequest {
    #[doc="<p>The association ID for the CIDR block.</p>"]
    pub association_id: String,
}


/// Serialize `DisassociateSubnetCidrBlockRequest` contents to a `SignedRequest`.
struct DisassociateSubnetCidrBlockRequestSerializer;
impl DisassociateSubnetCidrBlockRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisassociateSubnetCidrBlockRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AssociationId"),
                   &obj.association_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct DisassociateSubnetCidrBlockResult {
    #[doc="<p>Information about the IPv6 CIDR block association.</p>"]
    pub ipv_6_cidr_block_association: Option<SubnetIpv6CidrBlockAssociation>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: Option<String>,
}

struct DisassociateSubnetCidrBlockResultDeserializer;
impl DisassociateSubnetCidrBlockResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<DisassociateSubnetCidrBlockResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DisassociateSubnetCidrBlockResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipv6CidrBlockAssociation" => {
                            obj.ipv_6_cidr_block_association = Some(try!(SubnetIpv6CidrBlockAssociationDeserializer::deserialize("ipv6CidrBlockAssociation", stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct DisassociateVpcCidrBlockRequest {
    #[doc="<p>The association ID for the CIDR block.</p>"]
    pub association_id: String,
}


/// Serialize `DisassociateVpcCidrBlockRequest` contents to a `SignedRequest`.
struct DisassociateVpcCidrBlockRequestSerializer;
impl DisassociateVpcCidrBlockRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DisassociateVpcCidrBlockRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AssociationId"),
                   &obj.association_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct DisassociateVpcCidrBlockResult {
    #[doc="<p>Information about the IPv6 CIDR block association.</p>"]
    pub ipv_6_cidr_block_association: Option<VpcIpv6CidrBlockAssociation>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct DisassociateVpcCidrBlockResultDeserializer;
impl DisassociateVpcCidrBlockResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DisassociateVpcCidrBlockResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DisassociateVpcCidrBlockResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipv6CidrBlockAssociation" => {
                            obj.ipv_6_cidr_block_association = Some(try!(VpcIpv6CidrBlockAssociationDeserializer::deserialize("ipv6CidrBlockAssociation", stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a disk image.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DiskImage {
    #[doc="<p>A description of the disk image.</p>"]
    pub description: Option<String>,
    #[doc="<p>Information about the disk image.</p>"]
    pub image: Option<DiskImageDetail>,
    #[doc="<p>Information about the volume.</p>"]
    pub volume: Option<VolumeDetail>,
}


/// Serialize `DiskImage` contents to a `SignedRequest`.
struct DiskImageSerializer;
impl DiskImageSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DiskImage) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.image {
            DiskImageDetailSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "Image"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.volume {
            VolumeDetailSerializer::serialize(params,
                                              &format!("{}{}", prefix, "Volume"),
                                              field_value);
        }

    }
}

#[doc="<p>Describes a disk image.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DiskImageDescription {
    #[doc="<p>The checksum computed for the disk image.</p>"]
    pub checksum: Option<String>,
    #[doc="<p>The disk image format.</p>"]
    pub format: String,
    #[doc="<p>A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the \"Query String Request Authentication Alternative\" section of the <a href=\"http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html\">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    pub import_manifest_url: String,
    #[doc="<p>The size of the disk image, in GiB.</p>"]
    pub size: i64,
}

struct DiskImageDescriptionDeserializer;
impl DiskImageDescriptionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DiskImageDescription, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DiskImageDescription::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "checksum" => {
                            obj.checksum = Some(try!(StringDeserializer::deserialize("checksum",
                                                                                     stack)));
                        }
                        "format" => {
                            obj.format = try!(DiskImageFormatDeserializer::deserialize("format",
                                                                                       stack));
                        }
                        "importManifestUrl" => {
                            obj.import_manifest_url = try!(StringDeserializer::deserialize("importManifestUrl",
                                                                                           stack));
                        }
                        "size" => {
                            obj.size = try!(LongDeserializer::deserialize("size", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a disk image.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DiskImageDetail {
    #[doc="<p>The size of the disk image, in GiB.</p>"]
    pub bytes: i64,
    #[doc="<p>The disk image format.</p>"]
    pub format: String,
    #[doc="<p>A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the \"Query String Request Authentication Alternative\" section of the <a href=\"http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html\">Authenticating REST Requests</a> topic in the <i>Amazon Simple Storage Service Developer Guide</i>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    pub import_manifest_url: String,
}


/// Serialize `DiskImageDetail` contents to a `SignedRequest`.
struct DiskImageDetailSerializer;
impl DiskImageDetailSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &DiskImageDetail) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Bytes"),
                   &obj.bytes.to_string().replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "Format"),
                   &obj.format.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "ImportManifestUrl"),
                   &obj.import_manifest_url.replace("+", "%2B"));

    }
}

struct DiskImageFormatDeserializer;
impl DiskImageFormatDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `DiskImageList` contents to a `SignedRequest`.
struct DiskImageListSerializer;
impl DiskImageListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<DiskImage>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            DiskImageSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes a disk image volume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct DiskImageVolumeDescription {
    #[doc="<p>The volume identifier.</p>"]
    pub id: String,
    #[doc="<p>The size of the volume, in GiB.</p>"]
    pub size: Option<i64>,
}

struct DiskImageVolumeDescriptionDeserializer;
impl DiskImageVolumeDescriptionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<DiskImageVolumeDescription, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = DiskImageVolumeDescription::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "id" => {
                            obj.id = try!(StringDeserializer::deserialize("id", stack));
                        }
                        "size" => {
                            obj.size = Some(try!(LongDeserializer::deserialize("size", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct DomainTypeDeserializer;
impl DomainTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct DoubleDeserializer;
impl DoubleDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<f64, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = f64::from_str(try!(characters(stack)).as_ref()).unwrap();
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a block device for an EBS volume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EbsBlockDevice {
    #[doc="<p>Indicates whether the EBS volume is deleted on instance termination.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.</p>"]
    pub encrypted: Option<bool>,
    #[doc="<p>The number of I/O operations per second (IOPS) that the volume supports. For <code>io1</code>, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code>, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html\">Amazon EBS Volume Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>Constraint: Range is 100-20000 IOPS for <code>io1</code> volumes and 100-10000 IOPS for <code>gp2</code> volumes.</p> <p>Condition: This parameter is required for requests to create <code>io1</code> volumes; it is not used in requests to create <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>"]
    pub iops: Option<i64>,
    #[doc="<p>The ID of the snapshot.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>The size of the volume, in GiB.</p> <p>Constraints: 1-16384 for General Purpose SSD (<code>gp2</code>), 4-16384 for Provisioned IOPS SSD (<code>io1</code>), 500-16384 for Throughput Optimized HDD (<code>st1</code>), 500-16384 for Cold HDD (<code>sc1</code>), and 1-1024 for Magnetic (<code>standard</code>) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.</p> <p>Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.</p>"]
    pub volume_size: Option<i64>,
    #[doc="<p>The volume type: <code>gp2</code>, <code>io1</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code>.</p> <p>Default: <code>standard</code> </p>"]
    pub volume_type: Option<String>,
}

struct EbsBlockDeviceDeserializer;
impl EbsBlockDeviceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<EbsBlockDevice, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = EbsBlockDevice::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "deleteOnTermination" => {
                            obj.delete_on_termination =
                                Some(try!(BooleanDeserializer::deserialize("deleteOnTermination",
                                                                           stack)));
                        }
                        "encrypted" => {
                            obj.encrypted = Some(try!(BooleanDeserializer::deserialize("encrypted",
                                                                                       stack)));
                        }
                        "iops" => {
                            obj.iops = Some(try!(IntegerDeserializer::deserialize("iops", stack)));
                        }
                        "snapshotId" => {
                            obj.snapshot_id = Some(try!(StringDeserializer::deserialize("snapshotId",
                                                                                        stack)));
                        }
                        "volumeSize" => {
                            obj.volume_size = Some(try!(IntegerDeserializer::deserialize("volumeSize",
                                                                                         stack)));
                        }
                        "volumeType" => {
                            obj.volume_type =
                                Some(try!(VolumeTypeDeserializer::deserialize("volumeType",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `EbsBlockDevice` contents to a `SignedRequest`.
struct EbsBlockDeviceSerializer;
impl EbsBlockDeviceSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &EbsBlockDevice) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.delete_on_termination {
            params.put(&format!("{}{}", prefix, "DeleteOnTermination"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.encrypted {
            params.put(&format!("{}{}", prefix, "Encrypted"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.iops {
            params.put(&format!("{}{}", prefix, "Iops"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.snapshot_id {
            params.put(&format!("{}{}", prefix, "SnapshotId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_size {
            params.put(&format!("{}{}", prefix, "VolumeSize"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_type {
            params.put(&format!("{}{}", prefix, "VolumeType"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a parameter used to set up an EBS volume in a block device mapping.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EbsInstanceBlockDevice {
    #[doc="<p>The time stamp when the attachment initiated.</p>"]
    pub attach_time: Option<String>,
    #[doc="<p>Indicates whether the volume is deleted on instance termination.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>The attachment state.</p>"]
    pub status: Option<String>,
    #[doc="<p>The ID of the EBS volume.</p>"]
    pub volume_id: Option<String>,
}

struct EbsInstanceBlockDeviceDeserializer;
impl EbsInstanceBlockDeviceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<EbsInstanceBlockDevice, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = EbsInstanceBlockDevice::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachTime" => {
                            obj.attach_time = Some(try!(DateTimeDeserializer::deserialize("attachTime",
                                                                                          stack)));
                        }
                        "deleteOnTermination" => {
                            obj.delete_on_termination =
                                Some(try!(BooleanDeserializer::deserialize("deleteOnTermination",
                                                                           stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(AttachmentStatusDeserializer::deserialize("status",
                                                                                    stack)));
                        }
                        "volumeId" => {
                            obj.volume_id = Some(try!(StringDeserializer::deserialize("volumeId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes information used to set up an EBS volume specified in a block device mapping.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EbsInstanceBlockDeviceSpecification {
    #[doc="<p>Indicates whether the volume is deleted on instance termination.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>The ID of the EBS volume.</p>"]
    pub volume_id: Option<String>,
}


/// Serialize `EbsInstanceBlockDeviceSpecification` contents to a `SignedRequest`.
struct EbsInstanceBlockDeviceSpecificationSerializer;
impl EbsInstanceBlockDeviceSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &EbsInstanceBlockDeviceSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.delete_on_termination {
            params.put(&format!("{}{}", prefix, "DeleteOnTermination"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_id {
            params.put(&format!("{}{}", prefix, "VolumeId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes an egress-only Internet gateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EgressOnlyInternetGateway {
    #[doc="<p>Information about the attachment of the egress-only Internet gateway.</p>"]
    pub attachments: Option<Vec<InternetGatewayAttachment>>,
    #[doc="<p>The ID of the egress-only Internet gateway.</p>"]
    pub egress_only_internet_gateway_id: Option<String>,
}

struct EgressOnlyInternetGatewayDeserializer;
impl EgressOnlyInternetGatewayDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<EgressOnlyInternetGateway, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = EgressOnlyInternetGateway::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachmentSet" => {
                            obj.attachments = Some(try!(InternetGatewayAttachmentListDeserializer::deserialize("attachmentSet", stack)));
                        }
                        "egressOnlyInternetGatewayId" => {
                            obj.egress_only_internet_gateway_id = Some(try!(EgressOnlyInternetGatewayIdDeserializer::deserialize("egressOnlyInternetGatewayId", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct EgressOnlyInternetGatewayIdDeserializer;
impl EgressOnlyInternetGatewayIdDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `EgressOnlyInternetGatewayIdList` contents to a `SignedRequest`.
struct EgressOnlyInternetGatewayIdListSerializer;
impl EgressOnlyInternetGatewayIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct EgressOnlyInternetGatewayListDeserializer;
impl EgressOnlyInternetGatewayListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<EgressOnlyInternetGateway>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(EgressOnlyInternetGatewayDeserializer::deserialize("item",
                                                                                         stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the association between an instance and an Elastic GPU.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ElasticGpuAssociation {
    #[doc="<p>The ID of the association.</p>"]
    pub elastic_gpu_association_id: Option<String>,
    #[doc="<p>The state of the association between the instance and the Elastic GPU.</p>"]
    pub elastic_gpu_association_state: Option<String>,
    #[doc="<p>The time the Elastic GPU was associated with the instance.</p>"]
    pub elastic_gpu_association_time: Option<String>,
    #[doc="<p>The ID of the Elastic GPU.</p>"]
    pub elastic_gpu_id: Option<String>,
}

struct ElasticGpuAssociationDeserializer;
impl ElasticGpuAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ElasticGpuAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ElasticGpuAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "elasticGpuAssociationId" => {
                            obj.elastic_gpu_association_id =
                                Some(try!(StringDeserializer::deserialize("elasticGpuAssociationId",
                                                                          stack)));
                        }
                        "elasticGpuAssociationState" => {
                            obj.elastic_gpu_association_state =
                                Some(try!(StringDeserializer::deserialize("elasticGpuAssociationState",
                                                                          stack)));
                        }
                        "elasticGpuAssociationTime" => {
                            obj.elastic_gpu_association_time =
                                Some(try!(StringDeserializer::deserialize("elasticGpuAssociationTime",
                                                                          stack)));
                        }
                        "elasticGpuId" => {
                            obj.elastic_gpu_id = Some(try!(StringDeserializer::deserialize("elasticGpuId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ElasticGpuAssociationListDeserializer;
impl ElasticGpuAssociationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ElasticGpuAssociation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ElasticGpuAssociationDeserializer::deserialize("item",
                                                                                     stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the status of an Elastic GPU.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ElasticGpuHealth {
    #[doc="<p>The health status.</p>"]
    pub status: Option<String>,
}

struct ElasticGpuHealthDeserializer;
impl ElasticGpuHealthDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ElasticGpuHealth, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ElasticGpuHealth::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "status" => {
                            obj.status =
                                Some(try!(ElasticGpuStatusDeserializer::deserialize("status",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ElasticGpuIdSet` contents to a `SignedRequest`.
struct ElasticGpuIdSetSerializer;
impl ElasticGpuIdSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ElasticGpuSetDeserializer;
impl ElasticGpuSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ElasticGpus>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "member" {
                        obj.push(try!(ElasticGpusDeserializer::deserialize("member", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>A specification for an Elastic GPU.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ElasticGpuSpecification {
    #[doc="<p>The type of Elastic GPU.</p>"]
    pub type_: String,
}


/// Serialize `ElasticGpuSpecification` contents to a `SignedRequest`.
struct ElasticGpuSpecificationSerializer;
impl ElasticGpuSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ElasticGpuSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Type"),
                   &obj.type_.replace("+", "%2B"));

    }
}


/// Serialize `ElasticGpuSpecifications` contents to a `SignedRequest`.
struct ElasticGpuSpecificationsSerializer;
impl ElasticGpuSpecificationsSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<ElasticGpuSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            ElasticGpuSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}

struct ElasticGpuStateDeserializer;
impl ElasticGpuStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ElasticGpuStatusDeserializer;
impl ElasticGpuStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an Elastic GPU.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ElasticGpus {
    #[doc="<p>The Availability Zone in the which the Elastic GPU resides.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The status of the Elastic GPU.</p>"]
    pub elastic_gpu_health: Option<ElasticGpuHealth>,
    #[doc="<p>The ID of the Elastic GPU.</p>"]
    pub elastic_gpu_id: Option<String>,
    #[doc="<p>The state of the Elastic GPU.</p>"]
    pub elastic_gpu_state: Option<String>,
    #[doc="<p>The type of Elastic GPU.</p>"]
    pub elastic_gpu_type: Option<String>,
    #[doc="<p>The ID of the instance to which the Elastic GPU is attached.</p>"]
    pub instance_id: Option<String>,
}

struct ElasticGpusDeserializer;
impl ElasticGpusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ElasticGpus, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ElasticGpus::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "elasticGpuHealth" => {
                            obj.elastic_gpu_health =
                                Some(try!(ElasticGpuHealthDeserializer::deserialize("elasticGpuHealth",
                                                                                    stack)));
                        }
                        "elasticGpuId" => {
                            obj.elastic_gpu_id = Some(try!(StringDeserializer::deserialize("elasticGpuId",
                                                                                           stack)));
                        }
                        "elasticGpuState" => {
                            obj.elastic_gpu_state =
                                Some(try!(ElasticGpuStateDeserializer::deserialize("elasticGpuState",
                                                                                   stack)));
                        }
                        "elasticGpuType" => {
                            obj.elastic_gpu_type =
                                Some(try!(StringDeserializer::deserialize("elasticGpuType",
                                                                          stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for EnableVgwRoutePropagation.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EnableVgwRoutePropagationRequest {
    #[doc="<p>The ID of the virtual private gateway.</p>"]
    pub gateway_id: String,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: String,
}


/// Serialize `EnableVgwRoutePropagationRequest` contents to a `SignedRequest`.
struct EnableVgwRoutePropagationRequestSerializer;
impl EnableVgwRoutePropagationRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &EnableVgwRoutePropagationRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "GatewayId"),
                   &obj.gateway_id.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for EnableVolumeIO.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EnableVolumeIORequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: String,
}


/// Serialize `EnableVolumeIORequest` contents to a `SignedRequest`.
struct EnableVolumeIORequestSerializer;
impl EnableVolumeIORequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &EnableVolumeIORequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for EnableVpcClassicLinkDnsSupport.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EnableVpcClassicLinkDnsSupportRequest {
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}


/// Serialize `EnableVpcClassicLinkDnsSupportRequest` contents to a `SignedRequest`.
struct EnableVpcClassicLinkDnsSupportRequestSerializer;
impl EnableVpcClassicLinkDnsSupportRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &EnableVpcClassicLinkDnsSupportRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.vpc_id {
            params.put(&format!("{}{}", prefix, "VpcId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of EnableVpcClassicLinkDnsSupport.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EnableVpcClassicLinkDnsSupportResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct EnableVpcClassicLinkDnsSupportResultDeserializer;
impl EnableVpcClassicLinkDnsSupportResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<EnableVpcClassicLinkDnsSupportResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = EnableVpcClassicLinkDnsSupportResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for EnableVpcClassicLink.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EnableVpcClassicLinkRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `EnableVpcClassicLinkRequest` contents to a `SignedRequest`.
struct EnableVpcClassicLinkRequestSerializer;
impl EnableVpcClassicLinkRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &EnableVpcClassicLinkRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of EnableVpcClassicLink.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EnableVpcClassicLinkResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct EnableVpcClassicLinkResultDeserializer;
impl EnableVpcClassicLinkResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<EnableVpcClassicLinkResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = EnableVpcClassicLinkResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct EventCodeDeserializer;
impl EventCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a Spot fleet event.</p>"]
#[derive(Default,Debug,Clone)]
pub struct EventInformation {
    #[doc="<p>The description of the event.</p>"]
    pub event_description: Option<String>,
    #[doc="<p>The event.</p> <p>The following are the <code>error</code> events.</p> <ul> <li> <p> <code>iamFleetRoleInvalid</code> - The Spot fleet did not have the required permissions either to launch or terminate an instance.</p> </li> <li> <p> <code>launchSpecTemporarilyBlacklisted</code> - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.</p> </li> <li> <p> <code>spotFleetRequestConfigurationInvalid</code> - The configuration is not valid. For more information, see the description of the event.</p> </li> <li> <p> <code>spotInstanceCountLimitExceeded</code> - You've reached the limit on the number of Spot instances that you can launch.</p> </li> </ul> <p>The following are the <code>fleetRequestChange</code> events.</p> <ul> <li> <p> <code>active</code> - The Spot fleet has been validated and Amazon EC2 is attempting to maintain the target number of running Spot instances.</p> </li> <li> <p> <code>cancelled</code> - The Spot fleet is canceled and has no running Spot instances. The Spot fleet will be deleted two days after its instances were terminated.</p> </li> <li> <p> <code>cancelled_running</code> - The Spot fleet is canceled and will not launch additional Spot instances, but its existing Spot instances continue to run until they are interrupted or terminated.</p> </li> <li> <p> <code>cancelled_terminating</code> - The Spot fleet is canceled and its Spot instances are terminating.</p> </li> <li> <p> <code>expired</code> - The Spot fleet request has expired. A subsequent event indicates that the instances were terminated, if the request was created with <code>TerminateInstancesWithExpiration</code> set.</p> </li> <li> <p> <code>modify_in_progress</code> - A request to modify the Spot fleet request was accepted and is in progress.</p> </li> <li> <p> <code>modify_successful</code> - The Spot fleet request was modified.</p> </li> <li> <p> <code>price_update</code> - The bid price for a launch configuration was adjusted because it was too high. This change is permanent.</p> </li> <li> <p> <code>submitted</code> - The Spot fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of Spot instances.</p> </li> </ul> <p>The following are the <code>instanceChange</code> events.</p> <ul> <li> <p> <code>launched</code> - A bid was fulfilled and a new instance was launched.</p> </li> <li> <p> <code>terminated</code> - An instance was terminated by the user.</p> </li> </ul>"]
    pub event_sub_type: Option<String>,
    #[doc="<p>The ID of the instance. This information is available only for <code>instanceChange</code> events.</p>"]
    pub instance_id: Option<String>,
}

struct EventInformationDeserializer;
impl EventInformationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<EventInformation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = EventInformation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "eventDescription" => {
                            obj.event_description =
                                Some(try!(StringDeserializer::deserialize("eventDescription",
                                                                          stack)));
                        }
                        "eventSubType" => {
                            obj.event_sub_type = Some(try!(StringDeserializer::deserialize("eventSubType",
                                                                                           stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct EventTypeDeserializer;
impl EventTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ExcessCapacityTerminationPolicyDeserializer;
impl ExcessCapacityTerminationPolicyDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ExecutableByStringList` contents to a `SignedRequest`.
struct ExecutableByStringListSerializer;
impl ExecutableByStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ExportEnvironmentDeserializer;
impl ExportEnvironmentDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an instance export task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ExportTask {
    #[doc="<p>A description of the resource being exported.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of the export task.</p>"]
    pub export_task_id: Option<String>,
    #[doc="<p>Information about the export task.</p>"]
    pub export_to_s3_task: Option<ExportToS3Task>,
    #[doc="<p>Information about the instance to export.</p>"]
    pub instance_export_details: Option<InstanceExportDetails>,
    #[doc="<p>The state of the export task.</p>"]
    pub state: Option<String>,
    #[doc="<p>The status message related to the export task.</p>"]
    pub status_message: Option<String>,
}

struct ExportTaskDeserializer;
impl ExportTaskDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ExportTask, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ExportTask::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "exportTaskId" => {
                            obj.export_task_id = Some(try!(StringDeserializer::deserialize("exportTaskId",
                                                                                           stack)));
                        }
                        "exportToS3" => {
                            obj.export_to_s3_task =
                                Some(try!(ExportToS3TaskDeserializer::deserialize("exportToS3",
                                                                                  stack)));
                        }
                        "instanceExport" => {
                            obj.instance_export_details =
                                Some(try!(InstanceExportDetailsDeserializer::deserialize("instanceExport",
                                                                                         stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(ExportTaskStateDeserializer::deserialize("state",
                                                                                           stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ExportTaskIdStringList` contents to a `SignedRequest`.
struct ExportTaskIdStringListSerializer;
impl ExportTaskIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ExportTaskListDeserializer;
impl ExportTaskListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ExportTask>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ExportTaskDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct ExportTaskStateDeserializer;
impl ExportTaskStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the format and location for an instance export task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ExportToS3Task {
    #[doc="<p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>"]
    pub container_format: Option<String>,
    #[doc="<p>The format for the exported image.</p>"]
    pub disk_image_format: Option<String>,
    #[doc="<p>The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account <code>vm-import-export@amazon.com</code>.</p>"]
    pub s3_bucket: Option<String>,
    #[doc="<p>The encryption key for your S3 bucket.</p>"]
    pub s3_key: Option<String>,
}

struct ExportToS3TaskDeserializer;
impl ExportToS3TaskDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ExportToS3Task, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ExportToS3Task::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "containerFormat" => {
                            obj.container_format =
                                Some(try!(ContainerFormatDeserializer::deserialize("containerFormat",
                                                                                   stack)));
                        }
                        "diskImageFormat" => {
                            obj.disk_image_format =
                                Some(try!(DiskImageFormatDeserializer::deserialize("diskImageFormat",
                                                                                   stack)));
                        }
                        "s3Bucket" => {
                            obj.s3_bucket = Some(try!(StringDeserializer::deserialize("s3Bucket",
                                                                                      stack)));
                        }
                        "s3Key" => {
                            obj.s3_key = Some(try!(StringDeserializer::deserialize("s3Key",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an instance export task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ExportToS3TaskSpecification {
    #[doc="<p>The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.</p>"]
    pub container_format: Option<String>,
    #[doc="<p>The format for the exported image.</p>"]
    pub disk_image_format: Option<String>,
    #[doc="<p>The S3 bucket for the destination image. The destination bucket must exist and grant WRITE and READ_ACP permissions to the AWS account <code>vm-import-export@amazon.com</code>.</p>"]
    pub s3_bucket: Option<String>,
    #[doc="<p>The image is written to a single object in the S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.</p>"]
    pub s3_prefix: Option<String>,
}


/// Serialize `ExportToS3TaskSpecification` contents to a `SignedRequest`.
struct ExportToS3TaskSpecificationSerializer;
impl ExportToS3TaskSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ExportToS3TaskSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.container_format {
            params.put(&format!("{}{}", prefix, "ContainerFormat"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.disk_image_format {
            params.put(&format!("{}{}", prefix, "DiskImageFormat"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.s3_bucket {
            params.put(&format!("{}{}", prefix, "S3Bucket"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.s3_prefix {
            params.put(&format!("{}{}", prefix, "S3Prefix"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Filter {
    #[doc="<p>The name of the filter. Filter names are case-sensitive.</p>"]
    pub name: Option<String>,
    #[doc="<p>One or more filter values. Filter values are case-sensitive.</p>"]
    pub values: Option<Vec<String>>,
}


/// Serialize `Filter` contents to a `SignedRequest`.
struct FilterSerializer;
impl FilterSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Filter) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.name {
            params.put(&format!("{}{}", prefix, "Name"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.values {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "Value"),
                                                 field_value);
        }

    }
}


/// Serialize `FilterList` contents to a `SignedRequest`.
struct FilterListSerializer;
impl FilterListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<Filter>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            FilterSerializer::serialize(params, &key, obj);
        }
    }
}

struct FleetTypeDeserializer;
impl FleetTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct FloatDeserializer;
impl FloatDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<f32, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = f32::from_str(try!(characters(stack)).as_ref()).unwrap();
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a flow log.</p>"]
#[derive(Default,Debug,Clone)]
pub struct FlowLog {
    #[doc="<p>The date and time the flow log was created.</p>"]
    pub creation_time: Option<String>,
    #[doc="<p>Information about the error that occurred. <code>Rate limited</code> indicates that CloudWatch logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of CloudWatch Logs log groups that you can create. <code>Access error</code> indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. <code>Unknown error</code> indicates an internal error.</p>"]
    pub deliver_logs_error_message: Option<String>,
    #[doc="<p>The ARN of the IAM role that posts logs to CloudWatch Logs.</p>"]
    pub deliver_logs_permission_arn: Option<String>,
    #[doc="<p>The status of the logs delivery (<code>SUCCESS</code> | <code>FAILED</code>).</p>"]
    pub deliver_logs_status: Option<String>,
    #[doc="<p>The flow log ID.</p>"]
    pub flow_log_id: Option<String>,
    #[doc="<p>The status of the flow log (<code>ACTIVE</code>).</p>"]
    pub flow_log_status: Option<String>,
    #[doc="<p>The name of the flow log group.</p>"]
    pub log_group_name: Option<String>,
    #[doc="<p>The ID of the resource on which the flow log was created.</p>"]
    pub resource_id: Option<String>,
    #[doc="<p>The type of traffic captured for the flow log.</p>"]
    pub traffic_type: Option<String>,
}

struct FlowLogDeserializer;
impl FlowLogDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<FlowLog, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = FlowLog::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "creationTime" => {
                            obj.creation_time =
                                Some(try!(DateTimeDeserializer::deserialize("creationTime",
                                                                            stack)));
                        }
                        "deliverLogsErrorMessage" => {
                            obj.deliver_logs_error_message =
                                Some(try!(StringDeserializer::deserialize("deliverLogsErrorMessage",
                                                                          stack)));
                        }
                        "deliverLogsPermissionArn" => {
                            obj.deliver_logs_permission_arn =
                                Some(try!(StringDeserializer::deserialize("deliverLogsPermissionArn",
                                                                          stack)));
                        }
                        "deliverLogsStatus" => {
                            obj.deliver_logs_status =
                                Some(try!(StringDeserializer::deserialize("deliverLogsStatus",
                                                                          stack)));
                        }
                        "flowLogId" => {
                            obj.flow_log_id = Some(try!(StringDeserializer::deserialize("flowLogId",
                                                                                        stack)));
                        }
                        "flowLogStatus" => {
                            obj.flow_log_status =
                                Some(try!(StringDeserializer::deserialize("flowLogStatus", stack)));
                        }
                        "logGroupName" => {
                            obj.log_group_name = Some(try!(StringDeserializer::deserialize("logGroupName",
                                                                                           stack)));
                        }
                        "resourceId" => {
                            obj.resource_id = Some(try!(StringDeserializer::deserialize("resourceId",
                                                                                        stack)));
                        }
                        "trafficType" => {
                            obj.traffic_type =
                                Some(try!(TrafficTypeDeserializer::deserialize("trafficType",
                                                                               stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct FlowLogSetDeserializer;
impl FlowLogSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<FlowLog>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(FlowLogDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes an Amazon FPGA image (AFI).</p>"]
#[derive(Default,Debug,Clone)]
pub struct FpgaImage {
    #[doc="<p>The date and time the AFI was created.</p>"]
    pub create_time: Option<String>,
    #[doc="<p>The description of the AFI.</p>"]
    pub description: Option<String>,
    #[doc="<p>The global FPGA image identifier (AGFI ID).</p>"]
    pub fpga_image_global_id: Option<String>,
    #[doc="<p>The FPGA image identifier (AFI ID).</p>"]
    pub fpga_image_id: Option<String>,
    #[doc="<p>The name of the AFI.</p>"]
    pub name: Option<String>,
    #[doc="<p>The alias of the AFI owner. Possible values include <code>self</code>, <code>amazon</code>, and <code>aws-marketplace</code>.</p>"]
    pub owner_alias: Option<String>,
    #[doc="<p>The AWS account ID of the AFI owner.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>Information about the PCI bus.</p>"]
    pub pci_id: Option<PciId>,
    #[doc="<p>The product codes for the AFI.</p>"]
    pub product_codes: Option<Vec<ProductCode>>,
    #[doc="<p>The version of the AWS Shell that was used to create the bitstream.</p>"]
    pub shell_version: Option<String>,
    #[doc="<p>Information about the state of the AFI.</p>"]
    pub state: Option<FpgaImageState>,
    #[doc="<p>Any tags assigned to the AFI.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The time of the most recent update to the AFI.</p>"]
    pub update_time: Option<String>,
}

struct FpgaImageDeserializer;
impl FpgaImageDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<FpgaImage, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = FpgaImage::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "createTime" => {
                            obj.create_time = Some(try!(DateTimeDeserializer::deserialize("createTime",
                                                                                          stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "fpgaImageGlobalId" => {
                            obj.fpga_image_global_id =
                                Some(try!(StringDeserializer::deserialize("fpgaImageGlobalId",
                                                                          stack)));
                        }
                        "fpgaImageId" => {
                            obj.fpga_image_id = Some(try!(StringDeserializer::deserialize("fpgaImageId",
                                                                                          stack)));
                        }
                        "name" => {
                            obj.name = Some(try!(StringDeserializer::deserialize("name", stack)));
                        }
                        "ownerAlias" => {
                            obj.owner_alias = Some(try!(StringDeserializer::deserialize("ownerAlias",
                                                                                        stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "pciId" => {
                            obj.pci_id = Some(try!(PciIdDeserializer::deserialize("pciId", stack)));
                        }
                        "productCodes" => {
                            obj.product_codes =
                                Some(try!(ProductCodeListDeserializer::deserialize("productCodes",
                                                                                   stack)));
                        }
                        "shellVersion" => {
                            obj.shell_version = Some(try!(StringDeserializer::deserialize("shellVersion",
                                                                                          stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(FpgaImageStateDeserializer::deserialize("state",
                                                                                          stack)));
                        }
                        "tags" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tags", stack)));
                        }
                        "updateTime" => {
                            obj.update_time = Some(try!(DateTimeDeserializer::deserialize("updateTime",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `FpgaImageIdList` contents to a `SignedRequest`.
struct FpgaImageIdListSerializer;
impl FpgaImageIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct FpgaImageListDeserializer;
impl FpgaImageListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<FpgaImage>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(FpgaImageDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the state of the bitstream generation process for an Amazon FPGA image (AFI).</p>"]
#[derive(Default,Debug,Clone)]
pub struct FpgaImageState {
    #[doc="<p>The state. The following are the possible values:</p> <ul> <li> <p> <code>pending</code> - AFI bitstream generation is in progress.</p> </li> <li> <p> <code>available</code> - The AFI is available for use.</p> </li> <li> <p> <code>failed</code> - AFI bitstream generation failed.</p> </li> <li> <p> <code>unavailable</code> - The AFI is no longer available for use.</p> </li> </ul>"]
    pub code: Option<String>,
    #[doc="<p>If the state is <code>failed</code>, this is the error message.</p>"]
    pub message: Option<String>,
}

struct FpgaImageStateDeserializer;
impl FpgaImageStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<FpgaImageState, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = FpgaImageState::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code =
                                Some(try!(FpgaImageStateCodeDeserializer::deserialize("code",
                                                                                      stack)));
                        }
                        "message" => {
                            obj.message = Some(try!(StringDeserializer::deserialize("message",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct FpgaImageStateCodeDeserializer;
impl FpgaImageStateCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct GatewayTypeDeserializer;
impl GatewayTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for GetConsoleOutput.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetConsoleOutputRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
}


/// Serialize `GetConsoleOutputRequest` contents to a `SignedRequest`.
struct GetConsoleOutputRequestSerializer;
impl GetConsoleOutputRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &GetConsoleOutputRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of GetConsoleOutput.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetConsoleOutputResult {
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The console output, Base64-encoded. If using a command line tool, the tool decodes the output for you.</p>"]
    pub output: Option<String>,
    #[doc="<p>The time the output was last updated.</p>"]
    pub timestamp: Option<String>,
}

struct GetConsoleOutputResultDeserializer;
impl GetConsoleOutputResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<GetConsoleOutputResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = GetConsoleOutputResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "output" => {
                            obj.output = Some(try!(StringDeserializer::deserialize("output",
                                                                                   stack)));
                        }
                        "timestamp" => {
                            obj.timestamp = Some(try!(DateTimeDeserializer::deserialize("timestamp",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for the request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetConsoleScreenshotRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
    #[doc="<p>When set to <code>true</code>, acts as keystroke input and wakes up an instance that's in standby or \"sleep\" mode.</p>"]
    pub wake_up: Option<bool>,
}


/// Serialize `GetConsoleScreenshotRequest` contents to a `SignedRequest`.
struct GetConsoleScreenshotRequestSerializer;
impl GetConsoleScreenshotRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &GetConsoleScreenshotRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.wake_up {
            params.put(&format!("{}{}", prefix, "WakeUp"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of the request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetConsoleScreenshotResult {
    #[doc="<p>The data that comprises the image.</p>"]
    pub image_data: Option<String>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
}

struct GetConsoleScreenshotResultDeserializer;
impl GetConsoleScreenshotResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<GetConsoleScreenshotResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = GetConsoleScreenshotResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "imageData" => {
                            obj.image_data = Some(try!(StringDeserializer::deserialize("imageData",
                                                                                       stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct GetHostReservationPurchasePreviewRequest {
    #[doc="<p>The ID/s of the Dedicated Host/s that the reservation will be associated with.</p>"]
    pub host_id_set: Vec<String>,
    #[doc="<p>The offering ID of the reservation.</p>"]
    pub offering_id: String,
}


/// Serialize `GetHostReservationPurchasePreviewRequest` contents to a `SignedRequest`.
struct GetHostReservationPurchasePreviewRequestSerializer;
impl GetHostReservationPurchasePreviewRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &GetHostReservationPurchasePreviewRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        RequestHostIdSetSerializer::serialize(params,
                                              &format!("{}{}", prefix, "HostIdSet"),
                                              &obj.host_id_set);
        params.put(&format!("{}{}", prefix, "OfferingId"),
                   &obj.offering_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct GetHostReservationPurchasePreviewResult {
    #[doc="<p>The currency in which the <code>totalUpfrontPrice</code> and <code>totalHourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The purchase information of the Dedicated Host Reservation and the Dedicated Hosts associated with it.</p>"]
    pub purchase: Option<Vec<Purchase>>,
    #[doc="<p>The potential total hourly price of the reservation per hour.</p>"]
    pub total_hourly_price: Option<String>,
    #[doc="<p>The potential total upfront price. This is billed immediately.</p>"]
    pub total_upfront_price: Option<String>,
}

struct GetHostReservationPurchasePreviewResultDeserializer;
impl GetHostReservationPurchasePreviewResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<GetHostReservationPurchasePreviewResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = GetHostReservationPurchasePreviewResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "purchase" => {
                            obj.purchase = Some(try!(PurchaseSetDeserializer::deserialize("purchase",
                                                                                          stack)));
                        }
                        "totalHourlyPrice" => {
                            obj.total_hourly_price =
                                Some(try!(StringDeserializer::deserialize("totalHourlyPrice",
                                                                          stack)));
                        }
                        "totalUpfrontPrice" => {
                            obj.total_upfront_price =
                                Some(try!(StringDeserializer::deserialize("totalUpfrontPrice",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for GetPasswordData.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetPasswordDataRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the Windows instance.</p>"]
    pub instance_id: String,
}


/// Serialize `GetPasswordDataRequest` contents to a `SignedRequest`.
struct GetPasswordDataRequestSerializer;
impl GetPasswordDataRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &GetPasswordDataRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of GetPasswordData.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetPasswordDataResult {
    #[doc="<p>The ID of the Windows instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The password of the instance.</p>"]
    pub password_data: Option<String>,
    #[doc="<p>The time the data was last updated.</p>"]
    pub timestamp: Option<String>,
}

struct GetPasswordDataResultDeserializer;
impl GetPasswordDataResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<GetPasswordDataResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = GetPasswordDataResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "passwordData" => {
                            obj.password_data = Some(try!(StringDeserializer::deserialize("passwordData",
                                                                                          stack)));
                        }
                        "timestamp" => {
                            obj.timestamp = Some(try!(DateTimeDeserializer::deserialize("timestamp",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for GetReservedInstanceExchangeQuote.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetReservedInstancesExchangeQuoteRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The IDs of the Convertible Reserved Instances to exchange.</p>"]
    pub reserved_instance_ids: Vec<String>,
    #[doc="<p>The configuration requirements of the Convertible Reserved Instances to exchange for your current Convertible Reserved Instances.</p>"]
    pub target_configurations: Option<Vec<TargetConfigurationRequest>>,
}


/// Serialize `GetReservedInstancesExchangeQuoteRequest` contents to a `SignedRequest`.
struct GetReservedInstancesExchangeQuoteRequestSerializer;
impl GetReservedInstancesExchangeQuoteRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &GetReservedInstancesExchangeQuoteRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        ReservedInstanceIdSetSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "ReservedInstanceId"),
                                                   &obj.reserved_instance_ids);
        if let Some(ref field_value) = obj.target_configurations {
            TargetConfigurationRequestSetSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "TargetConfiguration"),
                                                               field_value);
        }

    }
}

#[doc="<p>Contains the output of GetReservedInstancesExchangeQuote.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GetReservedInstancesExchangeQuoteResult {
    #[doc="<p>The currency of the transaction.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>If <code>true</code>, the exchange is valid. If <code>false</code>, the exchange cannot be completed.</p>"]
    pub is_valid_exchange: Option<bool>,
    #[doc="<p>The new end date of the reservation term.</p>"]
    pub output_reserved_instances_will_expire_at: Option<String>,
    #[doc="<p>The total true upfront charge for the exchange.</p>"]
    pub payment_due: Option<String>,
    #[doc="<p>The cost associated with the Reserved Instance.</p>"]
    pub reserved_instance_value_rollup: Option<ReservationValue>,
    #[doc="<p>The configuration of your Convertible Reserved Instances.</p>"]
    pub reserved_instance_value_set: Option<Vec<ReservedInstanceReservationValue>>,
    #[doc="<p>The cost associated with the Reserved Instance.</p>"]
    pub target_configuration_value_rollup: Option<ReservationValue>,
    #[doc="<p>The values of the target Convertible Reserved Instances.</p>"]
    pub target_configuration_value_set: Option<Vec<TargetReservationValue>>,
    #[doc="<p>Describes the reason why the exchange cannot be completed.</p>"]
    pub validation_failure_reason: Option<String>,
}

struct GetReservedInstancesExchangeQuoteResultDeserializer;
impl GetReservedInstancesExchangeQuoteResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<GetReservedInstancesExchangeQuoteResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = GetReservedInstancesExchangeQuoteResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "currencyCode" => {
                            obj.currency_code = Some(try!(StringDeserializer::deserialize("currencyCode",
                                                                                          stack)));
                        }
                        "isValidExchange" => {
                            obj.is_valid_exchange =
                                Some(try!(BooleanDeserializer::deserialize("isValidExchange",
                                                                           stack)));
                        }
                        "outputReservedInstancesWillExpireAt" => {
                            obj.output_reserved_instances_will_expire_at =
                                Some(try!(DateTimeDeserializer::deserialize("outputReservedInstancesWillExpireAt",
                                                                            stack)));
                        }
                        "paymentDue" => {
                            obj.payment_due = Some(try!(StringDeserializer::deserialize("paymentDue",
                                                                                        stack)));
                        }
                        "reservedInstanceValueRollup" => {
                            obj.reserved_instance_value_rollup =
                                Some(try!(ReservationValueDeserializer::deserialize("reservedInstanceValueRollup",
                                                                                    stack)));
                        }
                        "reservedInstanceValueSet" => {
                            obj.reserved_instance_value_set = Some(try!(ReservedInstanceReservationValueSetDeserializer::deserialize("reservedInstanceValueSet", stack)));
                        }
                        "targetConfigurationValueRollup" => {
                            obj.target_configuration_value_rollup =
                                Some(try!(ReservationValueDeserializer::deserialize("targetConfigurationValueRollup",
                                                                                    stack)));
                        }
                        "targetConfigurationValueSet" => {
                            obj.target_configuration_value_set = Some(try!(TargetReservationValueSetDeserializer::deserialize("targetConfigurationValueSet", stack)));
                        }
                        "validationFailureReason" => {
                            obj.validation_failure_reason =
                                Some(try!(StringDeserializer::deserialize("validationFailureReason",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `GroupIdStringList` contents to a `SignedRequest`.
struct GroupIdStringListSerializer;
impl GroupIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes a security group.</p>"]
#[derive(Default,Debug,Clone)]
pub struct GroupIdentifier {
    #[doc="<p>The ID of the security group.</p>"]
    pub group_id: Option<String>,
    #[doc="<p>The name of the security group.</p>"]
    pub group_name: Option<String>,
}

struct GroupIdentifierDeserializer;
impl GroupIdentifierDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<GroupIdentifier, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = GroupIdentifier::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupId" => {
                            obj.group_id = Some(try!(StringDeserializer::deserialize("groupId",
                                                                                     stack)));
                        }
                        "groupName" => {
                            obj.group_name = Some(try!(StringDeserializer::deserialize("groupName",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `GroupIdentifier` contents to a `SignedRequest`.
struct GroupIdentifierSerializer;
impl GroupIdentifierSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &GroupIdentifier) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.group_id {
            params.put(&format!("{}{}", prefix, "GroupId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct GroupIdentifierListDeserializer;
impl GroupIdentifierListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<GroupIdentifier>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(GroupIdentifierDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `GroupIdentifierList` contents to a `SignedRequest`.
struct GroupIdentifierListSerializer;
impl GroupIdentifierListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<GroupIdentifier>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            GroupIdentifierSerializer::serialize(params, &key, obj);
        }
    }
}


/// Serialize `GroupIds` contents to a `SignedRequest`.
struct GroupIdsSerializer;
impl GroupIdsSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}


/// Serialize `GroupNameStringList` contents to a `SignedRequest`.
struct GroupNameStringListSerializer;
impl GroupNameStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes an event in the history of the Spot fleet request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct HistoryRecord {
    #[doc="<p>Information about the event.</p>"]
    pub event_information: EventInformation,
    #[doc="<p>The event type.</p> <ul> <li> <p> <code>error</code> - Indicates an error with the Spot fleet request.</p> </li> <li> <p> <code>fleetRequestChange</code> - Indicates a change in the status or configuration of the Spot fleet request.</p> </li> <li> <p> <code>instanceChange</code> - Indicates that an instance was launched or terminated.</p> </li> </ul>"]
    pub event_type: String,
    #[doc="<p>The date and time of the event, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub timestamp: String,
}

struct HistoryRecordDeserializer;
impl HistoryRecordDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<HistoryRecord, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = HistoryRecord::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "eventInformation" => {
                            obj.event_information =
                                try!(EventInformationDeserializer::deserialize("eventInformation",
                                                                               stack));
                        }
                        "eventType" => {
                            obj.event_type = try!(EventTypeDeserializer::deserialize("eventType",
                                                                                     stack));
                        }
                        "timestamp" => {
                            obj.timestamp = try!(DateTimeDeserializer::deserialize("timestamp",
                                                                                   stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct HistoryRecordsDeserializer;
impl HistoryRecordsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<HistoryRecord>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(HistoryRecordDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the properties of the Dedicated Host.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Host {
    #[doc="<p>Whether auto-placement is on or off.</p>"]
    pub auto_placement: Option<String>,
    #[doc="<p>The Availability Zone of the Dedicated Host.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The number of new instances that can be launched onto the Dedicated Host.</p>"]
    pub available_capacity: Option<AvailableCapacity>,
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p>"]
    pub client_token: Option<String>,
    #[doc="<p>The ID of the Dedicated Host.</p>"]
    pub host_id: Option<String>,
    #[doc="<p>The hardware specifications of the Dedicated Host.</p>"]
    pub host_properties: Option<HostProperties>,
    #[doc="<p>The reservation ID of the Dedicated Host. This returns a <code>null</code> response if the Dedicated Host doesn't have an associated reservation.</p>"]
    pub host_reservation_id: Option<String>,
    #[doc="<p>The IDs and instance type that are currently running on the Dedicated Host.</p>"]
    pub instances: Option<Vec<HostInstance>>,
    #[doc="<p>The Dedicated Host's state.</p>"]
    pub state: Option<String>,
}

struct HostDeserializer;
impl HostDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Host, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Host::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "autoPlacement" => {
                            obj.auto_placement =
                                Some(try!(AutoPlacementDeserializer::deserialize("autoPlacement",
                                                                                 stack)));
                        }
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "availableCapacity" => {
                            obj.available_capacity =
                                Some(try!(AvailableCapacityDeserializer::deserialize("availableCapacity",
                                                                                     stack)));
                        }
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "hostId" => {
                            obj.host_id = Some(try!(StringDeserializer::deserialize("hostId",
                                                                                    stack)));
                        }
                        "hostProperties" => {
                            obj.host_properties =
                                Some(try!(HostPropertiesDeserializer::deserialize("hostProperties",
                                                                                  stack)));
                        }
                        "hostReservationId" => {
                            obj.host_reservation_id =
                                Some(try!(StringDeserializer::deserialize("hostReservationId",
                                                                          stack)));
                        }
                        "instances" => {
                            obj.instances =
                                Some(try!(HostInstanceListDeserializer::deserialize("instances",
                                                                                    stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(AllocationStateDeserializer::deserialize("state",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an instance running on a Dedicated Host.</p>"]
#[derive(Default,Debug,Clone)]
pub struct HostInstance {
    #[doc="<p>the IDs of instances that are running on the Dedicated Host.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The instance type size (for example, <code>m3.medium</code>) of the running instance.</p>"]
    pub instance_type: Option<String>,
}

struct HostInstanceDeserializer;
impl HostInstanceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<HostInstance, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = HostInstance::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "instanceType" => {
                            obj.instance_type = Some(try!(StringDeserializer::deserialize("instanceType",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct HostInstanceListDeserializer;
impl HostInstanceListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<HostInstance>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(HostInstanceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct HostListDeserializer;
impl HostListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Host>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(HostDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Details about the Dedicated Host Reservation offering.</p>"]
#[derive(Default,Debug,Clone)]
pub struct HostOffering {
    #[doc="<p>The currency of the offering.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The duration of the offering (in seconds).</p>"]
    pub duration: Option<i64>,
    #[doc="<p>The hourly price of the offering.</p>"]
    pub hourly_price: Option<String>,
    #[doc="<p>The instance family of the offering.</p>"]
    pub instance_family: Option<String>,
    #[doc="<p>The ID of the offering.</p>"]
    pub offering_id: Option<String>,
    #[doc="<p>The available payment option.</p>"]
    pub payment_option: Option<String>,
    #[doc="<p>The upfront price of the offering. Does not apply to No Upfront offerings.</p>"]
    pub upfront_price: Option<String>,
}

struct HostOfferingDeserializer;
impl HostOfferingDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<HostOffering, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = HostOffering::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "duration" => {
                            obj.duration = Some(try!(IntegerDeserializer::deserialize("duration",
                                                                                      stack)));
                        }
                        "hourlyPrice" => {
                            obj.hourly_price = Some(try!(StringDeserializer::deserialize("hourlyPrice",
                                                                                         stack)));
                        }
                        "instanceFamily" => {
                            obj.instance_family =
                                Some(try!(StringDeserializer::deserialize("instanceFamily",
                                                                          stack)));
                        }
                        "offeringId" => {
                            obj.offering_id = Some(try!(StringDeserializer::deserialize("offeringId",
                                                                                        stack)));
                        }
                        "paymentOption" => {
                            obj.payment_option =
                                Some(try!(PaymentOptionDeserializer::deserialize("paymentOption",
                                                                                 stack)));
                        }
                        "upfrontPrice" => {
                            obj.upfront_price = Some(try!(StringDeserializer::deserialize("upfrontPrice",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct HostOfferingSetDeserializer;
impl HostOfferingSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<HostOffering>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "member" {
                        obj.push(try!(HostOfferingDeserializer::deserialize("member", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes properties of a Dedicated Host.</p>"]
#[derive(Default,Debug,Clone)]
pub struct HostProperties {
    #[doc="<p>The number of cores on the Dedicated Host.</p>"]
    pub cores: Option<i64>,
    #[doc="<p>The instance type size that the Dedicated Host supports (for example, <code>m3.medium</code>).</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The number of sockets on the Dedicated Host.</p>"]
    pub sockets: Option<i64>,
    #[doc="<p>The number of vCPUs on the Dedicated Host.</p>"]
    pub total_v_cpus: Option<i64>,
}

struct HostPropertiesDeserializer;
impl HostPropertiesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<HostProperties, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = HostProperties::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "cores" => {
                            obj.cores = Some(try!(IntegerDeserializer::deserialize("cores",
                                                                                   stack)));
                        }
                        "instanceType" => {
                            obj.instance_type = Some(try!(StringDeserializer::deserialize("instanceType",
                                                                                          stack)));
                        }
                        "sockets" => {
                            obj.sockets = Some(try!(IntegerDeserializer::deserialize("sockets",
                                                                                     stack)));
                        }
                        "totalVCpus" => {
                            obj.total_v_cpus = Some(try!(IntegerDeserializer::deserialize("totalVCpus",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Details about the Dedicated Host Reservation and associated Dedicated Hosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct HostReservation {
    #[doc="<p>The number of Dedicated Hosts the reservation is associated with.</p>"]
    pub count: Option<i64>,
    #[doc="<p>The currency in which the <code>upfrontPrice</code> and <code>hourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The length of the reservation's term, specified in seconds. Can be <code>31536000 (1 year)</code> | <code>94608000 (3 years)</code>.</p>"]
    pub duration: Option<i64>,
    #[doc="<p>The date and time that the reservation ends.</p>"]
    pub end: Option<String>,
    #[doc="<p>The IDs of the Dedicated Hosts associated with the reservation.</p>"]
    pub host_id_set: Option<Vec<String>>,
    #[doc="<p>The ID of the reservation that specifies the associated Dedicated Hosts.</p>"]
    pub host_reservation_id: Option<String>,
    #[doc="<p>The hourly price of the reservation.</p>"]
    pub hourly_price: Option<String>,
    #[doc="<p>The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.</p>"]
    pub instance_family: Option<String>,
    #[doc="<p>The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.</p>"]
    pub offering_id: Option<String>,
    #[doc="<p>The payment option selected for this reservation.</p>"]
    pub payment_option: Option<String>,
    #[doc="<p>The date and time that the reservation started.</p>"]
    pub start: Option<String>,
    #[doc="<p>The state of the reservation.</p>"]
    pub state: Option<String>,
    #[doc="<p>The upfront price of the reservation.</p>"]
    pub upfront_price: Option<String>,
}

struct HostReservationDeserializer;
impl HostReservationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<HostReservation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = HostReservation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "count" => {
                            obj.count = Some(try!(IntegerDeserializer::deserialize("count",
                                                                                   stack)));
                        }
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "duration" => {
                            obj.duration = Some(try!(IntegerDeserializer::deserialize("duration",
                                                                                      stack)));
                        }
                        "end" => {
                            obj.end = Some(try!(DateTimeDeserializer::deserialize("end", stack)));
                        }
                        "hostIdSet" => {
                            obj.host_id_set =
                                Some(try!(ResponseHostIdSetDeserializer::deserialize("hostIdSet",
                                                                                     stack)));
                        }
                        "hostReservationId" => {
                            obj.host_reservation_id =
                                Some(try!(StringDeserializer::deserialize("hostReservationId",
                                                                          stack)));
                        }
                        "hourlyPrice" => {
                            obj.hourly_price = Some(try!(StringDeserializer::deserialize("hourlyPrice",
                                                                                         stack)));
                        }
                        "instanceFamily" => {
                            obj.instance_family =
                                Some(try!(StringDeserializer::deserialize("instanceFamily",
                                                                          stack)));
                        }
                        "offeringId" => {
                            obj.offering_id = Some(try!(StringDeserializer::deserialize("offeringId",
                                                                                        stack)));
                        }
                        "paymentOption" => {
                            obj.payment_option =
                                Some(try!(PaymentOptionDeserializer::deserialize("paymentOption",
                                                                                 stack)));
                        }
                        "start" => {
                            obj.start = Some(try!(DateTimeDeserializer::deserialize("start",
                                                                                    stack)));
                        }
                        "state" => {
                            obj.state =
                                Some(try!(ReservationStateDeserializer::deserialize("state",
                                                                                    stack)));
                        }
                        "upfrontPrice" => {
                            obj.upfront_price = Some(try!(StringDeserializer::deserialize("upfrontPrice",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `HostReservationIdSet` contents to a `SignedRequest`.
struct HostReservationIdSetSerializer;
impl HostReservationIdSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct HostReservationSetDeserializer;
impl HostReservationSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<HostReservation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(HostReservationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct HypervisorTypeDeserializer;
impl HypervisorTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an IAM instance profile.</p>"]
#[derive(Default,Debug,Clone)]
pub struct IamInstanceProfile {
    #[doc="<p>The Amazon Resource Name (ARN) of the instance profile.</p>"]
    pub arn: Option<String>,
    #[doc="<p>The ID of the instance profile.</p>"]
    pub id: Option<String>,
}

struct IamInstanceProfileDeserializer;
impl IamInstanceProfileDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<IamInstanceProfile, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = IamInstanceProfile::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "arn" => {
                            obj.arn = Some(try!(StringDeserializer::deserialize("arn", stack)));
                        }
                        "id" => {
                            obj.id = Some(try!(StringDeserializer::deserialize("id", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an association between an IAM instance profile and an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct IamInstanceProfileAssociation {
    #[doc="<p>The ID of the association.</p>"]
    pub association_id: Option<String>,
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: Option<IamInstanceProfile>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The state of the association.</p>"]
    pub state: Option<String>,
    #[doc="<p>The time the IAM instance profile was associated with the instance.</p>"]
    pub timestamp: Option<String>,
}

struct IamInstanceProfileAssociationDeserializer;
impl IamInstanceProfileAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<IamInstanceProfileAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = IamInstanceProfileAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associationId" => {
                            obj.association_id = Some(try!(StringDeserializer::deserialize("associationId",
                                                                                           stack)));
                        }
                        "iamInstanceProfile" => {
                            obj.iam_instance_profile =
                                Some(try!(IamInstanceProfileDeserializer::deserialize("iamInstanceProfile",
                                                                                      stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(IamInstanceProfileAssociationStateDeserializer::deserialize("state", stack)));
                        }
                        "timestamp" => {
                            obj.timestamp = Some(try!(DateTimeDeserializer::deserialize("timestamp",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct IamInstanceProfileAssociationSetDeserializer;
impl IamInstanceProfileAssociationSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<IamInstanceProfileAssociation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(IamInstanceProfileAssociationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct IamInstanceProfileAssociationStateDeserializer;
impl IamInstanceProfileAssociationStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an IAM instance profile.</p>"]
#[derive(Default,Debug,Clone)]
pub struct IamInstanceProfileSpecification {
    #[doc="<p>The Amazon Resource Name (ARN) of the instance profile.</p>"]
    pub arn: Option<String>,
    #[doc="<p>The name of the instance profile.</p>"]
    pub name: Option<String>,
}

struct IamInstanceProfileSpecificationDeserializer;
impl IamInstanceProfileSpecificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<IamInstanceProfileSpecification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = IamInstanceProfileSpecification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "arn" => {
                            obj.arn = Some(try!(StringDeserializer::deserialize("arn", stack)));
                        }
                        "name" => {
                            obj.name = Some(try!(StringDeserializer::deserialize("name", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `IamInstanceProfileSpecification` contents to a `SignedRequest`.
struct IamInstanceProfileSpecificationSerializer;
impl IamInstanceProfileSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &IamInstanceProfileSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.arn {
            params.put(&format!("{}{}", prefix, "Arn"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.name {
            params.put(&format!("{}{}", prefix, "Name"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes the ICMP type and code.</p>"]
#[derive(Default,Debug,Clone)]
pub struct IcmpTypeCode {
    #[doc="<p>The ICMP code. A value of -1 means all codes for the specified ICMP type.</p>"]
    pub code: Option<i64>,
    #[doc="<p>The ICMP type. A value of -1 means all types.</p>"]
    pub type_: Option<i64>,
}

struct IcmpTypeCodeDeserializer;
impl IcmpTypeCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<IcmpTypeCode, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = IcmpTypeCode::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(IntegerDeserializer::deserialize("code", stack)));
                        }
                        "type" => {
                            obj.type_ = Some(try!(IntegerDeserializer::deserialize("type", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `IcmpTypeCode` contents to a `SignedRequest`.
struct IcmpTypeCodeSerializer;
impl IcmpTypeCodeSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &IcmpTypeCode) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.code {
            params.put(&format!("{}{}", prefix, "Code"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.type_ {
            params.put(&format!("{}{}", prefix, "Type"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes the ID format for a resource.</p>"]
#[derive(Default,Debug,Clone)]
pub struct IdFormat {
    #[doc="<p>The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.</p>"]
    pub deadline: Option<String>,
    #[doc="<p>The type of resource.</p>"]
    pub resource: Option<String>,
    #[doc="<p>Indicates whether longer IDs (17-character IDs) are enabled for the resource.</p>"]
    pub use_long_ids: Option<bool>,
}

struct IdFormatDeserializer;
impl IdFormatDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<IdFormat, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = IdFormat::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "deadline" => {
                            obj.deadline = Some(try!(DateTimeDeserializer::deserialize("deadline",
                                                                                       stack)));
                        }
                        "resource" => {
                            obj.resource = Some(try!(StringDeserializer::deserialize("resource",
                                                                                     stack)));
                        }
                        "useLongIds" => {
                            obj.use_long_ids = Some(try!(BooleanDeserializer::deserialize("useLongIds",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct IdFormatListDeserializer;
impl IdFormatListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<IdFormat>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(IdFormatDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes an image.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Image {
    #[doc="<p>The architecture of the image.</p>"]
    pub architecture: Option<String>,
    #[doc="<p>Any block device mapping entries.</p>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>The date and time the image was created.</p>"]
    pub creation_date: Option<String>,
    #[doc="<p>The description of the AMI that was provided during image creation.</p>"]
    pub description: Option<String>,
    #[doc="<p>Specifies whether enhanced networking with ENA is enabled.</p>"]
    pub ena_support: Option<bool>,
    #[doc="<p>The hypervisor type of the image.</p>"]
    pub hypervisor: Option<String>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The location of the AMI.</p>"]
    pub image_location: Option<String>,
    #[doc="<p>The AWS account alias (for example, <code>amazon</code>, <code>self</code>) or the AWS account ID of the AMI owner.</p>"]
    pub image_owner_alias: Option<String>,
    #[doc="<p>The type of image.</p>"]
    pub image_type: Option<String>,
    #[doc="<p>The kernel associated with the image, if any. Only applicable for machine images.</p>"]
    pub kernel_id: Option<String>,
    #[doc="<p>The name of the AMI that was provided during image creation.</p>"]
    pub name: Option<String>,
    #[doc="<p>The AWS account ID of the image owner.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>The value is <code>Windows</code> for Windows AMIs; otherwise blank.</p>"]
    pub platform: Option<String>,
    #[doc="<p>Any product codes associated with the AMI.</p>"]
    pub product_codes: Option<Vec<ProductCode>>,
    #[doc="<p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>"]
    pub public: Option<bool>,
    #[doc="<p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>The device name of the root device (for example, <code>/dev/sda1</code> or <code>/dev/xvda</code>).</p>"]
    pub root_device_name: Option<String>,
    #[doc="<p>The type of root device used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>"]
    pub root_device_type: Option<String>,
    #[doc="<p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>"]
    pub sriov_net_support: Option<String>,
    #[doc="<p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>"]
    pub state: Option<String>,
    #[doc="<p>The reason for the state change.</p>"]
    pub state_reason: Option<StateReason>,
    #[doc="<p>Any tags assigned to the image.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The type of virtualization of the AMI.</p>"]
    pub virtualization_type: Option<String>,
}

struct ImageDeserializer;
impl ImageDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Image, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Image::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "architecture" => {
                            obj.architecture =
                                Some(try!(ArchitectureValuesDeserializer::deserialize("architecture",
                                                                                      stack)));
                        }
                        "blockDeviceMapping" => {
                            obj.block_device_mappings =
                                Some(try!(BlockDeviceMappingListDeserializer::deserialize("blockDeviceMapping",
                                                                                          stack)));
                        }
                        "creationDate" => {
                            obj.creation_date = Some(try!(StringDeserializer::deserialize("creationDate",
                                                                                          stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "enaSupport" => {
                            obj.ena_support = Some(try!(BooleanDeserializer::deserialize("enaSupport",
                                                                                         stack)));
                        }
                        "hypervisor" => {
                            obj.hypervisor =
                                Some(try!(HypervisorTypeDeserializer::deserialize("hypervisor",
                                                                                  stack)));
                        }
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        "imageLocation" => {
                            obj.image_location = Some(try!(StringDeserializer::deserialize("imageLocation",
                                                                                           stack)));
                        }
                        "imageOwnerAlias" => {
                            obj.image_owner_alias =
                                Some(try!(StringDeserializer::deserialize("imageOwnerAlias",
                                                                          stack)));
                        }
                        "imageType" => {
                            obj.image_type =
                                Some(try!(ImageTypeValuesDeserializer::deserialize("imageType",
                                                                                   stack)));
                        }
                        "kernelId" => {
                            obj.kernel_id = Some(try!(StringDeserializer::deserialize("kernelId",
                                                                                      stack)));
                        }
                        "name" => {
                            obj.name = Some(try!(StringDeserializer::deserialize("name", stack)));
                        }
                        "imageOwnerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("imageOwnerId",
                                                                                     stack)));
                        }
                        "platform" => {
                            obj.platform =
                                Some(try!(PlatformValuesDeserializer::deserialize("platform",
                                                                                  stack)));
                        }
                        "productCodes" => {
                            obj.product_codes =
                                Some(try!(ProductCodeListDeserializer::deserialize("productCodes",
                                                                                   stack)));
                        }
                        "isPublic" => {
                            obj.public = Some(try!(BooleanDeserializer::deserialize("isPublic",
                                                                                    stack)));
                        }
                        "ramdiskId" => {
                            obj.ramdisk_id = Some(try!(StringDeserializer::deserialize("ramdiskId",
                                                                                       stack)));
                        }
                        "rootDeviceName" => {
                            obj.root_device_name =
                                Some(try!(StringDeserializer::deserialize("rootDeviceName",
                                                                          stack)));
                        }
                        "rootDeviceType" => {
                            obj.root_device_type =
                                Some(try!(DeviceTypeDeserializer::deserialize("rootDeviceType",
                                                                              stack)));
                        }
                        "sriovNetSupport" => {
                            obj.sriov_net_support =
                                Some(try!(StringDeserializer::deserialize("sriovNetSupport",
                                                                          stack)));
                        }
                        "imageState" => {
                            obj.state = Some(try!(ImageStateDeserializer::deserialize("imageState",
                                                                                      stack)));
                        }
                        "stateReason" => {
                            obj.state_reason =
                                Some(try!(StateReasonDeserializer::deserialize("stateReason",
                                                                               stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "virtualizationType" => {
                            obj.virtualization_type =
                                Some(try!(VirtualizationTypeDeserializer::deserialize("virtualizationType",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an image attribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImageAttribute {
    #[doc="<p>One or more block device mapping entries.</p>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>A description for the AMI.</p>"]
    pub description: Option<AttributeValue>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The kernel ID.</p>"]
    pub kernel_id: Option<AttributeValue>,
    #[doc="<p>One or more launch permissions.</p>"]
    pub launch_permissions: Option<Vec<LaunchPermission>>,
    #[doc="<p>One or more product codes.</p>"]
    pub product_codes: Option<Vec<ProductCode>>,
    #[doc="<p>The RAM disk ID.</p>"]
    pub ramdisk_id: Option<AttributeValue>,
    #[doc="<p>Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>"]
    pub sriov_net_support: Option<AttributeValue>,
}

struct ImageAttributeDeserializer;
impl ImageAttributeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImageAttribute, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImageAttribute::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "blockDeviceMapping" => {
                            obj.block_device_mappings =
                                Some(try!(BlockDeviceMappingListDeserializer::deserialize("blockDeviceMapping",
                                                                                          stack)));
                        }
                        "description" => {
                            obj.description =
                                Some(try!(AttributeValueDeserializer::deserialize("description",
                                                                                  stack)));
                        }
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        "kernel" => {
                            obj.kernel_id =
                                Some(try!(AttributeValueDeserializer::deserialize("kernel",
                                                                                  stack)));
                        }
                        "launchPermission" => {
                            obj.launch_permissions =
                                Some(try!(LaunchPermissionListDeserializer::deserialize("launchPermission",
                                                                                        stack)));
                        }
                        "productCodes" => {
                            obj.product_codes =
                                Some(try!(ProductCodeListDeserializer::deserialize("productCodes",
                                                                                   stack)));
                        }
                        "ramdisk" => {
                            obj.ramdisk_id =
                                Some(try!(AttributeValueDeserializer::deserialize("ramdisk",
                                                                                  stack)));
                        }
                        "sriovNetSupport" => {
                            obj.sriov_net_support =
                                Some(try!(AttributeValueDeserializer::deserialize("sriovNetSupport",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the disk container object for an import image task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImageDiskContainer {
    #[doc="<p>The description of the disk image.</p>"]
    pub description: Option<String>,
    #[doc="<p>The block device mapping for the disk.</p>"]
    pub device_name: Option<String>,
    #[doc="<p>The format of the disk image being imported.</p> <p>Valid values: <code>RAW</code> | <code>VHD</code> | <code>VMDK</code> | <code>OVA</code> </p>"]
    pub format: Option<String>,
    #[doc="<p>The ID of the EBS snapshot to be used for importing the snapshot.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)</p>"]
    pub url: Option<String>,
    #[doc="<p>The S3 bucket for the disk image.</p>"]
    pub user_bucket: Option<UserBucket>,
}


/// Serialize `ImageDiskContainer` contents to a `SignedRequest`.
struct ImageDiskContainerSerializer;
impl ImageDiskContainerSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ImageDiskContainer) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.device_name {
            params.put(&format!("{}{}", prefix, "DeviceName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.format {
            params.put(&format!("{}{}", prefix, "Format"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.snapshot_id {
            params.put(&format!("{}{}", prefix, "SnapshotId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.url {
            params.put(&format!("{}{}", prefix, "Url"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_bucket {
            UserBucketSerializer::serialize(params,
                                            &format!("{}{}", prefix, "UserBucket"),
                                            field_value);
        }

    }
}


/// Serialize `ImageDiskContainerList` contents to a `SignedRequest`.
struct ImageDiskContainerListSerializer;
impl ImageDiskContainerListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<ImageDiskContainer>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            ImageDiskContainerSerializer::serialize(params, &key, obj);
        }
    }
}


/// Serialize `ImageIdStringList` contents to a `SignedRequest`.
struct ImageIdStringListSerializer;
impl ImageIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ImageListDeserializer;
impl ImageListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Image>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ImageDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct ImageStateDeserializer;
impl ImageStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ImageTypeValuesDeserializer;
impl ImageTypeValuesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ImportImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportImageRequest {
    #[doc="<p>The architecture of the virtual machine.</p> <p>Valid values: <code>i386</code> | <code>x86_64</code> </p>"]
    pub architecture: Option<String>,
    #[doc="<p>The client-specific data.</p>"]
    pub client_data: Option<ClientData>,
    #[doc="<p>The token to enable idempotency for VM import requests.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>A description string for the import image task.</p>"]
    pub description: Option<String>,
    #[doc="<p>Information about the disk containers.</p>"]
    pub disk_containers: Option<Vec<ImageDiskContainer>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The target hypervisor platform.</p> <p>Valid values: <code>xen</code> </p>"]
    pub hypervisor: Option<String>,
    #[doc="<p>The license type to be used for the Amazon Machine Image (AMI) after importing.</p> <p> <b>Note:</b> You may only use BYOL if you have existing licenses with rights to use these licenses in a third party cloud like AWS. For more information, see <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image\">Prerequisites</a> in the VM Import/Export User Guide.</p> <p>Valid values: <code>AWS</code> | <code>BYOL</code> </p>"]
    pub license_type: Option<String>,
    #[doc="<p>The operating system of the virtual machine.</p> <p>Valid values: <code>Windows</code> | <code>Linux</code> </p>"]
    pub platform: Option<String>,
    #[doc="<p>The name of the role to use when not using the default role, 'vmimport'.</p>"]
    pub role_name: Option<String>,
}


/// Serialize `ImportImageRequest` contents to a `SignedRequest`.
struct ImportImageRequestSerializer;
impl ImportImageRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ImportImageRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.architecture {
            params.put(&format!("{}{}", prefix, "Architecture"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.client_data {
            ClientDataSerializer::serialize(params,
                                            &format!("{}{}", prefix, "ClientData"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.disk_containers {
            ImageDiskContainerListSerializer::serialize(params,
                                                        &format!("{}{}", prefix, "DiskContainer"),
                                                        field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.hypervisor {
            params.put(&format!("{}{}", prefix, "Hypervisor"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.license_type {
            params.put(&format!("{}{}", prefix, "LicenseType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.platform {
            params.put(&format!("{}{}", prefix, "Platform"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.role_name {
            params.put(&format!("{}{}", prefix, "RoleName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for ImportImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportImageResult {
    #[doc="<p>The architecture of the virtual machine.</p>"]
    pub architecture: Option<String>,
    #[doc="<p>A description of the import task.</p>"]
    pub description: Option<String>,
    #[doc="<p>The target hypervisor of the import task.</p>"]
    pub hypervisor: Option<String>,
    #[doc="<p>The ID of the Amazon Machine Image (AMI) created by the import task.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The task ID of the import image task.</p>"]
    pub import_task_id: Option<String>,
    #[doc="<p>The license type of the virtual machine.</p>"]
    pub license_type: Option<String>,
    #[doc="<p>The operating system of the virtual machine.</p>"]
    pub platform: Option<String>,
    #[doc="<p>The progress of the task.</p>"]
    pub progress: Option<String>,
    #[doc="<p>Information about the snapshots.</p>"]
    pub snapshot_details: Option<Vec<SnapshotDetail>>,
    #[doc="<p>A brief status of the task.</p>"]
    pub status: Option<String>,
    #[doc="<p>A detailed status message of the import task.</p>"]
    pub status_message: Option<String>,
}

struct ImportImageResultDeserializer;
impl ImportImageResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportImageResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportImageResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "architecture" => {
                            obj.architecture = Some(try!(StringDeserializer::deserialize("architecture",
                                                                                         stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "hypervisor" => {
                            obj.hypervisor = Some(try!(StringDeserializer::deserialize("hypervisor",
                                                                                       stack)));
                        }
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        "importTaskId" => {
                            obj.import_task_id = Some(try!(StringDeserializer::deserialize("importTaskId",
                                                                                           stack)));
                        }
                        "licenseType" => {
                            obj.license_type = Some(try!(StringDeserializer::deserialize("licenseType",
                                                                                         stack)));
                        }
                        "platform" => {
                            obj.platform = Some(try!(StringDeserializer::deserialize("platform",
                                                                                     stack)));
                        }
                        "progress" => {
                            obj.progress = Some(try!(StringDeserializer::deserialize("progress",
                                                                                     stack)));
                        }
                        "snapshotDetailSet" => {
                            obj.snapshot_details =
                                Some(try!(SnapshotDetailListDeserializer::deserialize("snapshotDetailSet",
                                                                                      stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StringDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an import image task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportImageTask {
    #[doc="<p>The architecture of the virtual machine.</p> <p>Valid values: <code>i386</code> | <code>x86_64</code> </p>"]
    pub architecture: Option<String>,
    #[doc="<p>A description of the import task.</p>"]
    pub description: Option<String>,
    #[doc="<p>The target hypervisor for the import task.</p> <p>Valid values: <code>xen</code> </p>"]
    pub hypervisor: Option<String>,
    #[doc="<p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The ID of the import image task.</p>"]
    pub import_task_id: Option<String>,
    #[doc="<p>The license type of the virtual machine.</p>"]
    pub license_type: Option<String>,
    #[doc="<p>The description string for the import image task.</p>"]
    pub platform: Option<String>,
    #[doc="<p>The percentage of progress of the import image task.</p>"]
    pub progress: Option<String>,
    #[doc="<p>Information about the snapshots.</p>"]
    pub snapshot_details: Option<Vec<SnapshotDetail>>,
    #[doc="<p>A brief status for the import image task.</p>"]
    pub status: Option<String>,
    #[doc="<p>A descriptive status message for the import image task.</p>"]
    pub status_message: Option<String>,
}

struct ImportImageTaskDeserializer;
impl ImportImageTaskDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportImageTask, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportImageTask::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "architecture" => {
                            obj.architecture = Some(try!(StringDeserializer::deserialize("architecture",
                                                                                         stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "hypervisor" => {
                            obj.hypervisor = Some(try!(StringDeserializer::deserialize("hypervisor",
                                                                                       stack)));
                        }
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        "importTaskId" => {
                            obj.import_task_id = Some(try!(StringDeserializer::deserialize("importTaskId",
                                                                                           stack)));
                        }
                        "licenseType" => {
                            obj.license_type = Some(try!(StringDeserializer::deserialize("licenseType",
                                                                                         stack)));
                        }
                        "platform" => {
                            obj.platform = Some(try!(StringDeserializer::deserialize("platform",
                                                                                     stack)));
                        }
                        "progress" => {
                            obj.progress = Some(try!(StringDeserializer::deserialize("progress",
                                                                                     stack)));
                        }
                        "snapshotDetailSet" => {
                            obj.snapshot_details =
                                Some(try!(SnapshotDetailListDeserializer::deserialize("snapshotDetailSet",
                                                                                      stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StringDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ImportImageTaskListDeserializer;
impl ImportImageTaskListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ImportImageTask>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ImportImageTaskDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the launch specification for VM import.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportInstanceLaunchSpecification {
    #[doc="<p>Reserved.</p>"]
    pub additional_info: Option<String>,
    #[doc="<p>The architecture of the instance.</p>"]
    pub architecture: Option<String>,
    #[doc="<p>One or more security group IDs.</p>"]
    pub group_ids: Option<Vec<String>>,
    #[doc="<p>One or more security group names.</p>"]
    pub group_names: Option<Vec<String>>,
    #[doc="<p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>"]
    pub instance_initiated_shutdown_behavior: Option<String>,
    #[doc="<p>The instance type. For more information about the instance types that you can import, see <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#vmimport-instance-types\">Instance Types</a> in the VM Import/Export User Guide.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>Indicates whether monitoring is enabled.</p>"]
    pub monitoring: Option<bool>,
    #[doc="<p>The placement information for the instance.</p>"]
    pub placement: Option<Placement>,
    #[doc="<p>[EC2-VPC] An available IP address from the IP address range of the subnet.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>[EC2-VPC] The ID of the subnet in which to launch the instance.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The user data to make available to the instance. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>"]
    pub user_data: Option<UserData>,
}


/// Serialize `ImportInstanceLaunchSpecification` contents to a `SignedRequest`.
struct ImportInstanceLaunchSpecificationSerializer;
impl ImportInstanceLaunchSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ImportInstanceLaunchSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.additional_info {
            params.put(&format!("{}{}", prefix, "AdditionalInfo"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.architecture {
            params.put(&format!("{}{}", prefix, "Architecture"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_ids {
            SecurityGroupIdStringListSerializer::serialize(params,
                                                           &format!("{}{}", prefix, "GroupId"),
                                                           field_value);
        }
        if let Some(ref field_value) = obj.group_names {
            SecurityGroupStringListSerializer::serialize(params,
                                                         &format!("{}{}", prefix, "GroupName"),
                                                         field_value);
        }
        if let Some(ref field_value) = obj.instance_initiated_shutdown_behavior {
            params.put(&format!("{}{}", prefix, "InstanceInitiatedShutdownBehavior"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_type {
            params.put(&format!("{}{}", prefix, "InstanceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.monitoring {
            params.put(&format!("{}{}", prefix, "Monitoring"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.placement {
            PlacementSerializer::serialize(params,
                                           &format!("{}{}", prefix, "Placement"),
                                           field_value);
        }
        if let Some(ref field_value) = obj.private_ip_address {
            params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.subnet_id {
            params.put(&format!("{}{}", prefix, "SubnetId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_data {
            UserDataSerializer::serialize(params,
                                          &format!("{}{}", prefix, "UserData"),
                                          field_value);
        }

    }
}

#[doc="<p>Contains the parameters for ImportInstance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportInstanceRequest {
    #[doc="<p>A description for the instance being imported.</p>"]
    pub description: Option<String>,
    #[doc="<p>The disk image.</p>"]
    pub disk_images: Option<Vec<DiskImage>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The launch specification.</p>"]
    pub launch_specification: Option<ImportInstanceLaunchSpecification>,
    #[doc="<p>The instance operating system.</p>"]
    pub platform: String,
}


/// Serialize `ImportInstanceRequest` contents to a `SignedRequest`.
struct ImportInstanceRequestSerializer;
impl ImportInstanceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ImportInstanceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.disk_images {
            DiskImageListSerializer::serialize(params,
                                               &format!("{}{}", prefix, "DiskImage"),
                                               field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.launch_specification {
            ImportInstanceLaunchSpecificationSerializer::serialize(params,
                                                                   &format!("{}{}",
                                                                           prefix,
                                                                           "LaunchSpecification"),
                                                                   field_value);
        }
        params.put(&format!("{}{}", prefix, "Platform"),
                   &obj.platform.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output for ImportInstance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportInstanceResult {
    #[doc="<p>Information about the conversion task.</p>"]
    pub conversion_task: Option<ConversionTask>,
}

struct ImportInstanceResultDeserializer;
impl ImportInstanceResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportInstanceResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportInstanceResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "conversionTask" => {
                            obj.conversion_task =
                                Some(try!(ConversionTaskDeserializer::deserialize("conversionTask",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an import instance task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportInstanceTaskDetails {
    #[doc="<p>A description of the task.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The instance operating system.</p>"]
    pub platform: Option<String>,
    #[doc="<p>One or more volumes.</p>"]
    pub volumes: Vec<ImportInstanceVolumeDetailItem>,
}

struct ImportInstanceTaskDetailsDeserializer;
impl ImportInstanceTaskDetailsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportInstanceTaskDetails, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportInstanceTaskDetails::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "platform" => {
                            obj.platform =
                                Some(try!(PlatformValuesDeserializer::deserialize("platform",
                                                                                  stack)));
                        }
                        "volumes" => {
                            obj.volumes =
                                try!(ImportInstanceVolumeDetailSetDeserializer::deserialize("volumes",
                                                                                            stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an import volume task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportInstanceVolumeDetailItem {
    #[doc="<p>The Availability Zone where the resulting instance will reside.</p>"]
    pub availability_zone: String,
    #[doc="<p>The number of bytes converted so far.</p>"]
    pub bytes_converted: i64,
    #[doc="<p>A description of the task.</p>"]
    pub description: Option<String>,
    #[doc="<p>The image.</p>"]
    pub image: DiskImageDescription,
    #[doc="<p>The status of the import of this particular disk image.</p>"]
    pub status: String,
    #[doc="<p>The status information or errors related to the disk image.</p>"]
    pub status_message: Option<String>,
    #[doc="<p>The volume.</p>"]
    pub volume: DiskImageVolumeDescription,
}

struct ImportInstanceVolumeDetailItemDeserializer;
impl ImportInstanceVolumeDetailItemDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportInstanceVolumeDetailItem, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportInstanceVolumeDetailItem::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone = try!(StringDeserializer::deserialize("availabilityZone",
                                                                                         stack));
                        }
                        "bytesConverted" => {
                            obj.bytes_converted = try!(LongDeserializer::deserialize("bytesConverted",
                                                                                     stack));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "image" => {
                            obj.image = try!(DiskImageDescriptionDeserializer::deserialize("image",
                                                                                           stack));
                        }
                        "status" => {
                            obj.status = try!(StringDeserializer::deserialize("status", stack));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        "volume" => {
                            obj.volume =
                                try!(DiskImageVolumeDescriptionDeserializer::deserialize("volume",
                                                                                         stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ImportInstanceVolumeDetailSetDeserializer;
impl ImportInstanceVolumeDetailSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<ImportInstanceVolumeDetailItem>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ImportInstanceVolumeDetailItemDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ImportKeyPair.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportKeyPairRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>A unique name for the key pair.</p>"]
    pub key_name: String,
    #[doc="<p>The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.</p>"]
    pub public_key_material: Vec<u8>,
}


/// Serialize `ImportKeyPairRequest` contents to a `SignedRequest`.
struct ImportKeyPairRequestSerializer;
impl ImportKeyPairRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ImportKeyPairRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "KeyName"),
                   &obj.key_name.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "PublicKeyMaterial"),
                   ::std::str::from_utf8(&obj.public_key_material)
                       .unwrap()
                       .replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of ImportKeyPair.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportKeyPairResult {
    #[doc="<p>The MD5 public key fingerprint as specified in section 4 of RFC 4716.</p>"]
    pub key_fingerprint: Option<String>,
    #[doc="<p>The key pair name you provided.</p>"]
    pub key_name: Option<String>,
}

struct ImportKeyPairResultDeserializer;
impl ImportKeyPairResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportKeyPairResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportKeyPairResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "keyFingerprint" => {
                            obj.key_fingerprint =
                                Some(try!(StringDeserializer::deserialize("keyFingerprint",
                                                                          stack)));
                        }
                        "keyName" => {
                            obj.key_name = Some(try!(StringDeserializer::deserialize("keyName",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ImportSnapshot.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportSnapshotRequest {
    #[doc="<p>The client-specific data.</p>"]
    pub client_data: Option<ClientData>,
    #[doc="<p>Token to enable idempotency for VM import requests.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The description string for the import snapshot task.</p>"]
    pub description: Option<String>,
    #[doc="<p>Information about the disk container.</p>"]
    pub disk_container: Option<SnapshotDiskContainer>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The name of the role to use when not using the default role, 'vmimport'.</p>"]
    pub role_name: Option<String>,
}


/// Serialize `ImportSnapshotRequest` contents to a `SignedRequest`.
struct ImportSnapshotRequestSerializer;
impl ImportSnapshotRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ImportSnapshotRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_data {
            ClientDataSerializer::serialize(params,
                                            &format!("{}{}", prefix, "ClientData"),
                                            field_value);
        }
        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.disk_container {
            SnapshotDiskContainerSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "DiskContainer"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.role_name {
            params.put(&format!("{}{}", prefix, "RoleName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output for ImportSnapshot.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportSnapshotResult {
    #[doc="<p>A description of the import snapshot task.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of the import snapshot task.</p>"]
    pub import_task_id: Option<String>,
    #[doc="<p>Information about the import snapshot task.</p>"]
    pub snapshot_task_detail: Option<SnapshotTaskDetail>,
}

struct ImportSnapshotResultDeserializer;
impl ImportSnapshotResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportSnapshotResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportSnapshotResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "importTaskId" => {
                            obj.import_task_id = Some(try!(StringDeserializer::deserialize("importTaskId",
                                                                                           stack)));
                        }
                        "snapshotTaskDetail" => {
                            obj.snapshot_task_detail =
                                Some(try!(SnapshotTaskDetailDeserializer::deserialize("snapshotTaskDetail",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an import snapshot task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportSnapshotTask {
    #[doc="<p>A description of the import snapshot task.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of the import snapshot task.</p>"]
    pub import_task_id: Option<String>,
    #[doc="<p>Describes an import snapshot task.</p>"]
    pub snapshot_task_detail: Option<SnapshotTaskDetail>,
}

struct ImportSnapshotTaskDeserializer;
impl ImportSnapshotTaskDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportSnapshotTask, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportSnapshotTask::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "importTaskId" => {
                            obj.import_task_id = Some(try!(StringDeserializer::deserialize("importTaskId",
                                                                                           stack)));
                        }
                        "snapshotTaskDetail" => {
                            obj.snapshot_task_detail =
                                Some(try!(SnapshotTaskDetailDeserializer::deserialize("snapshotTaskDetail",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ImportSnapshotTaskListDeserializer;
impl ImportSnapshotTaskListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ImportSnapshotTask>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ImportSnapshotTaskDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `ImportTaskIdList` contents to a `SignedRequest`.
struct ImportTaskIdListSerializer;
impl ImportTaskIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Contains the parameters for ImportVolume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportVolumeRequest {
    #[doc="<p>The Availability Zone for the resulting EBS volume.</p>"]
    pub availability_zone: String,
    #[doc="<p>A description of the volume.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The disk image.</p>"]
    pub image: DiskImageDetail,
    #[doc="<p>The volume size.</p>"]
    pub volume: VolumeDetail,
}


/// Serialize `ImportVolumeRequest` contents to a `SignedRequest`.
struct ImportVolumeRequestSerializer;
impl ImportVolumeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ImportVolumeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                   &obj.availability_zone.replace("+", "%2B"));
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        DiskImageDetailSerializer::serialize(params, &format!("{}{}", prefix, "Image"), &obj.image);
        VolumeDetailSerializer::serialize(params, &format!("{}{}", prefix, "Volume"), &obj.volume);

    }
}

#[doc="<p>Contains the output for ImportVolume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportVolumeResult {
    #[doc="<p>Information about the conversion task.</p>"]
    pub conversion_task: Option<ConversionTask>,
}

struct ImportVolumeResultDeserializer;
impl ImportVolumeResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportVolumeResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportVolumeResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "conversionTask" => {
                            obj.conversion_task =
                                Some(try!(ConversionTaskDeserializer::deserialize("conversionTask",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an import volume task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ImportVolumeTaskDetails {
    #[doc="<p>The Availability Zone where the resulting volume will reside.</p>"]
    pub availability_zone: String,
    #[doc="<p>The number of bytes converted so far.</p>"]
    pub bytes_converted: i64,
    #[doc="<p>The description you provided when starting the import volume task.</p>"]
    pub description: Option<String>,
    #[doc="<p>The image.</p>"]
    pub image: DiskImageDescription,
    #[doc="<p>The volume.</p>"]
    pub volume: DiskImageVolumeDescription,
}

struct ImportVolumeTaskDetailsDeserializer;
impl ImportVolumeTaskDetailsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ImportVolumeTaskDetails, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ImportVolumeTaskDetails::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone = try!(StringDeserializer::deserialize("availabilityZone",
                                                                                         stack));
                        }
                        "bytesConverted" => {
                            obj.bytes_converted = try!(LongDeserializer::deserialize("bytesConverted",
                                                                                     stack));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "image" => {
                            obj.image = try!(DiskImageDescriptionDeserializer::deserialize("image",
                                                                                           stack));
                        }
                        "volume" => {
                            obj.volume =
                                try!(DiskImageVolumeDescriptionDeserializer::deserialize("volume",
                                                                                         stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Instance {
    #[doc="<p>The AMI launch index, which can be used to find this instance in the launch group.</p>"]
    pub ami_launch_index: Option<i64>,
    #[doc="<p>The architecture of the image.</p>"]
    pub architecture: Option<String>,
    #[doc="<p>Any block device mapping entries for the instance.</p>"]
    pub block_device_mappings: Option<Vec<InstanceBlockDeviceMapping>>,
    #[doc="<p>The idempotency token you provided when you launched the instance, if applicable.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>"]
    pub ebs_optimized: Option<bool>,
    #[doc="<p>The Elastic GPU associated with the instance.</p>"]
    pub elastic_gpu_associations: Option<Vec<ElasticGpuAssociation>>,
    #[doc="<p>Specifies whether enhanced networking with ENA is enabled.</p>"]
    pub ena_support: Option<bool>,
    #[doc="<p>The hypervisor type of the instance.</p>"]
    pub hypervisor: Option<String>,
    #[doc="<p>The IAM instance profile associated with the instance, if applicable.</p>"]
    pub iam_instance_profile: Option<IamInstanceProfile>,
    #[doc="<p>The ID of the AMI used to launch the instance.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>Indicates whether this is a Spot instance or a Scheduled Instance.</p>"]
    pub instance_lifecycle: Option<String>,
    #[doc="<p>The instance type.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The kernel associated with this instance, if applicable.</p>"]
    pub kernel_id: Option<String>,
    #[doc="<p>The name of the key pair, if this instance was launched with an associated key pair.</p>"]
    pub key_name: Option<String>,
    #[doc="<p>The time the instance was launched.</p>"]
    pub launch_time: Option<String>,
    #[doc="<p>The monitoring for the instance.</p>"]
    pub monitoring: Option<Monitoring>,
    #[doc="<p>[EC2-VPC] One or more network interfaces for the instance.</p>"]
    pub network_interfaces: Option<Vec<InstanceNetworkInterface>>,
    #[doc="<p>The location where the instance launched, if applicable.</p>"]
    pub placement: Option<Placement>,
    #[doc="<p>The value is <code>Windows</code> for Windows instances; otherwise blank.</p>"]
    pub platform: Option<String>,
    #[doc="<p>(IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the <code>running</code> state. </p> <p>[EC2-VPC] The Amazon-provided DNS server will resolve Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>"]
    pub private_dns_name: Option<String>,
    #[doc="<p>The private IPv4 address assigned to the instance.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>The product codes attached to this instance, if applicable.</p>"]
    pub product_codes: Option<Vec<ProductCode>>,
    #[doc="<p>(IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.</p>"]
    pub public_dns_name: Option<String>,
    #[doc="<p>The public IPv4 address assigned to the instance, if applicable.</p>"]
    pub public_ip_address: Option<String>,
    #[doc="<p>The RAM disk associated with this instance, if applicable.</p>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>The root device name (for example, <code>/dev/sda1</code> or <code>/dev/xvda</code>).</p>"]
    pub root_device_name: Option<String>,
    #[doc="<p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>"]
    pub root_device_type: Option<String>,
    #[doc="<p>One or more security groups for the instance.</p>"]
    pub security_groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of <code>true</code> means checking is enabled, and <code>false</code> means checking is disabled. The value must be <code>false</code> for the instance to perform NAT. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html\">NAT Instances</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    pub source_dest_check: Option<bool>,
    #[doc="<p>If the request is a Spot instance request, the ID of the request.</p>"]
    pub spot_instance_request_id: Option<String>,
    #[doc="<p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>"]
    pub sriov_net_support: Option<String>,
    #[doc="<p>The current state of the instance.</p>"]
    pub state: Option<InstanceState>,
    #[doc="<p>The reason for the most recent state transition.</p>"]
    pub state_reason: Option<StateReason>,
    #[doc="<p>The reason for the most recent state transition. This might be an empty string.</p>"]
    pub state_transition_reason: Option<String>,
    #[doc="<p>[EC2-VPC] The ID of the subnet in which the instance is running.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>Any tags assigned to the instance.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The virtualization type of the instance.</p>"]
    pub virtualization_type: Option<String>,
    #[doc="<p>[EC2-VPC] The ID of the VPC in which the instance is running.</p>"]
    pub vpc_id: Option<String>,
}

struct InstanceDeserializer;
impl InstanceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Instance, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Instance::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "amiLaunchIndex" => {
                            obj.ami_launch_index =
                                Some(try!(IntegerDeserializer::deserialize("amiLaunchIndex",
                                                                           stack)));
                        }
                        "architecture" => {
                            obj.architecture =
                                Some(try!(ArchitectureValuesDeserializer::deserialize("architecture",
                                                                                      stack)));
                        }
                        "blockDeviceMapping" => {
                            obj.block_device_mappings = Some(try!(InstanceBlockDeviceMappingListDeserializer::deserialize("blockDeviceMapping", stack)));
                        }
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "ebsOptimized" => {
                            obj.ebs_optimized = Some(try!(BooleanDeserializer::deserialize("ebsOptimized",
                                                                                           stack)));
                        }
                        "elasticGpuAssociationSet" => {
                            obj.elastic_gpu_associations = Some(try!(ElasticGpuAssociationListDeserializer::deserialize("elasticGpuAssociationSet", stack)));
                        }
                        "enaSupport" => {
                            obj.ena_support = Some(try!(BooleanDeserializer::deserialize("enaSupport",
                                                                                         stack)));
                        }
                        "hypervisor" => {
                            obj.hypervisor =
                                Some(try!(HypervisorTypeDeserializer::deserialize("hypervisor",
                                                                                  stack)));
                        }
                        "iamInstanceProfile" => {
                            obj.iam_instance_profile =
                                Some(try!(IamInstanceProfileDeserializer::deserialize("iamInstanceProfile",
                                                                                      stack)));
                        }
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "instanceLifecycle" => {
                            obj.instance_lifecycle =
                                Some(try!(InstanceLifecycleTypeDeserializer::deserialize("instanceLifecycle",
                                                                                         stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(InstanceTypeDeserializer::deserialize("instanceType",
                                                                                stack)));
                        }
                        "kernelId" => {
                            obj.kernel_id = Some(try!(StringDeserializer::deserialize("kernelId",
                                                                                      stack)));
                        }
                        "keyName" => {
                            obj.key_name = Some(try!(StringDeserializer::deserialize("keyName",
                                                                                     stack)));
                        }
                        "launchTime" => {
                            obj.launch_time = Some(try!(DateTimeDeserializer::deserialize("launchTime",
                                                                                          stack)));
                        }
                        "monitoring" => {
                            obj.monitoring = Some(try!(MonitoringDeserializer::deserialize("monitoring",
                                                                                           stack)));
                        }
                        "networkInterfaceSet" => {
                            obj.network_interfaces = Some(try!(InstanceNetworkInterfaceListDeserializer::deserialize("networkInterfaceSet", stack)));
                        }
                        "placement" => {
                            obj.placement = Some(try!(PlacementDeserializer::deserialize("placement",
                                                                                         stack)));
                        }
                        "platform" => {
                            obj.platform =
                                Some(try!(PlatformValuesDeserializer::deserialize("platform",
                                                                                  stack)));
                        }
                        "privateDnsName" => {
                            obj.private_dns_name =
                                Some(try!(StringDeserializer::deserialize("privateDnsName",
                                                                          stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address =
                                Some(try!(StringDeserializer::deserialize("privateIpAddress",
                                                                          stack)));
                        }
                        "productCodes" => {
                            obj.product_codes =
                                Some(try!(ProductCodeListDeserializer::deserialize("productCodes",
                                                                                   stack)));
                        }
                        "dnsName" => {
                            obj.public_dns_name =
                                Some(try!(StringDeserializer::deserialize("dnsName", stack)));
                        }
                        "ipAddress" => {
                            obj.public_ip_address =
                                Some(try!(StringDeserializer::deserialize("ipAddress", stack)));
                        }
                        "ramdiskId" => {
                            obj.ramdisk_id = Some(try!(StringDeserializer::deserialize("ramdiskId",
                                                                                       stack)));
                        }
                        "rootDeviceName" => {
                            obj.root_device_name =
                                Some(try!(StringDeserializer::deserialize("rootDeviceName",
                                                                          stack)));
                        }
                        "rootDeviceType" => {
                            obj.root_device_type =
                                Some(try!(DeviceTypeDeserializer::deserialize("rootDeviceType",
                                                                              stack)));
                        }
                        "groupSet" => {
                            obj.security_groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "sourceDestCheck" => {
                            obj.source_dest_check =
                                Some(try!(BooleanDeserializer::deserialize("sourceDestCheck",
                                                                           stack)));
                        }
                        "spotInstanceRequestId" => {
                            obj.spot_instance_request_id =
                                Some(try!(StringDeserializer::deserialize("spotInstanceRequestId",
                                                                          stack)));
                        }
                        "sriovNetSupport" => {
                            obj.sriov_net_support =
                                Some(try!(StringDeserializer::deserialize("sriovNetSupport",
                                                                          stack)));
                        }
                        "instanceState" => {
                            obj.state = Some(try!(InstanceStateDeserializer::deserialize("instanceState",
                                                                                         stack)));
                        }
                        "stateReason" => {
                            obj.state_reason =
                                Some(try!(StateReasonDeserializer::deserialize("stateReason",
                                                                               stack)));
                        }
                        "reason" => {
                            obj.state_transition_reason =
                                Some(try!(StringDeserializer::deserialize("reason", stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "virtualizationType" => {
                            obj.virtualization_type =
                                Some(try!(VirtualizationTypeDeserializer::deserialize("virtualizationType",
                                                                                      stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an instance attribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceAttribute {
    #[doc="<p>The block device mapping of the instance.</p>"]
    pub block_device_mappings: Option<Vec<InstanceBlockDeviceMapping>>,
    #[doc="<p>If the value is <code>true</code>, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.</p>"]
    pub disable_api_termination: Option<AttributeBooleanValue>,
    #[doc="<p>Indicates whether the instance is optimized for EBS I/O.</p>"]
    pub ebs_optimized: Option<AttributeBooleanValue>,
    #[doc="<p>Indicates whether enhanced networking with ENA is enabled.</p>"]
    pub ena_support: Option<AttributeBooleanValue>,
    #[doc="<p>The security groups associated with the instance.</p>"]
    pub groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>"]
    pub instance_initiated_shutdown_behavior: Option<AttributeValue>,
    #[doc="<p>The instance type.</p>"]
    pub instance_type: Option<AttributeValue>,
    #[doc="<p>The kernel ID.</p>"]
    pub kernel_id: Option<AttributeValue>,
    #[doc="<p>A list of product codes.</p>"]
    pub product_codes: Option<Vec<ProductCode>>,
    #[doc="<p>The RAM disk ID.</p>"]
    pub ramdisk_id: Option<AttributeValue>,
    #[doc="<p>The name of the root device (for example, <code>/dev/sda1</code> or <code>/dev/xvda</code>).</p>"]
    pub root_device_name: Option<AttributeValue>,
    #[doc="<p>Indicates whether source/destination checking is enabled. A value of <code>true</code> means checking is enabled, and <code>false</code> means checking is disabled. This value must be <code>false</code> for a NAT instance to perform NAT.</p>"]
    pub source_dest_check: Option<AttributeBooleanValue>,
    #[doc="<p>Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>"]
    pub sriov_net_support: Option<AttributeValue>,
    #[doc="<p>The user data.</p>"]
    pub user_data: Option<AttributeValue>,
}

struct InstanceAttributeDeserializer;
impl InstanceAttributeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceAttribute, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceAttribute::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "blockDeviceMapping" => {
                            obj.block_device_mappings = Some(try!(InstanceBlockDeviceMappingListDeserializer::deserialize("blockDeviceMapping", stack)));
                        }
                        "disableApiTermination" => {
                            obj.disable_api_termination =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("disableApiTermination",
                                                                                         stack)));
                        }
                        "ebsOptimized" => {
                            obj.ebs_optimized =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("ebsOptimized",
                                                                                         stack)));
                        }
                        "enaSupport" => {
                            obj.ena_support =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("enaSupport",
                                                                                         stack)));
                        }
                        "groupSet" => {
                            obj.groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "instanceInitiatedShutdownBehavior" => {
                            obj.instance_initiated_shutdown_behavior =
                                Some(try!(AttributeValueDeserializer::deserialize("instanceInitiatedShutdownBehavior",
                                                                                  stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(AttributeValueDeserializer::deserialize("instanceType",
                                                                                  stack)));
                        }
                        "kernel" => {
                            obj.kernel_id =
                                Some(try!(AttributeValueDeserializer::deserialize("kernel",
                                                                                  stack)));
                        }
                        "productCodes" => {
                            obj.product_codes =
                                Some(try!(ProductCodeListDeserializer::deserialize("productCodes",
                                                                                   stack)));
                        }
                        "ramdisk" => {
                            obj.ramdisk_id =
                                Some(try!(AttributeValueDeserializer::deserialize("ramdisk",
                                                                                  stack)));
                        }
                        "rootDeviceName" => {
                            obj.root_device_name =
                                Some(try!(AttributeValueDeserializer::deserialize("rootDeviceName",
                                                                                  stack)));
                        }
                        "sourceDestCheck" => {
                            obj.source_dest_check =
                                Some(try!(AttributeBooleanValueDeserializer::deserialize("sourceDestCheck",
                                                                                         stack)));
                        }
                        "sriovNetSupport" => {
                            obj.sriov_net_support =
                                Some(try!(AttributeValueDeserializer::deserialize("sriovNetSupport",
                                                                                  stack)));
                        }
                        "userData" => {
                            obj.user_data =
                                Some(try!(AttributeValueDeserializer::deserialize("userData",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a block device mapping.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceBlockDeviceMapping {
    #[doc="<p>The device name exposed to the instance (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>"]
    pub device_name: Option<String>,
    #[doc="<p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>"]
    pub ebs: Option<EbsInstanceBlockDevice>,
}

struct InstanceBlockDeviceMappingDeserializer;
impl InstanceBlockDeviceMappingDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceBlockDeviceMapping, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceBlockDeviceMapping::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "deviceName" => {
                            obj.device_name = Some(try!(StringDeserializer::deserialize("deviceName",
                                                                                        stack)));
                        }
                        "ebs" => {
                            obj.ebs =
                                Some(try!(EbsInstanceBlockDeviceDeserializer::deserialize("ebs",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceBlockDeviceMappingListDeserializer;
impl InstanceBlockDeviceMappingListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<InstanceBlockDeviceMapping>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceBlockDeviceMappingDeserializer::deserialize("item",
                                                                                          stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a block device mapping entry.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceBlockDeviceMappingSpecification {
    #[doc="<p>The device name exposed to the instance (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>"]
    pub device_name: Option<String>,
    #[doc="<p>Parameters used to automatically set up EBS volumes when the instance is launched.</p>"]
    pub ebs: Option<EbsInstanceBlockDeviceSpecification>,
    #[doc="<p>suppress the specified device included in the block device mapping.</p>"]
    pub no_device: Option<String>,
    #[doc="<p>The virtual device name.</p>"]
    pub virtual_name: Option<String>,
}


/// Serialize `InstanceBlockDeviceMappingSpecification` contents to a `SignedRequest`.
struct InstanceBlockDeviceMappingSpecificationSerializer;
impl InstanceBlockDeviceMappingSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &InstanceBlockDeviceMappingSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.device_name {
            params.put(&format!("{}{}", prefix, "DeviceName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ebs {
            EbsInstanceBlockDeviceSpecificationSerializer::serialize(params,
                                                                     &format!("{}{}",
                                                                             prefix,
                                                                             "Ebs"),
                                                                     field_value);
        }
        if let Some(ref field_value) = obj.no_device {
            params.put(&format!("{}{}", prefix, "NoDevice"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.virtual_name {
            params.put(&format!("{}{}", prefix, "VirtualName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}


/// Serialize `InstanceBlockDeviceMappingSpecificationList` contents to a `SignedRequest`.
struct InstanceBlockDeviceMappingSpecificationListSerializer;
impl InstanceBlockDeviceMappingSpecificationListSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &Vec<InstanceBlockDeviceMappingSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            InstanceBlockDeviceMappingSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Information about the instance type that the Dedicated Host supports.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceCapacity {
    #[doc="<p>The number of instances that can still be launched onto the Dedicated Host.</p>"]
    pub available_capacity: Option<i64>,
    #[doc="<p>The instance type size supported by the Dedicated Host.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The total number of instances that can be launched onto the Dedicated Host.</p>"]
    pub total_capacity: Option<i64>,
}

struct InstanceCapacityDeserializer;
impl InstanceCapacityDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceCapacity, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceCapacity::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availableCapacity" => {
                            obj.available_capacity =
                                Some(try!(IntegerDeserializer::deserialize("availableCapacity",
                                                                           stack)));
                        }
                        "instanceType" => {
                            obj.instance_type = Some(try!(StringDeserializer::deserialize("instanceType",
                                                                                          stack)));
                        }
                        "totalCapacity" => {
                            obj.total_capacity =
                                Some(try!(IntegerDeserializer::deserialize("totalCapacity",
                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a Reserved Instance listing state.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceCount {
    #[doc="<p>The number of listed Reserved Instances in the state specified by the <code>state</code>.</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The states of the listed Reserved Instances.</p>"]
    pub state: Option<String>,
}

struct InstanceCountDeserializer;
impl InstanceCountDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceCount, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceCount::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceCount" => {
                            obj.instance_count =
                                Some(try!(IntegerDeserializer::deserialize("instanceCount",
                                                                           stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(ListingStateDeserializer::deserialize("state",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceCountListDeserializer;
impl InstanceCountListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceCount>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceCountDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes an instance to export.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceExportDetails {
    #[doc="<p>The ID of the resource being exported.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The target virtualization environment.</p>"]
    pub target_environment: Option<String>,
}

struct InstanceExportDetailsDeserializer;
impl InstanceExportDetailsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceExportDetails, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceExportDetails::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "targetEnvironment" => {
                            obj.target_environment =
                                Some(try!(ExportEnvironmentDeserializer::deserialize("targetEnvironment",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceHealthStatusDeserializer;
impl InstanceHealthStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceIdSetDeserializer;
impl InstanceIdSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `InstanceIdStringList` contents to a `SignedRequest`.
struct InstanceIdStringListSerializer;
impl InstanceIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes an IPv6 address.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceIpv6Address {
    #[doc="<p>The IPv6 address.</p>"]
    pub ipv_6_address: Option<String>,
}

struct InstanceIpv6AddressDeserializer;
impl InstanceIpv6AddressDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceIpv6Address, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceIpv6Address::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipv6Address" => {
                            obj.ipv_6_address = Some(try!(StringDeserializer::deserialize("ipv6Address",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `InstanceIpv6Address` contents to a `SignedRequest`.
struct InstanceIpv6AddressSerializer;
impl InstanceIpv6AddressSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &InstanceIpv6Address) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.ipv_6_address {
            params.put(&format!("{}{}", prefix, "Ipv6Address"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct InstanceIpv6AddressListDeserializer;
impl InstanceIpv6AddressListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceIpv6Address>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceIpv6AddressDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `InstanceIpv6AddressList` contents to a `SignedRequest`.
struct InstanceIpv6AddressListSerializer;
impl InstanceIpv6AddressListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<InstanceIpv6Address>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            InstanceIpv6AddressSerializer::serialize(params, &key, obj);
        }
    }
}

struct InstanceLifecycleTypeDeserializer;
impl InstanceLifecycleTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceListDeserializer;
impl InstanceListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Instance>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the monitoring of an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceMonitoring {
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The monitoring for the instance.</p>"]
    pub monitoring: Option<Monitoring>,
}

struct InstanceMonitoringDeserializer;
impl InstanceMonitoringDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceMonitoring, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceMonitoring::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "monitoring" => {
                            obj.monitoring = Some(try!(MonitoringDeserializer::deserialize("monitoring",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceMonitoringListDeserializer;
impl InstanceMonitoringListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceMonitoring>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceMonitoringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a network interface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceNetworkInterface {
    #[doc="<p>The association information for an Elastic IPv4 associated with the network interface.</p>"]
    pub association: Option<InstanceNetworkInterfaceAssociation>,
    #[doc="<p>The network interface attachment.</p>"]
    pub attachment: Option<InstanceNetworkInterfaceAttachment>,
    #[doc="<p>The description.</p>"]
    pub description: Option<String>,
    #[doc="<p>One or more security groups.</p>"]
    pub groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>One or more IPv6 addresses associated with the network interface.</p>"]
    pub ipv_6_addresses: Option<Vec<InstanceIpv6Address>>,
    #[doc="<p>The MAC address.</p>"]
    pub mac_address: Option<String>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The ID of the AWS account that created the network interface.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>The private DNS name.</p>"]
    pub private_dns_name: Option<String>,
    #[doc="<p>The IPv4 address of the network interface within the subnet.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>One or more private IPv4 addresses associated with the network interface.</p>"]
    pub private_ip_addresses: Option<Vec<InstancePrivateIpAddress>>,
    #[doc="<p>Indicates whether to validate network traffic to or from this network interface.</p>"]
    pub source_dest_check: Option<bool>,
    #[doc="<p>The status of the network interface.</p>"]
    pub status: Option<String>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct InstanceNetworkInterfaceDeserializer;
impl InstanceNetworkInterfaceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceNetworkInterface, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceNetworkInterface::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "association" => {
                            obj.association = Some(try!(InstanceNetworkInterfaceAssociationDeserializer::deserialize("association", stack)));
                        }
                        "attachment" => {
                            obj.attachment = Some(try!(InstanceNetworkInterfaceAttachmentDeserializer::deserialize("attachment", stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "groupSet" => {
                            obj.groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "ipv6AddressesSet" => {
                            obj.ipv_6_addresses =
                                Some(try!(InstanceIpv6AddressListDeserializer::deserialize("ipv6AddressesSet",
                                                                                           stack)));
                        }
                        "macAddress" => {
                            obj.mac_address = Some(try!(StringDeserializer::deserialize("macAddress",
                                                                                        stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "privateDnsName" => {
                            obj.private_dns_name =
                                Some(try!(StringDeserializer::deserialize("privateDnsName",
                                                                          stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address =
                                Some(try!(StringDeserializer::deserialize("privateIpAddress",
                                                                          stack)));
                        }
                        "privateIpAddressesSet" => {
                            obj.private_ip_addresses = Some(try!(InstancePrivateIpAddressListDeserializer::deserialize("privateIpAddressesSet", stack)));
                        }
                        "sourceDestCheck" => {
                            obj.source_dest_check =
                                Some(try!(BooleanDeserializer::deserialize("sourceDestCheck",
                                                                           stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(NetworkInterfaceStatusDeserializer::deserialize("status",
                                                                                          stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes association information for an Elastic IP address (IPv4).</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceNetworkInterfaceAssociation {
    #[doc="<p>The ID of the owner of the Elastic IP address.</p>"]
    pub ip_owner_id: Option<String>,
    #[doc="<p>The public DNS name.</p>"]
    pub public_dns_name: Option<String>,
    #[doc="<p>The public IP address or Elastic IP address bound to the network interface.</p>"]
    pub public_ip: Option<String>,
}

struct InstanceNetworkInterfaceAssociationDeserializer;
impl InstanceNetworkInterfaceAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<InstanceNetworkInterfaceAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceNetworkInterfaceAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipOwnerId" => {
                            obj.ip_owner_id = Some(try!(StringDeserializer::deserialize("ipOwnerId",
                                                                                        stack)));
                        }
                        "publicDnsName" => {
                            obj.public_dns_name =
                                Some(try!(StringDeserializer::deserialize("publicDnsName", stack)));
                        }
                        "publicIp" => {
                            obj.public_ip = Some(try!(StringDeserializer::deserialize("publicIp",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a network interface attachment.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceNetworkInterfaceAttachment {
    #[doc="<p>The time stamp when the attachment initiated.</p>"]
    pub attach_time: Option<String>,
    #[doc="<p>The ID of the network interface attachment.</p>"]
    pub attachment_id: Option<String>,
    #[doc="<p>Indicates whether the network interface is deleted when the instance is terminated.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>The index of the device on the instance for the network interface attachment.</p>"]
    pub device_index: Option<i64>,
    #[doc="<p>The attachment state.</p>"]
    pub status: Option<String>,
}

struct InstanceNetworkInterfaceAttachmentDeserializer;
impl InstanceNetworkInterfaceAttachmentDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<InstanceNetworkInterfaceAttachment, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceNetworkInterfaceAttachment::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachTime" => {
                            obj.attach_time = Some(try!(DateTimeDeserializer::deserialize("attachTime",
                                                                                          stack)));
                        }
                        "attachmentId" => {
                            obj.attachment_id = Some(try!(StringDeserializer::deserialize("attachmentId",
                                                                                          stack)));
                        }
                        "deleteOnTermination" => {
                            obj.delete_on_termination =
                                Some(try!(BooleanDeserializer::deserialize("deleteOnTermination",
                                                                           stack)));
                        }
                        "deviceIndex" => {
                            obj.device_index = Some(try!(IntegerDeserializer::deserialize("deviceIndex",
                                                                                          stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(AttachmentStatusDeserializer::deserialize("status",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceNetworkInterfaceListDeserializer;
impl InstanceNetworkInterfaceListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceNetworkInterface>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceNetworkInterfaceDeserializer::deserialize("item",
                                                                                        stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a network interface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceNetworkInterfaceSpecification {
    #[doc="<p>Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>"]
    pub associate_public_ip_address: Option<bool>,
    #[doc="<p>If set to <code>true</code>, the interface is deleted when the instance is terminated. You can specify <code>true</code> only if creating a new network interface when launching an instance.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>The description of the network interface. Applies only if creating a network interface when launching an instance.</p>"]
    pub description: Option<String>,
    #[doc="<p>The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a <a>RunInstances</a> request, you must provide the device index.</p>"]
    pub device_index: Option<i64>,
    #[doc="<p>The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.</p>"]
    pub groups: Option<Vec<String>>,
    #[doc="<p>A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.</p>"]
    pub ipv_6_address_count: Option<i64>,
    #[doc="<p>One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.</p>"]
    pub ipv_6_addresses: Option<Vec<InstanceIpv6Address>>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a <a>RunInstances</a> request.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a <a>RunInstances</a> request.</p>"]
    pub private_ip_addresses: Option<Vec<PrivateIpAddressSpecification>>,
    #[doc="<p>The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a <a>RunInstances</a> request.</p>"]
    pub secondary_private_ip_address_count: Option<i64>,
    #[doc="<p>The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.</p>"]
    pub subnet_id: Option<String>,
}

struct InstanceNetworkInterfaceSpecificationDeserializer;
impl InstanceNetworkInterfaceSpecificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<InstanceNetworkInterfaceSpecification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceNetworkInterfaceSpecification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associatePublicIpAddress" => {
                            obj.associate_public_ip_address =
                                Some(try!(BooleanDeserializer::deserialize("associatePublicIpAddress",
                                                                           stack)));
                        }
                        "deleteOnTermination" => {
                            obj.delete_on_termination =
                                Some(try!(BooleanDeserializer::deserialize("deleteOnTermination",
                                                                           stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "deviceIndex" => {
                            obj.device_index = Some(try!(IntegerDeserializer::deserialize("deviceIndex",
                                                                                          stack)));
                        }
                        "SecurityGroupId" => {
                            obj.groups = Some(try!(SecurityGroupIdStringListDeserializer::deserialize("SecurityGroupId", stack)));
                        }
                        "ipv6AddressCount" => {
                            obj.ipv_6_address_count =
                                Some(try!(IntegerDeserializer::deserialize("ipv6AddressCount",
                                                                           stack)));
                        }
                        "ipv6AddressesSet" => {
                            obj.ipv_6_addresses =
                                Some(try!(InstanceIpv6AddressListDeserializer::deserialize("ipv6AddressesSet",
                                                                                           stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address =
                                Some(try!(StringDeserializer::deserialize("privateIpAddress",
                                                                          stack)));
                        }
                        "privateIpAddressesSet" => {
                            obj.private_ip_addresses = Some(try!(PrivateIpAddressSpecificationListDeserializer::deserialize("privateIpAddressesSet", stack)));
                        }
                        "secondaryPrivateIpAddressCount" => {
                            obj.secondary_private_ip_address_count =
                                Some(try!(IntegerDeserializer::deserialize("secondaryPrivateIpAddressCount",
                                                                           stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `InstanceNetworkInterfaceSpecification` contents to a `SignedRequest`.
struct InstanceNetworkInterfaceSpecificationSerializer;
impl InstanceNetworkInterfaceSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &InstanceNetworkInterfaceSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.associate_public_ip_address {
            params.put(&format!("{}{}", prefix, "AssociatePublicIpAddress"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.delete_on_termination {
            params.put(&format!("{}{}", prefix, "DeleteOnTermination"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.device_index {
            params.put(&format!("{}{}", prefix, "DeviceIndex"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.groups {
            SecurityGroupIdStringListSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "SecurityGroupId"),
                                                           field_value);
        }
        if let Some(ref field_value) = obj.ipv_6_address_count {
            params.put(&format!("{}{}", prefix, "Ipv6AddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ipv_6_addresses {
            InstanceIpv6AddressListSerializer::serialize(params,
                                                         &format!("{}{}",
                                                                 prefix,
                                                                 "Ipv6AddressesSet"),
                                                         field_value);
        }
        if let Some(ref field_value) = obj.network_interface_id {
            params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.private_ip_address {
            params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.private_ip_addresses {
            PrivateIpAddressSpecificationListSerializer::serialize(params,
                                                                   &format!("{}{}",
                                                                           prefix,
                                                                           "PrivateIpAddressesSet"),
                                                                   field_value);
        }
        if let Some(ref field_value) = obj.secondary_private_ip_address_count {
            params.put(&format!("{}{}", prefix, "SecondaryPrivateIpAddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.subnet_id {
            params.put(&format!("{}{}", prefix, "SubnetId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct InstanceNetworkInterfaceSpecificationListDeserializer;
impl InstanceNetworkInterfaceSpecificationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<InstanceNetworkInterfaceSpecification>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceNetworkInterfaceSpecificationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `InstanceNetworkInterfaceSpecificationList` contents to a `SignedRequest`.
struct InstanceNetworkInterfaceSpecificationListSerializer;
impl InstanceNetworkInterfaceSpecificationListSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &Vec<InstanceNetworkInterfaceSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            InstanceNetworkInterfaceSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes a private IPv4 address.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstancePrivateIpAddress {
    #[doc="<p>The association information for an Elastic IP address for the network interface.</p>"]
    pub association: Option<InstanceNetworkInterfaceAssociation>,
    #[doc="<p>Indicates whether this IPv4 address is the primary private IP address of the network interface.</p>"]
    pub primary: Option<bool>,
    #[doc="<p>The private IPv4 DNS name.</p>"]
    pub private_dns_name: Option<String>,
    #[doc="<p>The private IPv4 address of the network interface.</p>"]
    pub private_ip_address: Option<String>,
}

struct InstancePrivateIpAddressDeserializer;
impl InstancePrivateIpAddressDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstancePrivateIpAddress, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstancePrivateIpAddress::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "association" => {
                            obj.association = Some(try!(InstanceNetworkInterfaceAssociationDeserializer::deserialize("association", stack)));
                        }
                        "primary" => {
                            obj.primary = Some(try!(BooleanDeserializer::deserialize("primary",
                                                                                     stack)));
                        }
                        "privateDnsName" => {
                            obj.private_dns_name =
                                Some(try!(StringDeserializer::deserialize("privateDnsName",
                                                                          stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address =
                                Some(try!(StringDeserializer::deserialize("privateIpAddress",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstancePrivateIpAddressListDeserializer;
impl InstancePrivateIpAddressListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstancePrivateIpAddress>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstancePrivateIpAddressDeserializer::deserialize("item",
                                                                                        stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the current state of an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceState {
    #[doc="<p>The low byte represents the state. The high byte is an opaque internal value and should be ignored.</p> <ul> <li> <p> <code>0</code> : <code>pending</code> </p> </li> <li> <p> <code>16</code> : <code>running</code> </p> </li> <li> <p> <code>32</code> : <code>shutting-down</code> </p> </li> <li> <p> <code>48</code> : <code>terminated</code> </p> </li> <li> <p> <code>64</code> : <code>stopping</code> </p> </li> <li> <p> <code>80</code> : <code>stopped</code> </p> </li> </ul>"]
    pub code: Option<i64>,
    #[doc="<p>The current state of the instance.</p>"]
    pub name: Option<String>,
}

struct InstanceStateDeserializer;
impl InstanceStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceState, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceState::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(IntegerDeserializer::deserialize("code", stack)));
                        }
                        "name" => {
                            obj.name =
                                Some(try!(InstanceStateNameDeserializer::deserialize("name",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an instance state change.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceStateChange {
    #[doc="<p>The current state of the instance.</p>"]
    pub current_state: Option<InstanceState>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The previous state of the instance.</p>"]
    pub previous_state: Option<InstanceState>,
}

struct InstanceStateChangeDeserializer;
impl InstanceStateChangeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceStateChange, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceStateChange::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "currentState" => {
                            obj.current_state =
                                Some(try!(InstanceStateDeserializer::deserialize("currentState",
                                                                                 stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "previousState" => {
                            obj.previous_state =
                                Some(try!(InstanceStateDeserializer::deserialize("previousState",
                                                                                 stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceStateChangeListDeserializer;
impl InstanceStateChangeListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceStateChange>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceStateChangeDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct InstanceStateNameDeserializer;
impl InstanceStateNameDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the status of an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceStatus {
    #[doc="<p>The Availability Zone of the instance.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>Any scheduled events associated with the instance.</p>"]
    pub events: Option<Vec<InstanceStatusEvent>>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The intended state of the instance. <a>DescribeInstanceStatus</a> requires that an instance be in the <code>running</code> state.</p>"]
    pub instance_state: Option<InstanceState>,
    #[doc="<p>Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.</p>"]
    pub instance_status: Option<InstanceStatusSummary>,
    #[doc="<p>Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.</p>"]
    pub system_status: Option<InstanceStatusSummary>,
}

struct InstanceStatusDeserializer;
impl InstanceStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceStatus, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceStatus::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "eventsSet" => {
                            obj.events =
                                Some(try!(InstanceStatusEventListDeserializer::deserialize("eventsSet",
                                                                                           stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "instanceState" => {
                            obj.instance_state =
                                Some(try!(InstanceStateDeserializer::deserialize("instanceState",
                                                                                 stack)));
                        }
                        "instanceStatus" => {
                            obj.instance_status =
                                Some(try!(InstanceStatusSummaryDeserializer::deserialize("instanceStatus",
                                                                                         stack)));
                        }
                        "systemStatus" => {
                            obj.system_status =
                                Some(try!(InstanceStatusSummaryDeserializer::deserialize("systemStatus",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the instance status.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceStatusDetails {
    #[doc="<p>The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.</p>"]
    pub impaired_since: Option<String>,
    #[doc="<p>The type of instance status.</p>"]
    pub name: Option<String>,
    #[doc="<p>The status.</p>"]
    pub status: Option<String>,
}

struct InstanceStatusDetailsDeserializer;
impl InstanceStatusDetailsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceStatusDetails, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceStatusDetails::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "impairedSince" => {
                            obj.impaired_since =
                                Some(try!(DateTimeDeserializer::deserialize("impairedSince",
                                                                            stack)));
                        }
                        "name" => {
                            obj.name = Some(try!(StatusNameDeserializer::deserialize("name",
                                                                                     stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StatusTypeDeserializer::deserialize("status",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceStatusDetailsListDeserializer;
impl InstanceStatusDetailsListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceStatusDetails>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceStatusDetailsDeserializer::deserialize("item",
                                                                                     stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a scheduled event for an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceStatusEvent {
    #[doc="<p>The event code.</p>"]
    pub code: Option<String>,
    #[doc="<p>A description of the event.</p> <p>After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].</p>"]
    pub description: Option<String>,
    #[doc="<p>The latest scheduled end time for the event.</p>"]
    pub not_after: Option<String>,
    #[doc="<p>The earliest scheduled start time for the event.</p>"]
    pub not_before: Option<String>,
}

struct InstanceStatusEventDeserializer;
impl InstanceStatusEventDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceStatusEvent, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceStatusEvent::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(EventCodeDeserializer::deserialize("code",
                                                                                    stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "notAfter" => {
                            obj.not_after = Some(try!(DateTimeDeserializer::deserialize("notAfter",
                                                                                        stack)));
                        }
                        "notBefore" => {
                            obj.not_before = Some(try!(DateTimeDeserializer::deserialize("notBefore",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceStatusEventListDeserializer;
impl InstanceStatusEventListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceStatusEvent>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceStatusEventDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct InstanceStatusListDeserializer;
impl InstanceStatusListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InstanceStatus>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InstanceStatusDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the status of an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InstanceStatusSummary {
    #[doc="<p>The system instance health or application instance health.</p>"]
    pub details: Option<Vec<InstanceStatusDetails>>,
    #[doc="<p>The status.</p>"]
    pub status: Option<String>,
}

struct InstanceStatusSummaryDeserializer;
impl InstanceStatusSummaryDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InstanceStatusSummary, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InstanceStatusSummary::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "details" => {
                            obj.details = Some(try!(InstanceStatusDetailsListDeserializer::deserialize("details", stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(SummaryStatusDeserializer::deserialize("status",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InstanceTypeDeserializer;
impl InstanceTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `InstanceTypeList` contents to a `SignedRequest`.
struct InstanceTypeListSerializer;
impl InstanceTypeListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct IntegerDeserializer;
impl IntegerDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<i64, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = i64::from_str(try!(characters(stack)).as_ref()).unwrap();
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InterfacePermissionTypeDeserializer;
impl InterfacePermissionTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an Internet gateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InternetGateway {
    #[doc="<p>Any VPCs attached to the Internet gateway.</p>"]
    pub attachments: Option<Vec<InternetGatewayAttachment>>,
    #[doc="<p>The ID of the Internet gateway.</p>"]
    pub internet_gateway_id: Option<String>,
    #[doc="<p>Any tags assigned to the Internet gateway.</p>"]
    pub tags: Option<Vec<Tag>>,
}

struct InternetGatewayDeserializer;
impl InternetGatewayDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InternetGateway, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InternetGateway::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachmentSet" => {
                            obj.attachments = Some(try!(InternetGatewayAttachmentListDeserializer::deserialize("attachmentSet", stack)));
                        }
                        "internetGatewayId" => {
                            obj.internet_gateway_id =
                                Some(try!(StringDeserializer::deserialize("internetGatewayId",
                                                                          stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the attachment of a VPC to an Internet gateway or an egress-only Internet gateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct InternetGatewayAttachment {
    #[doc="<p>The current state of the attachment.</p>"]
    pub state: Option<String>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct InternetGatewayAttachmentDeserializer;
impl InternetGatewayAttachmentDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<InternetGatewayAttachment, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = InternetGatewayAttachment::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "state" => {
                            obj.state =
                                Some(try!(AttachmentStatusDeserializer::deserialize("state",
                                                                                    stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct InternetGatewayAttachmentListDeserializer;
impl InternetGatewayAttachmentListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InternetGatewayAttachment>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InternetGatewayAttachmentDeserializer::deserialize("item",
                                                                                         stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct InternetGatewayListDeserializer;
impl InternetGatewayListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<InternetGateway>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(InternetGatewayDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a security group rule.</p>"]
#[derive(Default,Debug,Clone)]
pub struct IpPermission {
    #[doc="<p>The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of <code>-1</code> indicates all ICMP/ICMPv6 types.</p>"]
    pub from_port: Option<i64>,
    #[doc="<p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number (see <a href=\"http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml\">Protocol Numbers</a>). </p> <p>[EC2-VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, specifying <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or <code>58</code> (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For <code>58</code> (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules. </p>"]
    pub ip_protocol: Option<String>,
    #[doc="<p>One or more IPv4 ranges.</p>"]
    pub ip_ranges: Option<Vec<IpRange>>,
    #[doc="<p>[EC2-VPC only] One or more IPv6 ranges.</p>"]
    pub ipv_6_ranges: Option<Vec<Ipv6Range>>,
    #[doc="<p>(Valid for <a>AuthorizeSecurityGroupEgress</a>, <a>RevokeSecurityGroupEgress</a> and <a>DescribeSecurityGroups</a> only) One or more prefix list IDs for an AWS service. In an <a>AuthorizeSecurityGroupEgress</a> request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.</p>"]
    pub prefix_list_ids: Option<Vec<PrefixListId>>,
    #[doc="<p>The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of <code>-1</code> indicates all ICMP/ICMPv6 codes for the specified ICMP type.</p>"]
    pub to_port: Option<i64>,
    #[doc="<p>One or more security group and AWS account ID pairs.</p>"]
    pub user_id_group_pairs: Option<Vec<UserIdGroupPair>>,
}

struct IpPermissionDeserializer;
impl IpPermissionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<IpPermission, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = IpPermission::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "fromPort" => {
                            obj.from_port = Some(try!(IntegerDeserializer::deserialize("fromPort",
                                                                                       stack)));
                        }
                        "ipProtocol" => {
                            obj.ip_protocol = Some(try!(StringDeserializer::deserialize("ipProtocol",
                                                                                        stack)));
                        }
                        "ipRanges" => {
                            obj.ip_ranges = Some(try!(IpRangeListDeserializer::deserialize("ipRanges",
                                                                                           stack)));
                        }
                        "ipv6Ranges" => {
                            obj.ipv_6_ranges =
                                Some(try!(Ipv6RangeListDeserializer::deserialize("ipv6Ranges",
                                                                                 stack)));
                        }
                        "prefixListIds" => {
                            obj.prefix_list_ids =
                                Some(try!(PrefixListIdListDeserializer::deserialize("prefixListIds",
                                                                                    stack)));
                        }
                        "toPort" => {
                            obj.to_port = Some(try!(IntegerDeserializer::deserialize("toPort",
                                                                                     stack)));
                        }
                        "groups" => {
                            obj.user_id_group_pairs =
                                Some(try!(UserIdGroupPairListDeserializer::deserialize("groups",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `IpPermission` contents to a `SignedRequest`.
struct IpPermissionSerializer;
impl IpPermissionSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &IpPermission) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.from_port {
            params.put(&format!("{}{}", prefix, "FromPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ip_protocol {
            params.put(&format!("{}{}", prefix, "IpProtocol"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ip_ranges {
            IpRangeListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "IpRanges"),
                                             field_value);
        }
        if let Some(ref field_value) = obj.ipv_6_ranges {
            Ipv6RangeListSerializer::serialize(params,
                                               &format!("{}{}", prefix, "Ipv6Ranges"),
                                               field_value);
        }
        if let Some(ref field_value) = obj.prefix_list_ids {
            PrefixListIdListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "PrefixListIds"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.to_port {
            params.put(&format!("{}{}", prefix, "ToPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_id_group_pairs {
            UserIdGroupPairListSerializer::serialize(params,
                                                     &format!("{}{}", prefix, "Groups"),
                                                     field_value);
        }

    }
}

struct IpPermissionListDeserializer;
impl IpPermissionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<IpPermission>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(IpPermissionDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `IpPermissionList` contents to a `SignedRequest`.
struct IpPermissionListSerializer;
impl IpPermissionListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<IpPermission>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            IpPermissionSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes an IPv4 range.</p>"]
#[derive(Default,Debug,Clone)]
pub struct IpRange {
    #[doc="<p>The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.</p>"]
    pub cidr_ip: Option<String>,
}

struct IpRangeDeserializer;
impl IpRangeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<IpRange, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = IpRange::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "cidrIp" => {
                            obj.cidr_ip = Some(try!(StringDeserializer::deserialize("cidrIp",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `IpRange` contents to a `SignedRequest`.
struct IpRangeSerializer;
impl IpRangeSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &IpRange) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_ip {
            params.put(&format!("{}{}", prefix, "CidrIp"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct IpRangeListDeserializer;
impl IpRangeListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<IpRange>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(IpRangeDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `IpRangeList` contents to a `SignedRequest`.
struct IpRangeListSerializer;
impl IpRangeListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<IpRange>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            IpRangeSerializer::serialize(params, &key, obj);
        }
    }
}

struct IpRangesDeserializer;
impl IpRangesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct Ipv6AddressListDeserializer;
impl Ipv6AddressListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `Ipv6AddressList` contents to a `SignedRequest`.
struct Ipv6AddressListSerializer;
impl Ipv6AddressListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes an IPv6 CIDR block.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Ipv6CidrBlock {
    #[doc="<p>The IPv6 CIDR block.</p>"]
    pub ipv_6_cidr_block: Option<String>,
}

struct Ipv6CidrBlockDeserializer;
impl Ipv6CidrBlockDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Ipv6CidrBlock, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Ipv6CidrBlock::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipv6CidrBlock" => {
                            obj.ipv_6_cidr_block =
                                Some(try!(StringDeserializer::deserialize("ipv6CidrBlock", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct Ipv6CidrBlockSetDeserializer;
impl Ipv6CidrBlockSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Ipv6CidrBlock>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(Ipv6CidrBlockDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>[EC2-VPC only] Describes an IPv6 range.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Ipv6Range {
    #[doc="<p>The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.</p>"]
    pub cidr_ipv_6: Option<String>,
}

struct Ipv6RangeDeserializer;
impl Ipv6RangeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Ipv6Range, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Ipv6Range::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "cidrIpv6" => {
                            obj.cidr_ipv_6 = Some(try!(StringDeserializer::deserialize("cidrIpv6",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `Ipv6Range` contents to a `SignedRequest`.
struct Ipv6RangeSerializer;
impl Ipv6RangeSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Ipv6Range) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_ipv_6 {
            params.put(&format!("{}{}", prefix, "CidrIpv6"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct Ipv6RangeListDeserializer;
impl Ipv6RangeListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Ipv6Range>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(Ipv6RangeDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `Ipv6RangeList` contents to a `SignedRequest`.
struct Ipv6RangeListSerializer;
impl Ipv6RangeListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<Ipv6Range>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            Ipv6RangeSerializer::serialize(params, &key, obj);
        }
    }
}


/// Serialize `KeyNameStringList` contents to a `SignedRequest`.
struct KeyNameStringListSerializer;
impl KeyNameStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes a key pair.</p>"]
#[derive(Default,Debug,Clone)]
pub struct KeyPair {
    #[doc="<p>The SHA-1 digest of the DER encoded private key.</p>"]
    pub key_fingerprint: Option<String>,
    #[doc="<p>An unencrypted PEM encoded RSA private key.</p>"]
    pub key_material: Option<String>,
    #[doc="<p>The name of the key pair.</p>"]
    pub key_name: Option<String>,
}

struct KeyPairDeserializer;
impl KeyPairDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<KeyPair, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = KeyPair::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "keyFingerprint" => {
                            obj.key_fingerprint =
                                Some(try!(StringDeserializer::deserialize("keyFingerprint",
                                                                          stack)));
                        }
                        "keyMaterial" => {
                            obj.key_material = Some(try!(StringDeserializer::deserialize("keyMaterial",
                                                                                         stack)));
                        }
                        "keyName" => {
                            obj.key_name = Some(try!(StringDeserializer::deserialize("keyName",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a key pair.</p>"]
#[derive(Default,Debug,Clone)]
pub struct KeyPairInfo {
    #[doc="<p>If you used <a>CreateKeyPair</a> to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used <a>ImportKeyPair</a> to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.</p>"]
    pub key_fingerprint: Option<String>,
    #[doc="<p>The name of the key pair.</p>"]
    pub key_name: Option<String>,
}

struct KeyPairInfoDeserializer;
impl KeyPairInfoDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<KeyPairInfo, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = KeyPairInfo::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "keyFingerprint" => {
                            obj.key_fingerprint =
                                Some(try!(StringDeserializer::deserialize("keyFingerprint",
                                                                          stack)));
                        }
                        "keyName" => {
                            obj.key_name = Some(try!(StringDeserializer::deserialize("keyName",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct KeyPairListDeserializer;
impl KeyPairListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<KeyPairInfo>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(KeyPairInfoDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a launch permission.</p>"]
#[derive(Default,Debug,Clone)]
pub struct LaunchPermission {
    #[doc="<p>The name of the group.</p>"]
    pub group: Option<String>,
    #[doc="<p>The AWS account ID.</p>"]
    pub user_id: Option<String>,
}

struct LaunchPermissionDeserializer;
impl LaunchPermissionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<LaunchPermission, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = LaunchPermission::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "group" => {
                            obj.group = Some(try!(PermissionGroupDeserializer::deserialize("group",
                                                                                           stack)));
                        }
                        "userId" => {
                            obj.user_id = Some(try!(StringDeserializer::deserialize("userId",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `LaunchPermission` contents to a `SignedRequest`.
struct LaunchPermissionSerializer;
impl LaunchPermissionSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &LaunchPermission) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.group {
            params.put(&format!("{}{}", prefix, "Group"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_id {
            params.put(&format!("{}{}", prefix, "UserId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct LaunchPermissionListDeserializer;
impl LaunchPermissionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<LaunchPermission>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(LaunchPermissionDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `LaunchPermissionList` contents to a `SignedRequest`.
struct LaunchPermissionListSerializer;
impl LaunchPermissionListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<LaunchPermission>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            LaunchPermissionSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes a launch permission modification.</p>"]
#[derive(Default,Debug,Clone)]
pub struct LaunchPermissionModifications {
    #[doc="<p>The AWS account ID to add to the list of launch permissions for the AMI.</p>"]
    pub add: Option<Vec<LaunchPermission>>,
    #[doc="<p>The AWS account ID to remove from the list of launch permissions for the AMI.</p>"]
    pub remove: Option<Vec<LaunchPermission>>,
}


/// Serialize `LaunchPermissionModifications` contents to a `SignedRequest`.
struct LaunchPermissionModificationsSerializer;
impl LaunchPermissionModificationsSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &LaunchPermissionModifications) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.add {
            LaunchPermissionListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "Add"),
                                                      field_value);
        }
        if let Some(ref field_value) = obj.remove {
            LaunchPermissionListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "Remove"),
                                                      field_value);
        }

    }
}

#[doc="<p>Describes the launch specification for an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct LaunchSpecification {
    #[doc="<p>Deprecated.</p>"]
    pub addressing_type: Option<String>,
    #[doc="<p>One or more block device mapping entries.</p> <p>Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.</p>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p> <p>Default: <code>false</code> </p>"]
    pub ebs_optimized: Option<bool>,
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: Option<IamInstanceProfileSpecification>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The instance type.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The ID of the kernel.</p>"]
    pub kernel_id: Option<String>,
    #[doc="<p>The name of the key pair.</p>"]
    pub key_name: Option<String>,
    pub monitoring: Option<RunInstancesMonitoringEnabled>,
    #[doc="<p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>"]
    pub network_interfaces: Option<Vec<InstanceNetworkInterfaceSpecification>>,
    #[doc="<p>The placement information for the instance.</p>"]
    pub placement: Option<SpotPlacement>,
    #[doc="<p>The ID of the RAM disk.</p>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>"]
    pub security_groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>The ID of the subnet in which to launch the instance.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>"]
    pub user_data: Option<String>,
}

struct LaunchSpecificationDeserializer;
impl LaunchSpecificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<LaunchSpecification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = LaunchSpecification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "addressingType" => {
                            obj.addressing_type =
                                Some(try!(StringDeserializer::deserialize("addressingType",
                                                                          stack)));
                        }
                        "blockDeviceMapping" => {
                            obj.block_device_mappings =
                                Some(try!(BlockDeviceMappingListDeserializer::deserialize("blockDeviceMapping",
                                                                                          stack)));
                        }
                        "ebsOptimized" => {
                            obj.ebs_optimized = Some(try!(BooleanDeserializer::deserialize("ebsOptimized",
                                                                                           stack)));
                        }
                        "iamInstanceProfile" => {
                            obj.iam_instance_profile = Some(try!(IamInstanceProfileSpecificationDeserializer::deserialize("iamInstanceProfile", stack)));
                        }
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(InstanceTypeDeserializer::deserialize("instanceType",
                                                                                stack)));
                        }
                        "kernelId" => {
                            obj.kernel_id = Some(try!(StringDeserializer::deserialize("kernelId",
                                                                                      stack)));
                        }
                        "keyName" => {
                            obj.key_name = Some(try!(StringDeserializer::deserialize("keyName",
                                                                                     stack)));
                        }
                        "monitoring" => {
                            obj.monitoring = Some(try!(RunInstancesMonitoringEnabledDeserializer::deserialize("monitoring", stack)));
                        }
                        "networkInterfaceSet" => {
                            obj.network_interfaces = Some(try!(InstanceNetworkInterfaceSpecificationListDeserializer::deserialize("networkInterfaceSet", stack)));
                        }
                        "placement" => {
                            obj.placement =
                                Some(try!(SpotPlacementDeserializer::deserialize("placement",
                                                                                 stack)));
                        }
                        "ramdiskId" => {
                            obj.ramdisk_id = Some(try!(StringDeserializer::deserialize("ramdiskId",
                                                                                       stack)));
                        }
                        "groupSet" => {
                            obj.security_groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        "userData" => {
                            obj.user_data = Some(try!(StringDeserializer::deserialize("userData",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct LaunchSpecsListDeserializer;
impl LaunchSpecsListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<SpotFleetLaunchSpecification>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SpotFleetLaunchSpecificationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `LaunchSpecsList` contents to a `SignedRequest`.
struct LaunchSpecsListSerializer;
impl LaunchSpecsListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<SpotFleetLaunchSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            SpotFleetLaunchSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}

struct ListingStateDeserializer;
impl ListingStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ListingStatusDeserializer;
impl ListingStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct LongDeserializer;
impl LongDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<i64, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = i64::from_str(try!(characters(stack)).as_ref()).unwrap();
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ModifyHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyHostsRequest {
    #[doc="<p>Specify whether to enable or disable auto-placement.</p>"]
    pub auto_placement: String,
    #[doc="<p>The host IDs of the Dedicated Hosts you want to modify.</p>"]
    pub host_ids: Vec<String>,
}


/// Serialize `ModifyHostsRequest` contents to a `SignedRequest`.
struct ModifyHostsRequestSerializer;
impl ModifyHostsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyHostsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AutoPlacement"),
                   &obj.auto_placement.replace("+", "%2B"));
        RequestHostIdListSerializer::serialize(params,
                                               &format!("{}{}", prefix, "HostId"),
                                               &obj.host_ids);

    }
}

#[doc="<p>Contains the output of ModifyHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyHostsResult {
    #[doc="<p>The IDs of the Dedicated Hosts that were successfully modified.</p>"]
    pub successful: Option<Vec<String>>,
    #[doc="<p>The IDs of the Dedicated Hosts that could not be modified. Check whether the setting you requested can be used.</p>"]
    pub unsuccessful: Option<Vec<UnsuccessfulItem>>,
}

struct ModifyHostsResultDeserializer;
impl ModifyHostsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ModifyHostsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ModifyHostsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "successful" => {
                            obj.successful =
                                Some(try!(ResponseHostIdListDeserializer::deserialize("successful",
                                                                                      stack)));
                        }
                        "unsuccessful" => {
                            obj.unsuccessful =
                                Some(try!(UnsuccessfulItemListDeserializer::deserialize("unsuccessful",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters of ModifyIdFormat.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyIdFormatRequest {
    #[doc="<p>The type of resource: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code> </p>"]
    pub resource: String,
    #[doc="<p>Indicate whether the resource should use longer IDs (17-character IDs).</p>"]
    pub use_long_ids: bool,
}


/// Serialize `ModifyIdFormatRequest` contents to a `SignedRequest`.
struct ModifyIdFormatRequestSerializer;
impl ModifyIdFormatRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyIdFormatRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Resource"),
                   &obj.resource.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "UseLongIds"),
                   &obj.use_long_ids.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters of ModifyIdentityIdFormat.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyIdentityIdFormatRequest {
    #[doc="<p>The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify <code>all</code> to modify the ID format for all IAM users, IAM roles, and the root user of the account.</p>"]
    pub principal_arn: String,
    #[doc="<p>The type of resource: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code> </p>"]
    pub resource: String,
    #[doc="<p>Indicates whether the resource should use longer IDs (17-character IDs)</p>"]
    pub use_long_ids: bool,
}


/// Serialize `ModifyIdentityIdFormatRequest` contents to a `SignedRequest`.
struct ModifyIdentityIdFormatRequestSerializer;
impl ModifyIdentityIdFormatRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyIdentityIdFormatRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "PrincipalArn"),
                   &obj.principal_arn.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "Resource"),
                   &obj.resource.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "UseLongIds"),
                   &obj.use_long_ids.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for ModifyImageAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyImageAttributeRequest {
    #[doc="<p>The name of the attribute to modify.</p>"]
    pub attribute: Option<String>,
    #[doc="<p>A description for the AMI.</p>"]
    pub description: Option<AttributeValue>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: String,
    #[doc="<p>A launch permission modification.</p>"]
    pub launch_permission: Option<LaunchPermissionModifications>,
    #[doc="<p>The operation type.</p>"]
    pub operation_type: Option<String>,
    #[doc="<p>One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the <code>productCodes</code> attribute.</p>"]
    pub product_codes: Option<Vec<String>>,
    #[doc="<p>One or more user groups. This is only valid when modifying the <code>launchPermission</code> attribute.</p>"]
    pub user_groups: Option<Vec<String>>,
    #[doc="<p>One or more AWS account IDs. This is only valid when modifying the <code>launchPermission</code> attribute.</p>"]
    pub user_ids: Option<Vec<String>>,
    #[doc="<p>The value of the attribute being modified. This is only valid when modifying the <code>description</code> attribute.</p>"]
    pub value: Option<String>,
}


/// Serialize `ModifyImageAttributeRequest` contents to a `SignedRequest`.
struct ModifyImageAttributeRequestSerializer;
impl ModifyImageAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyImageAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attribute {
            params.put(&format!("{}{}", prefix, "Attribute"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.description {
            AttributeValueSerializer::serialize(params,
                                                &format!("{}{}", prefix, "Description"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "ImageId"),
                   &obj.image_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.launch_permission {
            LaunchPermissionModificationsSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "LaunchPermission"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.operation_type {
            params.put(&format!("{}{}", prefix, "OperationType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.product_codes {
            ProductCodeStringListSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "ProductCode"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.user_groups {
            UserGroupStringListSerializer::serialize(params,
                                                     &format!("{}{}", prefix, "UserGroup"),
                                                     field_value);
        }
        if let Some(ref field_value) = obj.user_ids {
            UserIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "UserId"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.value {
            params.put(&format!("{}{}", prefix, "Value"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for ModifyInstanceAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyInstanceAttributeRequest {
    #[doc="<p>The name of the attribute.</p>"]
    pub attribute: Option<String>,
    #[doc="<p>Modifies the <code>DeleteOnTermination</code> attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for <code>DeleteOnTermination</code>, the default is <code>true</code> and the volume is deleted when the instance is terminated.</p> <p>To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM\">Updating the Block Device Mapping when Launching an Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub block_device_mappings: Option<Vec<InstanceBlockDeviceMappingSpecification>>,
    #[doc="<p>If the value is <code>true</code>, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.</p>"]
    pub disable_api_termination: Option<AttributeBooleanValue>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Specifies whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>"]
    pub ebs_optimized: Option<AttributeBooleanValue>,
    #[doc="<p>Set to <code>true</code> to enable enhanced networking with ENA for the instance.</p> <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>"]
    pub ena_support: Option<AttributeBooleanValue>,
    #[doc="<p>[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.</p>"]
    pub groups: Option<Vec<String>>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
    #[doc="<p>Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>"]
    pub instance_initiated_shutdown_behavior: Option<AttributeValue>,
    #[doc="<p>Changes the instance type to the specified value. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html\">Instance Types</a>. If the instance type is not valid, the error returned is <code>InvalidInstanceAttributeValue</code>.</p>"]
    pub instance_type: Option<AttributeValue>,
    #[doc="<p>Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html\">PV-GRUB</a>.</p>"]
    pub kernel: Option<AttributeValue>,
    #[doc="<p>Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html\">PV-GRUB</a>.</p>"]
    pub ramdisk: Option<AttributeValue>,
    #[doc="<p>Specifies whether source/destination checking is enabled. A value of <code>true</code> means that checking is enabled, and <code>false</code> means checking is disabled. This value must be <code>false</code> for a NAT instance to perform NAT.</p>"]
    pub source_dest_check: Option<AttributeBooleanValue>,
    #[doc="<p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.</p> <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.</p> <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>"]
    pub sriov_net_support: Option<AttributeValue>,
    #[doc="<p>Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>"]
    pub user_data: Option<BlobAttributeValue>,
    #[doc="<p>A new value for the attribute. Use only with the <code>kernel</code>, <code>ramdisk</code>, <code>userData</code>, <code>disableApiTermination</code>, or <code>instanceInitiatedShutdownBehavior</code> attribute.</p>"]
    pub value: Option<String>,
}


/// Serialize `ModifyInstanceAttributeRequest` contents to a `SignedRequest`.
struct ModifyInstanceAttributeRequestSerializer;
impl ModifyInstanceAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyInstanceAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attribute {
            params.put(&format!("{}{}", prefix, "Attribute"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.block_device_mappings {
            InstanceBlockDeviceMappingSpecificationListSerializer::serialize(params,
                                                                             &format!("{}{}",
                                                                                     prefix,
                                                                                     "BlockDeviceMapping"),
                                                                             field_value);
        }
        if let Some(ref field_value) = obj.disable_api_termination {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}",
                                                               prefix,
                                                               "DisableApiTermination"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ebs_optimized {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "EbsOptimized"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.ena_support {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "EnaSupport"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.groups {
            GroupIdStringListSerializer::serialize(params,
                                                   &format!("{}{}", prefix, "GroupId"),
                                                   field_value);
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.instance_initiated_shutdown_behavior {
            AttributeValueSerializer::serialize(params,
                                                &format!("{}{}",
                                                        prefix,
                                                        "InstanceInitiatedShutdownBehavior"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.instance_type {
            AttributeValueSerializer::serialize(params,
                                                &format!("{}{}", prefix, "InstanceType"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.kernel {
            AttributeValueSerializer::serialize(params,
                                                &format!("{}{}", prefix, "Kernel"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.ramdisk {
            AttributeValueSerializer::serialize(params,
                                                &format!("{}{}", prefix, "Ramdisk"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.source_dest_check {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "SourceDestCheck"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.sriov_net_support {
            AttributeValueSerializer::serialize(params,
                                                &format!("{}{}", prefix, "SriovNetSupport"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.user_data {
            BlobAttributeValueSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "UserData"),
                                                    field_value);
        }
        if let Some(ref field_value) = obj.value {
            params.put(&format!("{}{}", prefix, "Value"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for ModifyInstancePlacement.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyInstancePlacementRequest {
    #[doc="<p>The new affinity setting for the instance.</p>"]
    pub affinity: Option<String>,
    #[doc="<p>The ID of the Dedicated Host that the instance will have affinity with.</p>"]
    pub host_id: Option<String>,
    #[doc="<p>The ID of the instance that you are modifying.</p>"]
    pub instance_id: String,
    #[doc="<p>The tenancy of the instance that you are modifying.</p>"]
    pub tenancy: Option<String>,
}


/// Serialize `ModifyInstancePlacementRequest` contents to a `SignedRequest`.
struct ModifyInstancePlacementRequestSerializer;
impl ModifyInstancePlacementRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyInstancePlacementRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.affinity {
            params.put(&format!("{}{}", prefix, "Affinity"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.host_id {
            params.put(&format!("{}{}", prefix, "HostId"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.tenancy {
            params.put(&format!("{}{}", prefix, "Tenancy"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of ModifyInstancePlacement.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyInstancePlacementResult {
    #[doc="<p>Is <code>true</code> if the request succeeds, and an error otherwise.</p>"]
    pub return_: Option<bool>,
}

struct ModifyInstancePlacementResultDeserializer;
impl ModifyInstancePlacementResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ModifyInstancePlacementResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ModifyInstancePlacementResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ModifyNetworkInterfaceAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyNetworkInterfaceAttributeRequest {
    #[doc="<p>Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.</p>"]
    pub attachment: Option<NetworkInterfaceAttachmentChanges>,
    #[doc="<p>A description for the network interface.</p>"]
    pub description: Option<AttributeValue>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.</p>"]
    pub groups: Option<Vec<String>>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
    #[doc="<p>Indicates whether source/destination checking is enabled. A value of <code>true</code> means checking is enabled, and <code>false</code> means checking is disabled. This value must be <code>false</code> for a NAT instance to perform NAT. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html\">NAT Instances</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    pub source_dest_check: Option<AttributeBooleanValue>,
}


/// Serialize `ModifyNetworkInterfaceAttributeRequest` contents to a `SignedRequest`.
struct ModifyNetworkInterfaceAttributeRequestSerializer;
impl ModifyNetworkInterfaceAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyNetworkInterfaceAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attachment {
            NetworkInterfaceAttachmentChangesSerializer::serialize(params,
                                                                   &format!("{}{}",
                                                                           prefix,
                                                                           "Attachment"),
                                                                   field_value);
        }
        if let Some(ref field_value) = obj.description {
            AttributeValueSerializer::serialize(params,
                                                &format!("{}{}", prefix, "Description"),
                                                field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.groups {
            SecurityGroupIdStringListSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "SecurityGroupId"),
                                                           field_value);
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.source_dest_check {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "SourceDestCheck"),
                                                       field_value);
        }

    }
}

#[doc="<p>Contains the parameters for ModifyReservedInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyReservedInstancesRequest {
    #[doc="<p>A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The IDs of the Reserved Instances to modify.</p>"]
    pub reserved_instances_ids: Vec<String>,
    #[doc="<p>The configuration settings for the Reserved Instances to modify.</p>"]
    pub target_configurations: Vec<ReservedInstancesConfiguration>,
}


/// Serialize `ModifyReservedInstancesRequest` contents to a `SignedRequest`.
struct ModifyReservedInstancesRequestSerializer;
impl ModifyReservedInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyReservedInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        ReservedInstancesIdStringListSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "ReservedInstancesId"),
                                                           &obj.reserved_instances_ids);
        ReservedInstancesConfigurationListSerializer::serialize(params,
                                                                &format!("{}{}",
                                                                        prefix,
                                                                        "ReservedInstancesConfigurationSetItemType"),
                                                                &obj.target_configurations);

    }
}

#[doc="<p>Contains the output of ModifyReservedInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyReservedInstancesResult {
    #[doc="<p>The ID for the modification.</p>"]
    pub reserved_instances_modification_id: Option<String>,
}

struct ModifyReservedInstancesResultDeserializer;
impl ModifyReservedInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ModifyReservedInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ModifyReservedInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesModificationId" => {
                            obj.reserved_instances_modification_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesModificationId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ModifySnapshotAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifySnapshotAttributeRequest {
    #[doc="<p>The snapshot attribute to modify.</p> <note> <p>Only volume creation permissions may be modified at the customer level.</p> </note>"]
    pub attribute: Option<String>,
    #[doc="<p>A JSON representation of the snapshot attribute modification.</p>"]
    pub create_volume_permission: Option<CreateVolumePermissionModifications>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The group to modify for the snapshot.</p>"]
    pub group_names: Option<Vec<String>>,
    #[doc="<p>The type of operation to perform to the attribute.</p>"]
    pub operation_type: Option<String>,
    #[doc="<p>The ID of the snapshot.</p>"]
    pub snapshot_id: String,
    #[doc="<p>The account ID to modify for the snapshot.</p>"]
    pub user_ids: Option<Vec<String>>,
}


/// Serialize `ModifySnapshotAttributeRequest` contents to a `SignedRequest`.
struct ModifySnapshotAttributeRequestSerializer;
impl ModifySnapshotAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifySnapshotAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attribute {
            params.put(&format!("{}{}", prefix, "Attribute"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.create_volume_permission {
            CreateVolumePermissionModificationsSerializer::serialize(params,
                                                                     &format!("{}{}",
                                                                             prefix,
                                                                             "CreateVolumePermission"),
                                                                     field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_names {
            GroupNameStringListSerializer::serialize(params,
                                                     &format!("{}{}", prefix, "UserGroup"),
                                                     field_value);
        }
        if let Some(ref field_value) = obj.operation_type {
            params.put(&format!("{}{}", prefix, "OperationType"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SnapshotId"),
                   &obj.snapshot_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.user_ids {
            UserIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "UserId"),
                                                  field_value);
        }

    }
}

#[doc="<p>Contains the parameters for ModifySpotFleetRequest.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifySpotFleetRequestRequest {
    #[doc="<p>Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.</p>"]
    pub excess_capacity_termination_policy: Option<String>,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
    #[doc="<p>The size of the fleet.</p>"]
    pub target_capacity: Option<i64>,
}


/// Serialize `ModifySpotFleetRequestRequest` contents to a `SignedRequest`.
struct ModifySpotFleetRequestRequestSerializer;
impl ModifySpotFleetRequestRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifySpotFleetRequestRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.excess_capacity_termination_policy {
            params.put(&format!("{}{}", prefix, "ExcessCapacityTerminationPolicy"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SpotFleetRequestId"),
                   &obj.spot_fleet_request_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.target_capacity {
            params.put(&format!("{}{}", prefix, "TargetCapacity"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of ModifySpotFleetRequest.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifySpotFleetRequestResponse {
    #[doc="<p>Is <code>true</code> if the request succeeds, and an error otherwise.</p>"]
    pub return_: Option<bool>,
}

struct ModifySpotFleetRequestResponseDeserializer;
impl ModifySpotFleetRequestResponseDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ModifySpotFleetRequestResponse, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ModifySpotFleetRequestResponse::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ModifySubnetAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifySubnetAttributeRequest {
    #[doc="<p>Specify <code>true</code> to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives an IPv6 address). </p> <p>If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an IPv6 address if it's created using version <code>2016-11-15</code> or later of the Amazon EC2 API.</p>"]
    pub assign_ipv_6_address_on_creation: Option<AttributeBooleanValue>,
    #[doc="<p>Specify <code>true</code> to indicate that network interfaces created in the specified subnet should be assigned a public IPv4 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives a public IPv4 address).</p>"]
    pub map_public_ip_on_launch: Option<AttributeBooleanValue>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: String,
}


/// Serialize `ModifySubnetAttributeRequest` contents to a `SignedRequest`.
struct ModifySubnetAttributeRequestSerializer;
impl ModifySubnetAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifySubnetAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.assign_ipv_6_address_on_creation {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}",
                                                               prefix,
                                                               "AssignIpv6AddressOnCreation"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.map_public_ip_on_launch {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}",
                                                               prefix,
                                                               "MapPublicIpOnLaunch"),
                                                       field_value);
        }
        params.put(&format!("{}{}", prefix, "SubnetId"),
                   &obj.subnet_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for ModifyVolumeAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyVolumeAttributeRequest {
    #[doc="<p>Indicates whether the volume should be auto-enabled for I/O operations.</p>"]
    pub auto_enable_io: Option<AttributeBooleanValue>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: String,
}


/// Serialize `ModifyVolumeAttributeRequest` contents to a `SignedRequest`.
struct ModifyVolumeAttributeRequestSerializer;
impl ModifyVolumeAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyVolumeAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.auto_enable_io {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "AutoEnableIO"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct ModifyVolumeRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Target IOPS rate of the volume to be modified.</p> <p>Only valid for Provisioned IOPS SSD (<code>io1</code>) volumes. For more information about <code>io1</code> IOPS configuration, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops\">http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops</a>.</p> <p>Default: If no IOPS value is specified, the existing value is retained. </p>"]
    pub iops: Option<i64>,
    #[doc="<p>Target size in GiB of the volume to be modified. Target volume size must be greater than or equal to than the existing size of the volume. For information about available EBS volume sizes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html\">http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html</a>.</p> <p>Default: If no size is specified, the existing size is retained. </p>"]
    pub size: Option<i64>,
    pub volume_id: String,
    #[doc="<p>Target EBS volume type of the volume to be modified</p> <p> The API does not support modifications for volume type <code>standard</code>. You also cannot change the type of a volume to <code>standard</code>. </p> <p>Default: If no type is specified, the existing type is retained. </p>"]
    pub volume_type: Option<String>,
}


/// Serialize `ModifyVolumeRequest` contents to a `SignedRequest`.
struct ModifyVolumeRequestSerializer;
impl ModifyVolumeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyVolumeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.iops {
            params.put(&format!("{}{}", prefix, "Iops"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.size {
            params.put(&format!("{}{}", prefix, "Size"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VolumeId"),
                   &obj.volume_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.volume_type {
            params.put(&format!("{}{}", prefix, "VolumeType"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[derive(Default,Debug,Clone)]
pub struct ModifyVolumeResult {
    #[doc="<p>A <a>VolumeModification</a> object.</p>"]
    pub volume_modification: Option<VolumeModification>,
}

struct ModifyVolumeResultDeserializer;
impl ModifyVolumeResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ModifyVolumeResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ModifyVolumeResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "volumeModification" => {
                            obj.volume_modification =
                                Some(try!(VolumeModificationDeserializer::deserialize("volumeModification",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ModifyVpcAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyVpcAttributeRequest {
    #[doc="<p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p> <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>"]
    pub enable_dns_hostnames: Option<AttributeBooleanValue>,
    #[doc="<p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range \"plus two\" will succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.</p> <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>"]
    pub enable_dns_support: Option<AttributeBooleanValue>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: String,
}


/// Serialize `ModifyVpcAttributeRequest` contents to a `SignedRequest`.
struct ModifyVpcAttributeRequestSerializer;
impl ModifyVpcAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyVpcAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.enable_dns_hostnames {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}",
                                                               prefix,
                                                               "EnableDnsHostnames"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.enable_dns_support {
            AttributeBooleanValueSerializer::serialize(params,
                                                       &format!("{}{}",
                                                               prefix,
                                                               "EnableDnsSupport"),
                                                       field_value);
        }
        params.put(&format!("{}{}", prefix, "VpcId"),
                   &obj.vpc_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for ModifyVpcEndpoint.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyVpcEndpointRequest {
    #[doc="<p>One or more route tables IDs to associate with the endpoint.</p>"]
    pub add_route_table_ids: Option<Vec<String>>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>A policy document to attach to the endpoint. The policy must be in valid JSON format.</p>"]
    pub policy_document: Option<String>,
    #[doc="<p>One or more route table IDs to disassociate from the endpoint.</p>"]
    pub remove_route_table_ids: Option<Vec<String>>,
    #[doc="<p>Specify <code>true</code> to reset the policy document to the default policy. The default policy allows access to the service.</p>"]
    pub reset_policy: Option<bool>,
    #[doc="<p>The ID of the endpoint.</p>"]
    pub vpc_endpoint_id: String,
}


/// Serialize `ModifyVpcEndpointRequest` contents to a `SignedRequest`.
struct ModifyVpcEndpointRequestSerializer;
impl ModifyVpcEndpointRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyVpcEndpointRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.add_route_table_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "AddRouteTableId"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.policy_document {
            params.put(&format!("{}{}", prefix, "PolicyDocument"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.remove_route_table_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "RemoveRouteTableId"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.reset_policy {
            params.put(&format!("{}{}", prefix, "ResetPolicy"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcEndpointId"),
                   &obj.vpc_endpoint_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of ModifyVpcEndpoint.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ModifyVpcEndpointResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct ModifyVpcEndpointResultDeserializer;
impl ModifyVpcEndpointResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ModifyVpcEndpointResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ModifyVpcEndpointResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct ModifyVpcPeeringConnectionOptionsRequest {
    #[doc="<p>The VPC peering connection options for the accepter VPC.</p>"]
    pub accepter_peering_connection_options: Option<PeeringConnectionOptionsRequest>,
    #[doc="<p>Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The VPC peering connection options for the requester VPC.</p>"]
    pub requester_peering_connection_options: Option<PeeringConnectionOptionsRequest>,
    #[doc="<p>The ID of the VPC peering connection.</p>"]
    pub vpc_peering_connection_id: String,
}


/// Serialize `ModifyVpcPeeringConnectionOptionsRequest` contents to a `SignedRequest`.
struct ModifyVpcPeeringConnectionOptionsRequestSerializer;
impl ModifyVpcPeeringConnectionOptionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ModifyVpcPeeringConnectionOptionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.accepter_peering_connection_options {
            PeeringConnectionOptionsRequestSerializer::serialize(params,
                                                                 &format!("{}{}",
                                                                         prefix,
                                                                         "AccepterPeeringConnectionOptions"),
                                                                 field_value);
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.requester_peering_connection_options {
            PeeringConnectionOptionsRequestSerializer::serialize(params,
                                                                 &format!("{}{}",
                                                                         prefix,
                                                                         "RequesterPeeringConnectionOptions"),
                                                                 field_value);
        }
        params.put(&format!("{}{}", prefix, "VpcPeeringConnectionId"),
                   &obj.vpc_peering_connection_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct ModifyVpcPeeringConnectionOptionsResult {
    #[doc="<p>Information about the VPC peering connection options for the accepter VPC.</p>"]
    pub accepter_peering_connection_options: Option<PeeringConnectionOptions>,
    #[doc="<p>Information about the VPC peering connection options for the requester VPC.</p>"]
    pub requester_peering_connection_options: Option<PeeringConnectionOptions>,
}

struct ModifyVpcPeeringConnectionOptionsResultDeserializer;
impl ModifyVpcPeeringConnectionOptionsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<ModifyVpcPeeringConnectionOptionsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ModifyVpcPeeringConnectionOptionsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "accepterPeeringConnectionOptions" => {
                            obj.accepter_peering_connection_options = Some(try!(PeeringConnectionOptionsDeserializer::deserialize("accepterPeeringConnectionOptions", stack)));
                        }
                        "requesterPeeringConnectionOptions" => {
                            obj.requester_peering_connection_options = Some(try!(PeeringConnectionOptionsDeserializer::deserialize("requesterPeeringConnectionOptions", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for MonitorInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct MonitorInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more instance IDs.</p>"]
    pub instance_ids: Vec<String>,
}


/// Serialize `MonitorInstancesRequest` contents to a `SignedRequest`.
struct MonitorInstancesRequestSerializer;
impl MonitorInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &MonitorInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        InstanceIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceId"),
                                                  &obj.instance_ids);

    }
}

#[doc="<p>Contains the output of MonitorInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct MonitorInstancesResult {
    #[doc="<p>The monitoring information.</p>"]
    pub instance_monitorings: Option<Vec<InstanceMonitoring>>,
}

struct MonitorInstancesResultDeserializer;
impl MonitorInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<MonitorInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = MonitorInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instancesSet" => {
                            obj.instance_monitorings =
                                Some(try!(InstanceMonitoringListDeserializer::deserialize("instancesSet",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the monitoring of an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Monitoring {
    #[doc="<p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>"]
    pub state: Option<String>,
}

struct MonitoringDeserializer;
impl MonitoringDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Monitoring, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Monitoring::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "state" => {
                            obj.state = Some(try!(MonitoringStateDeserializer::deserialize("state",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct MonitoringStateDeserializer;
impl MonitoringStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for MoveAddressToVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct MoveAddressToVpcRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The Elastic IP address.</p>"]
    pub public_ip: String,
}


/// Serialize `MoveAddressToVpcRequest` contents to a `SignedRequest`.
struct MoveAddressToVpcRequestSerializer;
impl MoveAddressToVpcRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &MoveAddressToVpcRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "PublicIp"),
                   &obj.public_ip.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of MoveAddressToVpc.</p>"]
#[derive(Default,Debug,Clone)]
pub struct MoveAddressToVpcResult {
    #[doc="<p>The allocation ID for the Elastic IP address.</p>"]
    pub allocation_id: Option<String>,
    #[doc="<p>The status of the move of the IP address.</p>"]
    pub status: Option<String>,
}

struct MoveAddressToVpcResultDeserializer;
impl MoveAddressToVpcResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<MoveAddressToVpcResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = MoveAddressToVpcResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allocationId" => {
                            obj.allocation_id = Some(try!(StringDeserializer::deserialize("allocationId",
                                                                                          stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StatusDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct MoveStatusDeserializer;
impl MoveStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the status of a moving Elastic IP address.</p>"]
#[derive(Default,Debug,Clone)]
pub struct MovingAddressStatus {
    #[doc="<p>The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.</p>"]
    pub move_status: Option<String>,
    #[doc="<p>The Elastic IP address.</p>"]
    pub public_ip: Option<String>,
}

struct MovingAddressStatusDeserializer;
impl MovingAddressStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<MovingAddressStatus, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = MovingAddressStatus::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "moveStatus" => {
                            obj.move_status =
                                Some(try!(MoveStatusDeserializer::deserialize("moveStatus",
                                                                              stack)));
                        }
                        "publicIp" => {
                            obj.public_ip = Some(try!(StringDeserializer::deserialize("publicIp",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct MovingAddressStatusSetDeserializer;
impl MovingAddressStatusSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<MovingAddressStatus>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(MovingAddressStatusDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a NAT gateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NatGateway {
    #[doc="<p>The date and time the NAT gateway was created.</p>"]
    pub create_time: Option<String>,
    #[doc="<p>The date and time the NAT gateway was deleted, if applicable.</p>"]
    pub delete_time: Option<String>,
    #[doc="<p>If the NAT gateway could not be created, specifies the error code for the failure. (<code>InsufficientFreeAddressesInSubnet</code> | <code>Gateway.NotAttached</code> | <code>InvalidAllocationID.NotFound</code> | <code>Resource.AlreadyAssociated</code> | <code>InternalError</code> | <code>InvalidSubnetID.NotFound</code>)</p>"]
    pub failure_code: Option<String>,
    #[doc="<p>If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.</p> <ul> <li> <p>For InsufficientFreeAddressesInSubnet: \"Subnet has insufficient free addresses to create this NAT gateway\"</p> </li> <li> <p>For Gateway.NotAttached: \"Network vpc-xxxxxxxx has no Internet gateway attached\"</p> </li> <li> <p>For InvalidAllocationID.NotFound: \"Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway\"</p> </li> <li> <p>For Resource.AlreadyAssociated: \"Elastic IP address eipalloc-xxxxxxxx is already associated\"</p> </li> <li> <p>For InternalError: \"Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again.\"</p> </li> <li> <p>For InvalidSubnetID.NotFound: \"The specified subnet subnet-xxxxxxxx does not exist or could not be found.\"</p> </li> </ul>"]
    pub failure_message: Option<String>,
    #[doc="<p>Information about the IP addresses and network interface associated with the NAT gateway.</p>"]
    pub nat_gateway_addresses: Option<Vec<NatGatewayAddress>>,
    #[doc="<p>The ID of the NAT gateway.</p>"]
    pub nat_gateway_id: Option<String>,
    #[doc="<p>Reserved. If you need to sustain traffic greater than the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">documented limits</a>, contact us through the <a href=\"https://console.aws.amazon.com/support/home?\">Support Center</a>.</p>"]
    pub provisioned_bandwidth: Option<ProvisionedBandwidth>,
    #[doc="<p>The state of the NAT gateway.</p> <ul> <li> <p> <code>pending</code>: The NAT gateway is being created and is not ready to process traffic.</p> </li> <li> <p> <code>failed</code>: The NAT gateway could not be created. Check the <code>failureCode</code> and <code>failureMessage</code> fields for the reason.</p> </li> <li> <p> <code>available</code>: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.</p> </li> <li> <p> <code>deleting</code>: The NAT gateway is in the process of being terminated and may still be processing traffic.</p> </li> <li> <p> <code>deleted</code>: The NAT gateway has been terminated and is no longer processing traffic.</p> </li> </ul>"]
    pub state: Option<String>,
    #[doc="<p>The ID of the subnet in which the NAT gateway is located.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The ID of the VPC in which the NAT gateway is located.</p>"]
    pub vpc_id: Option<String>,
}

struct NatGatewayDeserializer;
impl NatGatewayDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NatGateway, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NatGateway::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "createTime" => {
                            obj.create_time = Some(try!(DateTimeDeserializer::deserialize("createTime",
                                                                                          stack)));
                        }
                        "deleteTime" => {
                            obj.delete_time = Some(try!(DateTimeDeserializer::deserialize("deleteTime",
                                                                                          stack)));
                        }
                        "failureCode" => {
                            obj.failure_code = Some(try!(StringDeserializer::deserialize("failureCode",
                                                                                         stack)));
                        }
                        "failureMessage" => {
                            obj.failure_message =
                                Some(try!(StringDeserializer::deserialize("failureMessage",
                                                                          stack)));
                        }
                        "natGatewayAddressSet" => {
                            obj.nat_gateway_addresses =
                                Some(try!(NatGatewayAddressListDeserializer::deserialize("natGatewayAddressSet",
                                                                                         stack)));
                        }
                        "natGatewayId" => {
                            obj.nat_gateway_id = Some(try!(StringDeserializer::deserialize("natGatewayId",
                                                                                           stack)));
                        }
                        "provisionedBandwidth" => {
                            obj.provisioned_bandwidth =
                                Some(try!(ProvisionedBandwidthDeserializer::deserialize("provisionedBandwidth",
                                                                                        stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(NatGatewayStateDeserializer::deserialize("state",
                                                                                           stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the IP addresses and network interface associated with a NAT gateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NatGatewayAddress {
    #[doc="<p>The allocation ID of the Elastic IP address that's associated with the NAT gateway.</p>"]
    pub allocation_id: Option<String>,
    #[doc="<p>The ID of the network interface associated with the NAT gateway.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The private IP address associated with the Elastic IP address.</p>"]
    pub private_ip: Option<String>,
    #[doc="<p>The Elastic IP address associated with the NAT gateway.</p>"]
    pub public_ip: Option<String>,
}

struct NatGatewayAddressDeserializer;
impl NatGatewayAddressDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NatGatewayAddress, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NatGatewayAddress::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allocationId" => {
                            obj.allocation_id = Some(try!(StringDeserializer::deserialize("allocationId",
                                                                                          stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "privateIp" => {
                            obj.private_ip = Some(try!(StringDeserializer::deserialize("privateIp",
                                                                                       stack)));
                        }
                        "publicIp" => {
                            obj.public_ip = Some(try!(StringDeserializer::deserialize("publicIp",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct NatGatewayAddressListDeserializer;
impl NatGatewayAddressListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<NatGatewayAddress>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NatGatewayAddressDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct NatGatewayListDeserializer;
impl NatGatewayListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<NatGateway>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NatGatewayDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct NatGatewayStateDeserializer;
impl NatGatewayStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a network ACL.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkAcl {
    #[doc="<p>Any associations between the network ACL and one or more subnets</p>"]
    pub associations: Option<Vec<NetworkAclAssociation>>,
    #[doc="<p>One or more entries (rules) in the network ACL.</p>"]
    pub entries: Option<Vec<NetworkAclEntry>>,
    #[doc="<p>Indicates whether this is the default network ACL for the VPC.</p>"]
    pub is_default: Option<bool>,
    #[doc="<p>The ID of the network ACL.</p>"]
    pub network_acl_id: Option<String>,
    #[doc="<p>Any tags assigned to the network ACL.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC for the network ACL.</p>"]
    pub vpc_id: Option<String>,
}

struct NetworkAclDeserializer;
impl NetworkAclDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkAcl, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkAcl::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associationSet" => {
                            obj.associations = Some(try!(NetworkAclAssociationListDeserializer::deserialize("associationSet", stack)));
                        }
                        "entrySet" => {
                            obj.entries =
                                Some(try!(NetworkAclEntryListDeserializer::deserialize("entrySet",
                                                                                       stack)));
                        }
                        "default" => {
                            obj.is_default = Some(try!(BooleanDeserializer::deserialize("default",
                                                                                        stack)));
                        }
                        "networkAclId" => {
                            obj.network_acl_id = Some(try!(StringDeserializer::deserialize("networkAclId",
                                                                                           stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an association between a network ACL and a subnet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkAclAssociation {
    #[doc="<p>The ID of the association between a network ACL and a subnet.</p>"]
    pub network_acl_association_id: Option<String>,
    #[doc="<p>The ID of the network ACL.</p>"]
    pub network_acl_id: Option<String>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: Option<String>,
}

struct NetworkAclAssociationDeserializer;
impl NetworkAclAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkAclAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkAclAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "networkAclAssociationId" => {
                            obj.network_acl_association_id =
                                Some(try!(StringDeserializer::deserialize("networkAclAssociationId",
                                                                          stack)));
                        }
                        "networkAclId" => {
                            obj.network_acl_id = Some(try!(StringDeserializer::deserialize("networkAclId",
                                                                                           stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct NetworkAclAssociationListDeserializer;
impl NetworkAclAssociationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<NetworkAclAssociation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NetworkAclAssociationDeserializer::deserialize("item",
                                                                                     stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes an entry in a network ACL.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkAclEntry {
    #[doc="<p>The IPv4 network range to allow or deny, in CIDR notation.</p>"]
    pub cidr_block: Option<String>,
    #[doc="<p>Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).</p>"]
    pub egress: Option<bool>,
    #[doc="<p>ICMP protocol: The ICMP type and code.</p>"]
    pub icmp_type_code: Option<IcmpTypeCode>,
    #[doc="<p>The IPv6 network range to allow or deny, in CIDR notation.</p>"]
    pub ipv_6_cidr_block: Option<String>,
    #[doc="<p>TCP or UDP protocols: The range of ports the rule applies to.</p>"]
    pub port_range: Option<PortRange>,
    #[doc="<p>The protocol. A value of <code>-1</code> means all protocols.</p>"]
    pub protocol: Option<String>,
    #[doc="<p>Indicates whether to allow or deny the traffic that matches the rule.</p>"]
    pub rule_action: Option<String>,
    #[doc="<p>The rule number for the entry. ACL entries are processed in ascending order by rule number.</p>"]
    pub rule_number: Option<i64>,
}

struct NetworkAclEntryDeserializer;
impl NetworkAclEntryDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkAclEntry, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkAclEntry::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "cidrBlock" => {
                            obj.cidr_block = Some(try!(StringDeserializer::deserialize("cidrBlock",
                                                                                       stack)));
                        }
                        "egress" => {
                            obj.egress = Some(try!(BooleanDeserializer::deserialize("egress",
                                                                                    stack)));
                        }
                        "icmpTypeCode" => {
                            obj.icmp_type_code =
                                Some(try!(IcmpTypeCodeDeserializer::deserialize("icmpTypeCode",
                                                                                stack)));
                        }
                        "ipv6CidrBlock" => {
                            obj.ipv_6_cidr_block =
                                Some(try!(StringDeserializer::deserialize("ipv6CidrBlock", stack)));
                        }
                        "portRange" => {
                            obj.port_range = Some(try!(PortRangeDeserializer::deserialize("portRange",
                                                                                          stack)));
                        }
                        "protocol" => {
                            obj.protocol = Some(try!(StringDeserializer::deserialize("protocol",
                                                                                     stack)));
                        }
                        "ruleAction" => {
                            obj.rule_action =
                                Some(try!(RuleActionDeserializer::deserialize("ruleAction",
                                                                              stack)));
                        }
                        "ruleNumber" => {
                            obj.rule_number = Some(try!(IntegerDeserializer::deserialize("ruleNumber",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct NetworkAclEntryListDeserializer;
impl NetworkAclEntryListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<NetworkAclEntry>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NetworkAclEntryDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct NetworkAclListDeserializer;
impl NetworkAclListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<NetworkAcl>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NetworkAclDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a network interface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterface {
    #[doc="<p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>"]
    pub association: Option<NetworkInterfaceAssociation>,
    #[doc="<p>The network interface attachment.</p>"]
    pub attachment: Option<NetworkInterfaceAttachment>,
    #[doc="<p>The Availability Zone.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>A description.</p>"]
    pub description: Option<String>,
    #[doc="<p>Any security groups for the network interface.</p>"]
    pub groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>The type of interface.</p>"]
    pub interface_type: Option<String>,
    #[doc="<p>The IPv6 addresses associated with the network interface.</p>"]
    pub ipv_6_addresses: Option<Vec<NetworkInterfaceIpv6Address>>,
    #[doc="<p>The MAC address.</p>"]
    pub mac_address: Option<String>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The AWS account ID of the owner of the network interface.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>The private DNS name.</p>"]
    pub private_dns_name: Option<String>,
    #[doc="<p>The IPv4 address of the network interface within the subnet.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>The private IPv4 addresses associated with the network interface.</p>"]
    pub private_ip_addresses: Option<Vec<NetworkInterfacePrivateIpAddress>>,
    #[doc="<p>The ID of the entity that launched the instance on your behalf (for example, AWS Management Console or Auto Scaling).</p>"]
    pub requester_id: Option<String>,
    #[doc="<p>Indicates whether the network interface is being managed by AWS.</p>"]
    pub requester_managed: Option<bool>,
    #[doc="<p>Indicates whether traffic to or from the instance is validated.</p>"]
    pub source_dest_check: Option<bool>,
    #[doc="<p>The status of the network interface.</p>"]
    pub status: Option<String>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>Any tags assigned to the network interface.</p>"]
    pub tag_set: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct NetworkInterfaceDeserializer;
impl NetworkInterfaceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkInterface, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkInterface::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "association" => {
                            obj.association = Some(try!(NetworkInterfaceAssociationDeserializer::deserialize("association", stack)));
                        }
                        "attachment" => {
                            obj.attachment = Some(try!(NetworkInterfaceAttachmentDeserializer::deserialize("attachment", stack)));
                        }
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "groupSet" => {
                            obj.groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "interfaceType" => {
                            obj.interface_type =
                                Some(try!(NetworkInterfaceTypeDeserializer::deserialize("interfaceType",
                                                                                        stack)));
                        }
                        "ipv6AddressesSet" => {
                            obj.ipv_6_addresses = Some(try!(NetworkInterfaceIpv6AddressesListDeserializer::deserialize("ipv6AddressesSet", stack)));
                        }
                        "macAddress" => {
                            obj.mac_address = Some(try!(StringDeserializer::deserialize("macAddress",
                                                                                        stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "privateDnsName" => {
                            obj.private_dns_name =
                                Some(try!(StringDeserializer::deserialize("privateDnsName",
                                                                          stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address =
                                Some(try!(StringDeserializer::deserialize("privateIpAddress",
                                                                          stack)));
                        }
                        "privateIpAddressesSet" => {
                            obj.private_ip_addresses = Some(try!(NetworkInterfacePrivateIpAddressListDeserializer::deserialize("privateIpAddressesSet", stack)));
                        }
                        "requesterId" => {
                            obj.requester_id = Some(try!(StringDeserializer::deserialize("requesterId",
                                                                                         stack)));
                        }
                        "requesterManaged" => {
                            obj.requester_managed =
                                Some(try!(BooleanDeserializer::deserialize("requesterManaged",
                                                                           stack)));
                        }
                        "sourceDestCheck" => {
                            obj.source_dest_check =
                                Some(try!(BooleanDeserializer::deserialize("sourceDestCheck",
                                                                           stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(NetworkInterfaceStatusDeserializer::deserialize("status",
                                                                                          stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        "tagSet" => {
                            obj.tag_set = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                     stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes association information for an Elastic IP address (IPv4 only).</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterfaceAssociation {
    #[doc="<p>The allocation ID.</p>"]
    pub allocation_id: Option<String>,
    #[doc="<p>The association ID.</p>"]
    pub association_id: Option<String>,
    #[doc="<p>The ID of the Elastic IP address owner.</p>"]
    pub ip_owner_id: Option<String>,
    #[doc="<p>The public DNS name.</p>"]
    pub public_dns_name: Option<String>,
    #[doc="<p>The address of the Elastic IP address bound to the network interface.</p>"]
    pub public_ip: Option<String>,
}

struct NetworkInterfaceAssociationDeserializer;
impl NetworkInterfaceAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkInterfaceAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkInterfaceAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allocationId" => {
                            obj.allocation_id = Some(try!(StringDeserializer::deserialize("allocationId",
                                                                                          stack)));
                        }
                        "associationId" => {
                            obj.association_id = Some(try!(StringDeserializer::deserialize("associationId",
                                                                                           stack)));
                        }
                        "ipOwnerId" => {
                            obj.ip_owner_id = Some(try!(StringDeserializer::deserialize("ipOwnerId",
                                                                                        stack)));
                        }
                        "publicDnsName" => {
                            obj.public_dns_name =
                                Some(try!(StringDeserializer::deserialize("publicDnsName", stack)));
                        }
                        "publicIp" => {
                            obj.public_ip = Some(try!(StringDeserializer::deserialize("publicIp",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a network interface attachment.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterfaceAttachment {
    #[doc="<p>The timestamp indicating when the attachment initiated.</p>"]
    pub attach_time: Option<String>,
    #[doc="<p>The ID of the network interface attachment.</p>"]
    pub attachment_id: Option<String>,
    #[doc="<p>Indicates whether the network interface is deleted when the instance is terminated.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>The device index of the network interface attachment on the instance.</p>"]
    pub device_index: Option<i64>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The AWS account ID of the owner of the instance.</p>"]
    pub instance_owner_id: Option<String>,
    #[doc="<p>The attachment state.</p>"]
    pub status: Option<String>,
}

struct NetworkInterfaceAttachmentDeserializer;
impl NetworkInterfaceAttachmentDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkInterfaceAttachment, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkInterfaceAttachment::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachTime" => {
                            obj.attach_time = Some(try!(DateTimeDeserializer::deserialize("attachTime",
                                                                                          stack)));
                        }
                        "attachmentId" => {
                            obj.attachment_id = Some(try!(StringDeserializer::deserialize("attachmentId",
                                                                                          stack)));
                        }
                        "deleteOnTermination" => {
                            obj.delete_on_termination =
                                Some(try!(BooleanDeserializer::deserialize("deleteOnTermination",
                                                                           stack)));
                        }
                        "deviceIndex" => {
                            obj.device_index = Some(try!(IntegerDeserializer::deserialize("deviceIndex",
                                                                                          stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "instanceOwnerId" => {
                            obj.instance_owner_id =
                                Some(try!(StringDeserializer::deserialize("instanceOwnerId",
                                                                          stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(AttachmentStatusDeserializer::deserialize("status",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an attachment change.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterfaceAttachmentChanges {
    #[doc="<p>The ID of the network interface attachment.</p>"]
    pub attachment_id: Option<String>,
    #[doc="<p>Indicates whether the network interface is deleted when the instance is terminated.</p>"]
    pub delete_on_termination: Option<bool>,
}


/// Serialize `NetworkInterfaceAttachmentChanges` contents to a `SignedRequest`.
struct NetworkInterfaceAttachmentChangesSerializer;
impl NetworkInterfaceAttachmentChangesSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &NetworkInterfaceAttachmentChanges) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.attachment_id {
            params.put(&format!("{}{}", prefix, "AttachmentId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.delete_on_termination {
            params.put(&format!("{}{}", prefix, "DeleteOnTermination"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}


/// Serialize `NetworkInterfaceIdList` contents to a `SignedRequest`.
struct NetworkInterfaceIdListSerializer;
impl NetworkInterfaceIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes an IPv6 address associated with a network interface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterfaceIpv6Address {
    #[doc="<p>The IPv6 address.</p>"]
    pub ipv_6_address: Option<String>,
}

struct NetworkInterfaceIpv6AddressDeserializer;
impl NetworkInterfaceIpv6AddressDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkInterfaceIpv6Address, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkInterfaceIpv6Address::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "ipv6Address" => {
                            obj.ipv_6_address = Some(try!(StringDeserializer::deserialize("ipv6Address",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct NetworkInterfaceIpv6AddressesListDeserializer;
impl NetworkInterfaceIpv6AddressesListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<NetworkInterfaceIpv6Address>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NetworkInterfaceIpv6AddressDeserializer::deserialize("item",
                                                                                           stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct NetworkInterfaceListDeserializer;
impl NetworkInterfaceListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<NetworkInterface>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NetworkInterfaceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a permission for a network interface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterfacePermission {
    #[doc="<p>The AWS account ID.</p>"]
    pub aws_account_id: Option<String>,
    #[doc="<p>The AWS service.</p>"]
    pub aws_service: Option<String>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The ID of the network interface permission.</p>"]
    pub network_interface_permission_id: Option<String>,
    #[doc="<p>The type of permission.</p>"]
    pub permission: Option<String>,
    #[doc="<p>Information about the state of the permission.</p>"]
    pub permission_state: Option<NetworkInterfacePermissionState>,
}

struct NetworkInterfacePermissionDeserializer;
impl NetworkInterfacePermissionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<NetworkInterfacePermission, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkInterfacePermission::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "awsAccountId" => {
                            obj.aws_account_id = Some(try!(StringDeserializer::deserialize("awsAccountId",
                                                                                           stack)));
                        }
                        "awsService" => {
                            obj.aws_service = Some(try!(StringDeserializer::deserialize("awsService",
                                                                                        stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "networkInterfacePermissionId" => {
                            obj.network_interface_permission_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfacePermissionId",
                                                                          stack)));
                        }
                        "permission" => {
                            obj.permission =
                                Some(try!(InterfacePermissionTypeDeserializer::deserialize("permission",
                                                                                           stack)));
                        }
                        "permissionState" => {
                            obj.permission_state = Some(try!(NetworkInterfacePermissionStateDeserializer::deserialize("permissionState", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `NetworkInterfacePermissionIdList` contents to a `SignedRequest`.
struct NetworkInterfacePermissionIdListSerializer;
impl NetworkInterfacePermissionIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct NetworkInterfacePermissionListDeserializer;
impl NetworkInterfacePermissionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<NetworkInterfacePermission>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NetworkInterfacePermissionDeserializer::deserialize("item",
                                                                                          stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the state of a network interface permission.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterfacePermissionState {
    #[doc="<p>The state of the permission.</p>"]
    pub state: Option<String>,
    #[doc="<p>A status message, if applicable.</p>"]
    pub status_message: Option<String>,
}

struct NetworkInterfacePermissionStateDeserializer;
impl NetworkInterfacePermissionStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<NetworkInterfacePermissionState, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkInterfacePermissionState::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "state" => {
                            obj.state = Some(try!(NetworkInterfacePermissionStateCodeDeserializer::deserialize("state", stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct NetworkInterfacePermissionStateCodeDeserializer;
impl NetworkInterfacePermissionStateCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the private IPv4 address of a network interface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct NetworkInterfacePrivateIpAddress {
    #[doc="<p>The association information for an Elastic IP address (IPv4) associated with the network interface.</p>"]
    pub association: Option<NetworkInterfaceAssociation>,
    #[doc="<p>Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.</p>"]
    pub primary: Option<bool>,
    #[doc="<p>The private DNS name.</p>"]
    pub private_dns_name: Option<String>,
    #[doc="<p>The private IPv4 address.</p>"]
    pub private_ip_address: Option<String>,
}

struct NetworkInterfacePrivateIpAddressDeserializer;
impl NetworkInterfacePrivateIpAddressDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<NetworkInterfacePrivateIpAddress, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = NetworkInterfacePrivateIpAddress::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "association" => {
                            obj.association = Some(try!(NetworkInterfaceAssociationDeserializer::deserialize("association", stack)));
                        }
                        "primary" => {
                            obj.primary = Some(try!(BooleanDeserializer::deserialize("primary",
                                                                                     stack)));
                        }
                        "privateDnsName" => {
                            obj.private_dns_name =
                                Some(try!(StringDeserializer::deserialize("privateDnsName",
                                                                          stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address =
                                Some(try!(StringDeserializer::deserialize("privateIpAddress",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct NetworkInterfacePrivateIpAddressListDeserializer;
impl NetworkInterfacePrivateIpAddressListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<NetworkInterfacePrivateIpAddress>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(NetworkInterfacePrivateIpAddressDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct NetworkInterfaceStatusDeserializer;
impl NetworkInterfaceStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct NetworkInterfaceTypeDeserializer;
impl NetworkInterfaceTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct NewDhcpConfiguration {
    pub key: Option<String>,
    pub values: Option<Vec<String>>,
}


/// Serialize `NewDhcpConfiguration` contents to a `SignedRequest`.
struct NewDhcpConfigurationSerializer;
impl NewDhcpConfigurationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &NewDhcpConfiguration) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.key {
            params.put(&format!("{}{}", prefix, "Key"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.values {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "Value"),
                                                 field_value);
        }

    }
}


/// Serialize `NewDhcpConfigurationList` contents to a `SignedRequest`.
struct NewDhcpConfigurationListSerializer;
impl NewDhcpConfigurationListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<NewDhcpConfiguration>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            NewDhcpConfigurationSerializer::serialize(params, &key, obj);
        }
    }
}

struct NextTokenDeserializer;
impl NextTokenDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `OccurrenceDayRequestSet` contents to a `SignedRequest`.
struct OccurrenceDayRequestSetSerializer;
impl OccurrenceDayRequestSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<i64>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj.to_string());
        }
    }
}

struct OccurrenceDaySetDeserializer;
impl OccurrenceDaySetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<i64>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(IntegerDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct OfferingClassTypeDeserializer;
impl OfferingClassTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct OfferingTypeValuesDeserializer;
impl OfferingTypeValuesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `OwnerStringList` contents to a `SignedRequest`.
struct OwnerStringListSerializer;
impl OwnerStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct PaymentOptionDeserializer;
impl PaymentOptionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the data that identifies an Amazon FPGA image (AFI) on the PCI bus.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PciId {
    #[doc="<p>The ID of the device.</p>"]
    pub device_id: Option<String>,
    #[doc="<p>The ID of the subsystem.</p>"]
    pub subsystem_id: Option<String>,
    #[doc="<p>The ID of the vendor for the subsystem.</p>"]
    pub subsystem_vendor_id: Option<String>,
    #[doc="<p>The ID of the vendor.</p>"]
    pub vendor_id: Option<String>,
}

struct PciIdDeserializer;
impl PciIdDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PciId, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PciId::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "DeviceId" => {
                            obj.device_id = Some(try!(StringDeserializer::deserialize("DeviceId",
                                                                                      stack)));
                        }
                        "SubsystemId" => {
                            obj.subsystem_id = Some(try!(StringDeserializer::deserialize("SubsystemId",
                                                                                         stack)));
                        }
                        "SubsystemVendorId" => {
                            obj.subsystem_vendor_id =
                                Some(try!(StringDeserializer::deserialize("SubsystemVendorId",
                                                                          stack)));
                        }
                        "VendorId" => {
                            obj.vendor_id = Some(try!(StringDeserializer::deserialize("VendorId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the VPC peering connection options.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PeeringConnectionOptions {
    #[doc="<p>If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p>"]
    pub allow_dns_resolution_from_remote_vpc: Option<bool>,
    #[doc="<p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.</p>"]
    pub allow_egress_from_local_classic_link_to_remote_vpc: Option<bool>,
    #[doc="<p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.</p>"]
    pub allow_egress_from_local_vpc_to_remote_classic_link: Option<bool>,
}

struct PeeringConnectionOptionsDeserializer;
impl PeeringConnectionOptionsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PeeringConnectionOptions, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PeeringConnectionOptions::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allowDnsResolutionFromRemoteVpc" => {
                            obj.allow_dns_resolution_from_remote_vpc =
                                Some(try!(BooleanDeserializer::deserialize("allowDnsResolutionFromRemoteVpc",
                                                                           stack)));
                        }
                        "allowEgressFromLocalClassicLinkToRemoteVpc" => {
                            obj.allow_egress_from_local_classic_link_to_remote_vpc =
                                Some(try!(BooleanDeserializer::deserialize("allowEgressFromLocalClassicLinkToRemoteVpc",
                                                                           stack)));
                        }
                        "allowEgressFromLocalVpcToRemoteClassicLink" => {
                            obj.allow_egress_from_local_vpc_to_remote_classic_link =
                                Some(try!(BooleanDeserializer::deserialize("allowEgressFromLocalVpcToRemoteClassicLink",
                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>The VPC peering connection options.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PeeringConnectionOptionsRequest {
    #[doc="<p>If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p>"]
    pub allow_dns_resolution_from_remote_vpc: Option<bool>,
    #[doc="<p>If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC via ClassicLink to instances in a peer VPC.</p>"]
    pub allow_egress_from_local_classic_link_to_remote_vpc: Option<bool>,
    #[doc="<p>If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC via ClassicLink.</p>"]
    pub allow_egress_from_local_vpc_to_remote_classic_link: Option<bool>,
}


/// Serialize `PeeringConnectionOptionsRequest` contents to a `SignedRequest`.
struct PeeringConnectionOptionsRequestSerializer;
impl PeeringConnectionOptionsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PeeringConnectionOptionsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.allow_dns_resolution_from_remote_vpc {
            params.put(&format!("{}{}", prefix, "AllowDnsResolutionFromRemoteVpc"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.allow_egress_from_local_classic_link_to_remote_vpc {
            params.put(&format!("{}{}", prefix, "AllowEgressFromLocalClassicLinkToRemoteVpc"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.allow_egress_from_local_vpc_to_remote_classic_link {
            params.put(&format!("{}{}", prefix, "AllowEgressFromLocalVpcToRemoteClassicLink"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

struct PermissionGroupDeserializer;
impl PermissionGroupDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the placement of an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Placement {
    #[doc="<p>The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the <a>ImportInstance</a> command.</p>"]
    pub affinity: Option<String>,
    #[doc="<p>The Availability Zone of the instance.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The name of the placement group the instance is in (for cluster compute instances).</p>"]
    pub group_name: Option<String>,
    #[doc="<p>The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the <a>ImportInstance</a> command.</p>"]
    pub host_id: Option<String>,
    #[doc="<p>Reserved for future use.</p>"]
    pub spread_domain: Option<String>,
    #[doc="<p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for the <a>ImportInstance</a> command.</p>"]
    pub tenancy: Option<String>,
}

struct PlacementDeserializer;
impl PlacementDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Placement, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Placement::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "affinity" => {
                            obj.affinity = Some(try!(StringDeserializer::deserialize("affinity",
                                                                                     stack)));
                        }
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "groupName" => {
                            obj.group_name = Some(try!(StringDeserializer::deserialize("groupName",
                                                                                       stack)));
                        }
                        "hostId" => {
                            obj.host_id = Some(try!(StringDeserializer::deserialize("hostId",
                                                                                    stack)));
                        }
                        "spreadDomain" => {
                            obj.spread_domain = Some(try!(StringDeserializer::deserialize("spreadDomain",
                                                                                          stack)));
                        }
                        "tenancy" => {
                            obj.tenancy = Some(try!(TenancyDeserializer::deserialize("tenancy",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `Placement` contents to a `SignedRequest`.
struct PlacementSerializer;
impl PlacementSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Placement) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.affinity {
            params.put(&format!("{}{}", prefix, "Affinity"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.host_id {
            params.put(&format!("{}{}", prefix, "HostId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.spread_domain {
            params.put(&format!("{}{}", prefix, "SpreadDomain"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.tenancy {
            params.put(&format!("{}{}", prefix, "Tenancy"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a placement group.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PlacementGroup {
    #[doc="<p>The name of the placement group.</p>"]
    pub group_name: Option<String>,
    #[doc="<p>The state of the placement group.</p>"]
    pub state: Option<String>,
    #[doc="<p>The placement strategy.</p>"]
    pub strategy: Option<String>,
}

struct PlacementGroupDeserializer;
impl PlacementGroupDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PlacementGroup, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PlacementGroup::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupName" => {
                            obj.group_name = Some(try!(StringDeserializer::deserialize("groupName",
                                                                                       stack)));
                        }
                        "state" => {
                            obj.state =
                                Some(try!(PlacementGroupStateDeserializer::deserialize("state",
                                                                                       stack)));
                        }
                        "strategy" => {
                            obj.strategy =
                                Some(try!(PlacementStrategyDeserializer::deserialize("strategy",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct PlacementGroupListDeserializer;
impl PlacementGroupListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<PlacementGroup>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(PlacementGroupDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct PlacementGroupStateDeserializer;
impl PlacementGroupStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `PlacementGroupStringList` contents to a `SignedRequest`.
struct PlacementGroupStringListSerializer;
impl PlacementGroupStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct PlacementStrategyDeserializer;
impl PlacementStrategyDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct PlatformValuesDeserializer;
impl PlatformValuesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a range of ports.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PortRange {
    #[doc="<p>The first port in the range.</p>"]
    pub from: Option<i64>,
    #[doc="<p>The last port in the range.</p>"]
    pub to: Option<i64>,
}

struct PortRangeDeserializer;
impl PortRangeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PortRange, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PortRange::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "from" => {
                            obj.from = Some(try!(IntegerDeserializer::deserialize("from", stack)));
                        }
                        "to" => {
                            obj.to = Some(try!(IntegerDeserializer::deserialize("to", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `PortRange` contents to a `SignedRequest`.
struct PortRangeSerializer;
impl PortRangeSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PortRange) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.from {
            params.put(&format!("{}{}", prefix, "From"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.to {
            params.put(&format!("{}{}", prefix, "To"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes prefixes for AWS services.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PrefixList {
    #[doc="<p>The IP address range of the AWS service.</p>"]
    pub cidrs: Option<Vec<String>>,
    #[doc="<p>The ID of the prefix.</p>"]
    pub prefix_list_id: Option<String>,
    #[doc="<p>The name of the prefix.</p>"]
    pub prefix_list_name: Option<String>,
}

struct PrefixListDeserializer;
impl PrefixListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PrefixList, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PrefixList::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "cidrSet" => {
                            obj.cidrs = Some(try!(ValueStringListDeserializer::deserialize("cidrSet",
                                                                                           stack)));
                        }
                        "prefixListId" => {
                            obj.prefix_list_id = Some(try!(StringDeserializer::deserialize("prefixListId",
                                                                                           stack)));
                        }
                        "prefixListName" => {
                            obj.prefix_list_name =
                                Some(try!(StringDeserializer::deserialize("prefixListName",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>The ID of the prefix.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PrefixListId {
    #[doc="<p>The ID of the prefix.</p>"]
    pub prefix_list_id: Option<String>,
}

struct PrefixListIdDeserializer;
impl PrefixListIdDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PrefixListId, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PrefixListId::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "prefixListId" => {
                            obj.prefix_list_id = Some(try!(StringDeserializer::deserialize("prefixListId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `PrefixListId` contents to a `SignedRequest`.
struct PrefixListIdSerializer;
impl PrefixListIdSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PrefixListId) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.prefix_list_id {
            params.put(&format!("{}{}", prefix, "PrefixListId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct PrefixListIdListDeserializer;
impl PrefixListIdListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<PrefixListId>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(PrefixListIdDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `PrefixListIdList` contents to a `SignedRequest`.
struct PrefixListIdListSerializer;
impl PrefixListIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<PrefixListId>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            PrefixListIdSerializer::serialize(params, &key, obj);
        }
    }
}

struct PrefixListIdSetDeserializer;
impl PrefixListIdSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct PrefixListSetDeserializer;
impl PrefixListSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<PrefixList>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(PrefixListDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the price for a Reserved Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PriceSchedule {
    #[doc="<p>The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.</p> <p>A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.</p>"]
    pub active: Option<bool>,
    #[doc="<p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The fixed price for the term.</p>"]
    pub price: Option<f64>,
    #[doc="<p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>"]
    pub term: Option<i64>,
}

struct PriceScheduleDeserializer;
impl PriceScheduleDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PriceSchedule, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PriceSchedule::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "active" => {
                            obj.active = Some(try!(BooleanDeserializer::deserialize("active",
                                                                                    stack)));
                        }
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "price" => {
                            obj.price = Some(try!(DoubleDeserializer::deserialize("price", stack)));
                        }
                        "term" => {
                            obj.term = Some(try!(LongDeserializer::deserialize("term", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct PriceScheduleListDeserializer;
impl PriceScheduleListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<PriceSchedule>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(PriceScheduleDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the price for a Reserved Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PriceScheduleSpecification {
    #[doc="<p>The currency for transacting the Reserved Instance resale. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The fixed price for the term.</p>"]
    pub price: Option<f64>,
    #[doc="<p>The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.</p>"]
    pub term: Option<i64>,
}


/// Serialize `PriceScheduleSpecification` contents to a `SignedRequest`.
struct PriceScheduleSpecificationSerializer;
impl PriceScheduleSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PriceScheduleSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.currency_code {
            params.put(&format!("{}{}", prefix, "CurrencyCode"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.price {
            params.put(&format!("{}{}", prefix, "Price"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.term {
            params.put(&format!("{}{}", prefix, "Term"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}


/// Serialize `PriceScheduleSpecificationList` contents to a `SignedRequest`.
struct PriceScheduleSpecificationListSerializer;
impl PriceScheduleSpecificationListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<PriceScheduleSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            PriceScheduleSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes a Reserved Instance offering.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PricingDetail {
    #[doc="<p>The number of reservations available for the price.</p>"]
    pub count: Option<i64>,
    #[doc="<p>The price per instance.</p>"]
    pub price: Option<f64>,
}

struct PricingDetailDeserializer;
impl PricingDetailDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PricingDetail, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PricingDetail::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "count" => {
                            obj.count = Some(try!(IntegerDeserializer::deserialize("count",
                                                                                   stack)));
                        }
                        "price" => {
                            obj.price = Some(try!(DoubleDeserializer::deserialize("price", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct PricingDetailsListDeserializer;
impl PricingDetailsListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<PricingDetail>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(PricingDetailDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `PrivateIpAddressConfigSet` contents to a `SignedRequest`.
struct PrivateIpAddressConfigSetSerializer;
impl PrivateIpAddressConfigSetSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &Vec<ScheduledInstancesPrivateIpAddressConfig>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            ScheduledInstancesPrivateIpAddressConfigSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes a secondary private IPv4 address for a network interface.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PrivateIpAddressSpecification {
    #[doc="<p>Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.</p>"]
    pub primary: Option<bool>,
    #[doc="<p>The private IPv4 addresses.</p>"]
    pub private_ip_address: String,
}

struct PrivateIpAddressSpecificationDeserializer;
impl PrivateIpAddressSpecificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PrivateIpAddressSpecification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PrivateIpAddressSpecification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "primary" => {
                            obj.primary = Some(try!(BooleanDeserializer::deserialize("primary",
                                                                                     stack)));
                        }
                        "privateIpAddress" => {
                            obj.private_ip_address = try!(StringDeserializer::deserialize("privateIpAddress",
                                                                                          stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `PrivateIpAddressSpecification` contents to a `SignedRequest`.
struct PrivateIpAddressSpecificationSerializer;
impl PrivateIpAddressSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PrivateIpAddressSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.primary {
            params.put(&format!("{}{}", prefix, "Primary"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                   &obj.private_ip_address.replace("+", "%2B"));

    }
}

struct PrivateIpAddressSpecificationListDeserializer;
impl PrivateIpAddressSpecificationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<PrivateIpAddressSpecification>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(PrivateIpAddressSpecificationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `PrivateIpAddressSpecificationList` contents to a `SignedRequest`.
struct PrivateIpAddressSpecificationListSerializer;
impl PrivateIpAddressSpecificationListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<PrivateIpAddressSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            PrivateIpAddressSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}


/// Serialize `PrivateIpAddressStringList` contents to a `SignedRequest`.
struct PrivateIpAddressStringListSerializer;
impl PrivateIpAddressStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes a product code.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ProductCode {
    #[doc="<p>The product code.</p>"]
    pub product_code_id: Option<String>,
    #[doc="<p>The type of product code.</p>"]
    pub product_code_type: Option<String>,
}

struct ProductCodeDeserializer;
impl ProductCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ProductCode, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ProductCode::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "productCode" => {
                            obj.product_code_id =
                                Some(try!(StringDeserializer::deserialize("productCode", stack)));
                        }
                        "type" => {
                            obj.product_code_type =
                                Some(try!(ProductCodeValuesDeserializer::deserialize("type",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ProductCodeListDeserializer;
impl ProductCodeListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ProductCode>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ProductCodeDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `ProductCodeStringList` contents to a `SignedRequest`.
struct ProductCodeStringListSerializer;
impl ProductCodeStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ProductCodeValuesDeserializer;
impl ProductCodeValuesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ProductDescriptionList` contents to a `SignedRequest`.
struct ProductDescriptionListSerializer;
impl ProductDescriptionListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes a virtual private gateway propagating route.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PropagatingVgw {
    #[doc="<p>The ID of the virtual private gateway (VGW).</p>"]
    pub gateway_id: Option<String>,
}

struct PropagatingVgwDeserializer;
impl PropagatingVgwDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PropagatingVgw, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PropagatingVgw::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "gatewayId" => {
                            obj.gateway_id = Some(try!(StringDeserializer::deserialize("gatewayId",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct PropagatingVgwListDeserializer;
impl PropagatingVgwListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<PropagatingVgw>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(PropagatingVgwDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Reserved. If you need to sustain traffic greater than the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">documented limits</a>, contact us through the <a href=\"https://console.aws.amazon.com/support/home?\">Support Center</a>.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ProvisionedBandwidth {
    #[doc="<p>Reserved. If you need to sustain traffic greater than the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">documented limits</a>, contact us through the <a href=\"https://console.aws.amazon.com/support/home?\">Support Center</a>.</p>"]
    pub provision_time: Option<String>,
    #[doc="<p>Reserved. If you need to sustain traffic greater than the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">documented limits</a>, contact us through the <a href=\"https://console.aws.amazon.com/support/home?\">Support Center</a>.</p>"]
    pub provisioned: Option<String>,
    #[doc="<p>Reserved. If you need to sustain traffic greater than the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">documented limits</a>, contact us through the <a href=\"https://console.aws.amazon.com/support/home?\">Support Center</a>.</p>"]
    pub request_time: Option<String>,
    #[doc="<p>Reserved. If you need to sustain traffic greater than the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">documented limits</a>, contact us through the <a href=\"https://console.aws.amazon.com/support/home?\">Support Center</a>.</p>"]
    pub requested: Option<String>,
    #[doc="<p>Reserved. If you need to sustain traffic greater than the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">documented limits</a>, contact us through the <a href=\"https://console.aws.amazon.com/support/home?\">Support Center</a>.</p>"]
    pub status: Option<String>,
}

struct ProvisionedBandwidthDeserializer;
impl ProvisionedBandwidthDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ProvisionedBandwidth, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ProvisionedBandwidth::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "provisionTime" => {
                            obj.provision_time =
                                Some(try!(DateTimeDeserializer::deserialize("provisionTime",
                                                                            stack)));
                        }
                        "provisioned" => {
                            obj.provisioned = Some(try!(StringDeserializer::deserialize("provisioned",
                                                                                        stack)));
                        }
                        "requestTime" => {
                            obj.request_time = Some(try!(DateTimeDeserializer::deserialize("requestTime",
                                                                                           stack)));
                        }
                        "requested" => {
                            obj.requested = Some(try!(StringDeserializer::deserialize("requested",
                                                                                      stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StringDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `PublicIpStringList` contents to a `SignedRequest`.
struct PublicIpStringListSerializer;
impl PublicIpStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes the result of the purchase.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Purchase {
    #[doc="<p>The currency in which the <code>UpfrontPrice</code> and <code>HourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The duration of the reservation's term in seconds.</p>"]
    pub duration: Option<i64>,
    #[doc="<p>The IDs of the Dedicated Hosts associated with the reservation.</p>"]
    pub host_id_set: Option<Vec<String>>,
    #[doc="<p>The ID of the reservation.</p>"]
    pub host_reservation_id: Option<String>,
    #[doc="<p>The hourly price of the reservation per hour.</p>"]
    pub hourly_price: Option<String>,
    #[doc="<p>The instance family on the Dedicated Host that the reservation can be associated with.</p>"]
    pub instance_family: Option<String>,
    #[doc="<p>The payment option for the reservation.</p>"]
    pub payment_option: Option<String>,
    #[doc="<p>The upfront price of the reservation.</p>"]
    pub upfront_price: Option<String>,
}

struct PurchaseDeserializer;
impl PurchaseDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Purchase, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Purchase::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "duration" => {
                            obj.duration = Some(try!(IntegerDeserializer::deserialize("duration",
                                                                                      stack)));
                        }
                        "hostIdSet" => {
                            obj.host_id_set =
                                Some(try!(ResponseHostIdSetDeserializer::deserialize("hostIdSet",
                                                                                     stack)));
                        }
                        "hostReservationId" => {
                            obj.host_reservation_id =
                                Some(try!(StringDeserializer::deserialize("hostReservationId",
                                                                          stack)));
                        }
                        "hourlyPrice" => {
                            obj.hourly_price = Some(try!(StringDeserializer::deserialize("hourlyPrice",
                                                                                         stack)));
                        }
                        "instanceFamily" => {
                            obj.instance_family =
                                Some(try!(StringDeserializer::deserialize("instanceFamily",
                                                                          stack)));
                        }
                        "paymentOption" => {
                            obj.payment_option =
                                Some(try!(PaymentOptionDeserializer::deserialize("paymentOption",
                                                                                 stack)));
                        }
                        "upfrontPrice" => {
                            obj.upfront_price = Some(try!(StringDeserializer::deserialize("upfrontPrice",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct PurchaseHostReservationRequest {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The currency in which the <code>totalUpfrontPrice</code>, <code>LimitPrice</code>, and <code>totalHourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The ID/s of the Dedicated Host/s that the reservation will be associated with.</p>"]
    pub host_id_set: Vec<String>,
    #[doc="<p>The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request will fail. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is <code>USD</code>. For example, to indicate a limit price of USD 100, specify 100.00.</p>"]
    pub limit_price: Option<String>,
    #[doc="<p>The ID of the offering.</p>"]
    pub offering_id: String,
}


/// Serialize `PurchaseHostReservationRequest` contents to a `SignedRequest`.
struct PurchaseHostReservationRequestSerializer;
impl PurchaseHostReservationRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PurchaseHostReservationRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.currency_code {
            params.put(&format!("{}{}", prefix, "CurrencyCode"),
                       &field_value.replace("+", "%2B"));
        }
        RequestHostIdSetSerializer::serialize(params,
                                              &format!("{}{}", prefix, "HostIdSet"),
                                              &obj.host_id_set);
        if let Some(ref field_value) = obj.limit_price {
            params.put(&format!("{}{}", prefix, "LimitPrice"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "OfferingId"),
                   &obj.offering_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct PurchaseHostReservationResult {
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> </p>"]
    pub client_token: Option<String>,
    #[doc="<p>The currency in which the <code>totalUpfrontPrice</code> and <code>totalHourlyPrice</code> amounts are specified. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>Describes the details of the purchase.</p>"]
    pub purchase: Option<Vec<Purchase>>,
    #[doc="<p>The total hourly price of the reservation calculated per hour.</p>"]
    pub total_hourly_price: Option<String>,
    #[doc="<p>The total amount that will be charged to your account when you purchase the reservation.</p>"]
    pub total_upfront_price: Option<String>,
}

struct PurchaseHostReservationResultDeserializer;
impl PurchaseHostReservationResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<PurchaseHostReservationResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PurchaseHostReservationResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "purchase" => {
                            obj.purchase = Some(try!(PurchaseSetDeserializer::deserialize("purchase",
                                                                                          stack)));
                        }
                        "totalHourlyPrice" => {
                            obj.total_hourly_price =
                                Some(try!(StringDeserializer::deserialize("totalHourlyPrice",
                                                                          stack)));
                        }
                        "totalUpfrontPrice" => {
                            obj.total_upfront_price =
                                Some(try!(StringDeserializer::deserialize("totalUpfrontPrice",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a request to purchase Scheduled Instances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PurchaseRequest {
    #[doc="<p>The number of instances.</p>"]
    pub instance_count: i64,
    #[doc="<p>The purchase token.</p>"]
    pub purchase_token: String,
}


/// Serialize `PurchaseRequest` contents to a `SignedRequest`.
struct PurchaseRequestSerializer;
impl PurchaseRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PurchaseRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "InstanceCount"),
                   &obj.instance_count.to_string().replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "PurchaseToken"),
                   &obj.purchase_token.replace("+", "%2B"));

    }
}


/// Serialize `PurchaseRequestSet` contents to a `SignedRequest`.
struct PurchaseRequestSetSerializer;
impl PurchaseRequestSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<PurchaseRequest>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            PurchaseRequestSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Contains the parameters for PurchaseReservedInstancesOffering.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PurchaseReservedInstancesOfferingRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The number of Reserved Instances to purchase.</p>"]
    pub instance_count: i64,
    #[doc="<p>Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.</p>"]
    pub limit_price: Option<ReservedInstanceLimitPrice>,
    #[doc="<p>The ID of the Reserved Instance offering to purchase.</p>"]
    pub reserved_instances_offering_id: String,
}


/// Serialize `PurchaseReservedInstancesOfferingRequest` contents to a `SignedRequest`.
struct PurchaseReservedInstancesOfferingRequestSerializer;
impl PurchaseReservedInstancesOfferingRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PurchaseReservedInstancesOfferingRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceCount"),
                   &obj.instance_count.to_string().replace("+", "%2B"));
        if let Some(ref field_value) = obj.limit_price {
            ReservedInstanceLimitPriceSerializer::serialize(params,
                                                            &format!("{}{}", prefix, "LimitPrice"),
                                                            field_value);
        }
        params.put(&format!("{}{}", prefix, "ReservedInstancesOfferingId"),
                   &obj.reserved_instances_offering_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of PurchaseReservedInstancesOffering.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PurchaseReservedInstancesOfferingResult {
    #[doc="<p>The IDs of the purchased Reserved Instances.</p>"]
    pub reserved_instances_id: Option<String>,
}

struct PurchaseReservedInstancesOfferingResultDeserializer;
impl PurchaseReservedInstancesOfferingResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<PurchaseReservedInstancesOfferingResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PurchaseReservedInstancesOfferingResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesId" => {
                            obj.reserved_instances_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for PurchaseScheduledInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PurchaseScheduledInstancesRequest {
    #[doc="<p>Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more purchase requests.</p>"]
    pub purchase_requests: Vec<PurchaseRequest>,
}


/// Serialize `PurchaseScheduledInstancesRequest` contents to a `SignedRequest`.
struct PurchaseScheduledInstancesRequestSerializer;
impl PurchaseScheduledInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &PurchaseScheduledInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        PurchaseRequestSetSerializer::serialize(params,
                                                &format!("{}{}", prefix, "PurchaseRequest"),
                                                &obj.purchase_requests);

    }
}

#[doc="<p>Contains the output of PurchaseScheduledInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct PurchaseScheduledInstancesResult {
    #[doc="<p>Information about the Scheduled Instances.</p>"]
    pub scheduled_instance_set: Option<Vec<ScheduledInstance>>,
}

struct PurchaseScheduledInstancesResultDeserializer;
impl PurchaseScheduledInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<PurchaseScheduledInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = PurchaseScheduledInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "scheduledInstanceSet" => {
                            obj.scheduled_instance_set = Some(try!(PurchasedScheduledInstanceSetDeserializer::deserialize("scheduledInstanceSet", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct PurchaseSetDeserializer;
impl PurchaseSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Purchase>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "member" {
                        obj.push(try!(PurchaseDeserializer::deserialize("member", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct PurchasedScheduledInstanceSetDeserializer;
impl PurchasedScheduledInstanceSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ScheduledInstance>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ScheduledInstanceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct RIProductDescriptionDeserializer;
impl RIProductDescriptionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ReasonCodesList` contents to a `SignedRequest`.
struct ReasonCodesListSerializer;
impl ReasonCodesListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Contains the parameters for RebootInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RebootInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more instance IDs.</p>"]
    pub instance_ids: Vec<String>,
}


/// Serialize `RebootInstancesRequest` contents to a `SignedRequest`.
struct RebootInstancesRequestSerializer;
impl RebootInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RebootInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        InstanceIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceId"),
                                                  &obj.instance_ids);

    }
}

#[doc="<p>Describes a recurring charge.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RecurringCharge {
    #[doc="<p>The amount of the recurring charge.</p>"]
    pub amount: Option<f64>,
    #[doc="<p>The frequency of the recurring charge.</p>"]
    pub frequency: Option<String>,
}

struct RecurringChargeDeserializer;
impl RecurringChargeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RecurringCharge, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RecurringCharge::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "amount" => {
                            obj.amount = Some(try!(DoubleDeserializer::deserialize("amount",
                                                                                   stack)));
                        }
                        "frequency" => {
                            obj.frequency = Some(try!(RecurringChargeFrequencyDeserializer::deserialize("frequency", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct RecurringChargeFrequencyDeserializer;
impl RecurringChargeFrequencyDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct RecurringChargesListDeserializer;
impl RecurringChargesListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<RecurringCharge>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(RecurringChargeDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a region.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Region {
    #[doc="<p>The region service endpoint.</p>"]
    pub endpoint: Option<String>,
    #[doc="<p>The name of the region.</p>"]
    pub region_name: Option<String>,
}

struct RegionDeserializer;
impl RegionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Region, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Region::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "regionEndpoint" => {
                            obj.endpoint = Some(try!(StringDeserializer::deserialize("regionEndpoint",
                                                                                     stack)));
                        }
                        "regionName" => {
                            obj.region_name = Some(try!(StringDeserializer::deserialize("regionName",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct RegionListDeserializer;
impl RegionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Region>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(RegionDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `RegionNameStringList` contents to a `SignedRequest`.
struct RegionNameStringListSerializer;
impl RegionNameStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Contains the parameters for RegisterImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RegisterImageRequest {
    #[doc="<p>The architecture of the AMI.</p> <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p>"]
    pub architecture: Option<String>,
    #[doc="<p>The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.</p>"]
    pub billing_products: Option<Vec<String>>,
    #[doc="<p>One or more block device mapping entries.</p>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>A description for your AMI.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Set to <code>true</code> to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.</p> <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>"]
    pub ena_support: Option<bool>,
    #[doc="<p>The full path to your AMI manifest in Amazon S3 storage.</p>"]
    pub image_location: Option<String>,
    #[doc="<p>The ID of the kernel.</p>"]
    pub kernel_id: Option<String>,
    #[doc="<p>A name for your AMI.</p> <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p>"]
    pub name: String,
    #[doc="<p>The ID of the RAM disk.</p>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>The name of the root device (for example, <code>/dev/sda1</code>, or <code>/dev/xvda</code>).</p>"]
    pub root_device_name: Option<String>,
    #[doc="<p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.</p> <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p> <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p>"]
    pub sriov_net_support: Option<String>,
    #[doc="<p>The type of virtualization.</p> <p>Default: <code>paravirtual</code> </p>"]
    pub virtualization_type: Option<String>,
}


/// Serialize `RegisterImageRequest` contents to a `SignedRequest`.
struct RegisterImageRequestSerializer;
impl RegisterImageRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RegisterImageRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.architecture {
            params.put(&format!("{}{}", prefix, "Architecture"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.billing_products {
            BillingProductListSerializer::serialize(params,
                                                    &format!("{}{}", prefix, "BillingProduct"),
                                                    field_value);
        }
        if let Some(ref field_value) = obj.block_device_mappings {
            BlockDeviceMappingRequestListSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "BlockDeviceMapping"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ena_support {
            params.put(&format!("{}{}", prefix, "EnaSupport"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.image_location {
            params.put(&format!("{}{}", prefix, "ImageLocation"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.kernel_id {
            params.put(&format!("{}{}", prefix, "KernelId"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "Name"),
                   &obj.name.replace("+", "%2B"));
        if let Some(ref field_value) = obj.ramdisk_id {
            params.put(&format!("{}{}", prefix, "RamdiskId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.root_device_name {
            params.put(&format!("{}{}", prefix, "RootDeviceName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.sriov_net_support {
            params.put(&format!("{}{}", prefix, "SriovNetSupport"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.virtualization_type {
            params.put(&format!("{}{}", prefix, "VirtualizationType"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of RegisterImage.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RegisterImageResult {
    #[doc="<p>The ID of the newly registered AMI.</p>"]
    pub image_id: Option<String>,
}

struct RegisterImageResultDeserializer;
impl RegisterImageResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RegisterImageResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RegisterImageResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for RejectVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RejectVpcPeeringConnectionRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the VPC peering connection.</p>"]
    pub vpc_peering_connection_id: String,
}


/// Serialize `RejectVpcPeeringConnectionRequest` contents to a `SignedRequest`.
struct RejectVpcPeeringConnectionRequestSerializer;
impl RejectVpcPeeringConnectionRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RejectVpcPeeringConnectionRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "VpcPeeringConnectionId"),
                   &obj.vpc_peering_connection_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of RejectVpcPeeringConnection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RejectVpcPeeringConnectionResult {
    #[doc="<p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>"]
    pub return_: Option<bool>,
}

struct RejectVpcPeeringConnectionResultDeserializer;
impl RejectVpcPeeringConnectionResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<RejectVpcPeeringConnectionResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RejectVpcPeeringConnectionResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "return" => {
                            obj.return_ = Some(try!(BooleanDeserializer::deserialize("return",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ReleaseAddress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReleaseAddressRequest {
    #[doc="<p>[EC2-VPC] The allocation ID. Required for EC2-VPC.</p>"]
    pub allocation_id: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>[EC2-Classic] The Elastic IP address. Required for EC2-Classic.</p>"]
    pub public_ip: Option<String>,
}


/// Serialize `ReleaseAddressRequest` contents to a `SignedRequest`.
struct ReleaseAddressRequestSerializer;
impl ReleaseAddressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReleaseAddressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.allocation_id {
            params.put(&format!("{}{}", prefix, "AllocationId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.public_ip {
            params.put(&format!("{}{}", prefix, "PublicIp"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for ReleaseHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReleaseHostsRequest {
    #[doc="<p>The IDs of the Dedicated Hosts you want to release.</p>"]
    pub host_ids: Vec<String>,
}


/// Serialize `ReleaseHostsRequest` contents to a `SignedRequest`.
struct ReleaseHostsRequestSerializer;
impl ReleaseHostsRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReleaseHostsRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        RequestHostIdListSerializer::serialize(params,
                                               &format!("{}{}", prefix, "HostId"),
                                               &obj.host_ids);

    }
}

#[doc="<p>Contains the output of ReleaseHosts.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReleaseHostsResult {
    #[doc="<p>The IDs of the Dedicated Hosts that were successfully released.</p>"]
    pub successful: Option<Vec<String>>,
    #[doc="<p>The IDs of the Dedicated Hosts that could not be released, including an error message.</p>"]
    pub unsuccessful: Option<Vec<UnsuccessfulItem>>,
}

struct ReleaseHostsResultDeserializer;
impl ReleaseHostsResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReleaseHostsResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReleaseHostsResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "successful" => {
                            obj.successful =
                                Some(try!(ResponseHostIdListDeserializer::deserialize("successful",
                                                                                      stack)));
                        }
                        "unsuccessful" => {
                            obj.unsuccessful =
                                Some(try!(UnsuccessfulItemListDeserializer::deserialize("unsuccessful",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct ReplaceIamInstanceProfileAssociationRequest {
    #[doc="<p>The ID of the existing IAM instance profile association.</p>"]
    pub association_id: String,
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: IamInstanceProfileSpecification,
}


/// Serialize `ReplaceIamInstanceProfileAssociationRequest` contents to a `SignedRequest`.
struct ReplaceIamInstanceProfileAssociationRequestSerializer;
impl ReplaceIamInstanceProfileAssociationRequestSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &ReplaceIamInstanceProfileAssociationRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AssociationId"),
                   &obj.association_id.replace("+", "%2B"));
        IamInstanceProfileSpecificationSerializer::serialize(params,
                                                             &format!("{}{}",
                                                                     prefix,
                                                                     "IamInstanceProfile"),
                                                             &obj.iam_instance_profile);

    }
}

#[derive(Default,Debug,Clone)]
pub struct ReplaceIamInstanceProfileAssociationResult {
    #[doc="<p>Information about the IAM instance profile association.</p>"]
    pub iam_instance_profile_association: Option<IamInstanceProfileAssociation>,
}

struct ReplaceIamInstanceProfileAssociationResultDeserializer;
impl ReplaceIamInstanceProfileAssociationResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<ReplaceIamInstanceProfileAssociationResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReplaceIamInstanceProfileAssociationResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "iamInstanceProfileAssociation" => {
                            obj.iam_instance_profile_association = Some(try!(IamInstanceProfileAssociationDeserializer::deserialize("iamInstanceProfileAssociation", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ReplaceNetworkAclAssociation.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReplaceNetworkAclAssociationRequest {
    #[doc="<p>The ID of the current association between the original network ACL and the subnet.</p>"]
    pub association_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the new network ACL to associate with the subnet.</p>"]
    pub network_acl_id: String,
}


/// Serialize `ReplaceNetworkAclAssociationRequest` contents to a `SignedRequest`.
struct ReplaceNetworkAclAssociationRequestSerializer;
impl ReplaceNetworkAclAssociationRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReplaceNetworkAclAssociationRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AssociationId"),
                   &obj.association_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkAclId"),
                   &obj.network_acl_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of ReplaceNetworkAclAssociation.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReplaceNetworkAclAssociationResult {
    #[doc="<p>The ID of the new association.</p>"]
    pub new_association_id: Option<String>,
}

struct ReplaceNetworkAclAssociationResultDeserializer;
impl ReplaceNetworkAclAssociationResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<ReplaceNetworkAclAssociationResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReplaceNetworkAclAssociationResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "newAssociationId" => {
                            obj.new_association_id =
                                Some(try!(StringDeserializer::deserialize("newAssociationId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ReplaceNetworkAclEntry.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReplaceNetworkAclEntryRequest {
    #[doc="<p>The IPv4 network range to allow or deny, in CIDR notation (for example <code>172.16.0.0/24</code>).</p>"]
    pub cidr_block: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Indicates whether to replace the egress rule.</p> <p>Default: If no value is specified, we replace the ingress rule.</p>"]
    pub egress: bool,
    #[doc="<p>ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.</p>"]
    pub icmp_type_code: Option<IcmpTypeCode>,
    #[doc="<p>The IPv6 network range to allow or deny, in CIDR notation (for example <code>2001:bd8:1234:1a00::/64</code>).</p>"]
    pub ipv_6_cidr_block: Option<String>,
    #[doc="<p>The ID of the ACL.</p>"]
    pub network_acl_id: String,
    #[doc="<p>TCP or UDP protocols: The range of ports the rule applies to. Required if specifying TCP (6) or UDP (17) for the protocol.</p>"]
    pub port_range: Option<PortRange>,
    #[doc="<p>The IP protocol. You can specify <code>all</code> or <code>-1</code> to mean all protocols. If you specify <code>all</code>, <code>-1</code>, or a protocol number other than <code>tcp</code>, <code>udp</code>, or <code>icmp</code>, traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol <code>58</code> (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol <code>58</code> (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.</p>"]
    pub protocol: String,
    #[doc="<p>Indicates whether to allow or deny the traffic that matches the rule.</p>"]
    pub rule_action: String,
    #[doc="<p>The rule number of the entry to replace.</p>"]
    pub rule_number: i64,
}


/// Serialize `ReplaceNetworkAclEntryRequest` contents to a `SignedRequest`.
struct ReplaceNetworkAclEntryRequestSerializer;
impl ReplaceNetworkAclEntryRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReplaceNetworkAclEntryRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_block {
            params.put(&format!("{}{}", prefix, "CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "Egress"),
                   &obj.egress.to_string().replace("+", "%2B"));
        if let Some(ref field_value) = obj.icmp_type_code {
            IcmpTypeCodeSerializer::serialize(params,
                                              &format!("{}{}", prefix, "Icmp"),
                                              field_value);
        }
        if let Some(ref field_value) = obj.ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "Ipv6CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkAclId"),
                   &obj.network_acl_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.port_range {
            PortRangeSerializer::serialize(params,
                                           &format!("{}{}", prefix, "PortRange"),
                                           field_value);
        }
        params.put(&format!("{}{}", prefix, "Protocol"),
                   &obj.protocol.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "RuleAction"),
                   &obj.rule_action.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "RuleNumber"),
                   &obj.rule_number.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for ReplaceRoute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReplaceRouteRequest {
    #[doc="<p>The IPv4 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.</p>"]
    pub destination_cidr_block: Option<String>,
    #[doc="<p>The IPv6 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.</p>"]
    pub destination_ipv_6_cidr_block: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>[IPv6 traffic only] The ID of an egress-only Internet gateway.</p>"]
    pub egress_only_internet_gateway_id: Option<String>,
    #[doc="<p>The ID of an Internet gateway or virtual private gateway.</p>"]
    pub gateway_id: Option<String>,
    #[doc="<p>The ID of a NAT instance in your VPC.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>[IPv4 traffic only] The ID of a NAT gateway.</p>"]
    pub nat_gateway_id: Option<String>,
    #[doc="<p>The ID of a network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: String,
    #[doc="<p>The ID of a VPC peering connection.</p>"]
    pub vpc_peering_connection_id: Option<String>,
}


/// Serialize `ReplaceRouteRequest` contents to a `SignedRequest`.
struct ReplaceRouteRequestSerializer;
impl ReplaceRouteRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReplaceRouteRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.destination_cidr_block {
            params.put(&format!("{}{}", prefix, "DestinationCidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.destination_ipv_6_cidr_block {
            params.put(&format!("{}{}", prefix, "DestinationIpv6CidrBlock"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.egress_only_internet_gateway_id {
            params.put(&format!("{}{}", prefix, "EgressOnlyInternetGatewayId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.gateway_id {
            params.put(&format!("{}{}", prefix, "GatewayId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_id {
            params.put(&format!("{}{}", prefix, "InstanceId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.nat_gateway_id {
            params.put(&format!("{}{}", prefix, "NatGatewayId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.network_interface_id {
            params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.vpc_peering_connection_id {
            params.put(&format!("{}{}", prefix, "VpcPeeringConnectionId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for ReplaceRouteTableAssociation.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReplaceRouteTableAssociationRequest {
    #[doc="<p>The association ID.</p>"]
    pub association_id: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the new route table to associate with the subnet.</p>"]
    pub route_table_id: String,
}


/// Serialize `ReplaceRouteTableAssociationRequest` contents to a `SignedRequest`.
struct ReplaceRouteTableAssociationRequestSerializer;
impl ReplaceRouteTableAssociationRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReplaceRouteTableAssociationRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "AssociationId"),
                   &obj.association_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "RouteTableId"),
                   &obj.route_table_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of ReplaceRouteTableAssociation.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReplaceRouteTableAssociationResult {
    #[doc="<p>The ID of the new association.</p>"]
    pub new_association_id: Option<String>,
}

struct ReplaceRouteTableAssociationResultDeserializer;
impl ReplaceRouteTableAssociationResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<ReplaceRouteTableAssociationResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReplaceRouteTableAssociationResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "newAssociationId" => {
                            obj.new_association_id =
                                Some(try!(StringDeserializer::deserialize("newAssociationId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ReportInstanceStatus.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReportInstanceStatusRequest {
    #[doc="<p>Descriptive text about the health state of your instance.</p>"]
    pub description: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The time at which the reported instance health state ended.</p>"]
    pub end_time: Option<String>,
    #[doc="<p>One or more instances.</p>"]
    pub instances: Vec<String>,
    #[doc="<p>One or more reason codes that describes the health state of your instance.</p> <ul> <li> <p> <code>instance-stuck-in-state</code>: My instance is stuck in a state.</p> </li> <li> <p> <code>unresponsive</code>: My instance is unresponsive.</p> </li> <li> <p> <code>not-accepting-credentials</code>: My instance is not accepting my credentials.</p> </li> <li> <p> <code>password-not-available</code>: A password is not available for my instance.</p> </li> <li> <p> <code>performance-network</code>: My instance is experiencing performance problems which I believe are network related.</p> </li> <li> <p> <code>performance-instance-store</code>: My instance is experiencing performance problems which I believe are related to the instance stores.</p> </li> <li> <p> <code>performance-ebs-volume</code>: My instance is experiencing performance problems which I believe are related to an EBS volume.</p> </li> <li> <p> <code>performance-other</code>: My instance is experiencing performance problems.</p> </li> <li> <p> <code>other</code>: [explain using the description parameter]</p> </li> </ul>"]
    pub reason_codes: Vec<String>,
    #[doc="<p>The time at which the reported instance health state began.</p>"]
    pub start_time: Option<String>,
    #[doc="<p>The status of all instances listed.</p>"]
    pub status: String,
}


/// Serialize `ReportInstanceStatusRequest` contents to a `SignedRequest`.
struct ReportInstanceStatusRequestSerializer;
impl ReportInstanceStatusRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReportInstanceStatusRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.end_time {
            params.put(&format!("{}{}", prefix, "EndTime"),
                       &field_value.replace("+", "%2B"));
        }
        InstanceIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceId"),
                                                  &obj.instances);
        ReasonCodesListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "ReasonCode"),
                                             &obj.reason_codes);
        if let Some(ref field_value) = obj.start_time {
            params.put(&format!("{}{}", prefix, "StartTime"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "Status"),
                   &obj.status.replace("+", "%2B"));

    }
}


/// Serialize `RequestHostIdList` contents to a `SignedRequest`.
struct RequestHostIdListSerializer;
impl RequestHostIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}


/// Serialize `RequestHostIdSet` contents to a `SignedRequest`.
struct RequestHostIdSetSerializer;
impl RequestHostIdSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Contains the parameters for RequestSpotFleet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RequestSpotFleetRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The configuration for the Spot fleet request.</p>"]
    pub spot_fleet_request_config: SpotFleetRequestConfigData,
}


/// Serialize `RequestSpotFleetRequest` contents to a `SignedRequest`.
struct RequestSpotFleetRequestSerializer;
impl RequestSpotFleetRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RequestSpotFleetRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        SpotFleetRequestConfigDataSerializer::serialize(params,
                                                        &format!("{}{}",
                                                                prefix,
                                                                "SpotFleetRequestConfig"),
                                                        &obj.spot_fleet_request_config);

    }
}

#[doc="<p>Contains the output of RequestSpotFleet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RequestSpotFleetResponse {
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
}

struct RequestSpotFleetResponseDeserializer;
impl RequestSpotFleetResponseDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RequestSpotFleetResponse, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RequestSpotFleetResponse::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "spotFleetRequestId" => {
                            obj.spot_fleet_request_id =
                                try!(StringDeserializer::deserialize("spotFleetRequestId", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for RequestSpotInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RequestSpotInstancesRequest {
    #[doc="<p>The user-specified name for a logical grouping of bids.</p> <p>When you specify an Availability Zone group in a Spot Instance request, all Spot instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to bids for Spot Instances of the same instance type. Any additional Spot instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.</p> <p>If there is no active instance running in the Availability Zone group that you specify for a new Spot instance request (all instances are terminated, the bid is expired, or the bid falls below current market), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.</p> <p>Default: Instances are launched in any available Availability Zone.</p>"]
    pub availability_zone_group: Option<String>,
    #[doc="<p>The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).</p> <p>The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.</p> <p>Note that you can't specify an Availability Zone group or a launch group if you specify a duration.</p>"]
    pub block_duration_minutes: Option<i64>,
    #[doc="<p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html\">How to Ensure Idempotency</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The maximum number of Spot instances to launch.</p> <p>Default: 1</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The instance launch group. Launch groups are Spot instances that launch together and terminate together.</p> <p>Default: Instances are launched and terminated individually</p>"]
    pub launch_group: Option<String>,
    #[doc="<p>The launch specification.</p>"]
    pub launch_specification: Option<RequestSpotLaunchSpecification>,
    #[doc="<p>The maximum hourly price (bid) for any Spot instance launched to fulfill the request.</p>"]
    pub spot_price: String,
    #[doc="<p>The Spot instance request type.</p> <p>Default: <code>one-time</code> </p>"]
    pub type_: Option<String>,
    #[doc="<p>The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.</p> <p>Default: The request is effective indefinitely.</p>"]
    pub valid_from: Option<String>,
    #[doc="<p>The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.</p> <p>Default: The request is effective indefinitely.</p>"]
    pub valid_until: Option<String>,
}


/// Serialize `RequestSpotInstancesRequest` contents to a `SignedRequest`.
struct RequestSpotInstancesRequestSerializer;
impl RequestSpotInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RequestSpotInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone_group {
            params.put(&format!("{}{}", prefix, "AvailabilityZoneGroup"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.block_duration_minutes {
            params.put(&format!("{}{}", prefix, "BlockDurationMinutes"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_count {
            params.put(&format!("{}{}", prefix, "InstanceCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.launch_group {
            params.put(&format!("{}{}", prefix, "LaunchGroup"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.launch_specification {
            RequestSpotLaunchSpecificationSerializer::serialize(params,
                                                                &format!("{}{}",
                                                                        prefix,
                                                                        "LaunchSpecification"),
                                                                field_value);
        }
        params.put(&format!("{}{}", prefix, "SpotPrice"),
                   &obj.spot_price.replace("+", "%2B"));
        if let Some(ref field_value) = obj.type_ {
            params.put(&format!("{}{}", prefix, "Type"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.valid_from {
            params.put(&format!("{}{}", prefix, "ValidFrom"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.valid_until {
            params.put(&format!("{}{}", prefix, "ValidUntil"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the output of RequestSpotInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RequestSpotInstancesResult {
    #[doc="<p>One or more Spot instance requests.</p>"]
    pub spot_instance_requests: Option<Vec<SpotInstanceRequest>>,
}

struct RequestSpotInstancesResultDeserializer;
impl RequestSpotInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RequestSpotInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RequestSpotInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "spotInstanceRequestSet" => {
                            obj.spot_instance_requests =
                                Some(try!(SpotInstanceRequestListDeserializer::deserialize("spotInstanceRequestSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the launch specification for an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RequestSpotLaunchSpecification {
    #[doc="<p>Deprecated.</p>"]
    pub addressing_type: Option<String>,
    #[doc="<p>One or more block device mapping entries.</p> <p>Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.</p>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p> <p>Default: <code>false</code> </p>"]
    pub ebs_optimized: Option<bool>,
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: Option<IamInstanceProfileSpecification>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The instance type.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The ID of the kernel.</p>"]
    pub kernel_id: Option<String>,
    #[doc="<p>The name of the key pair.</p>"]
    pub key_name: Option<String>,
    #[doc="<p>Indicates whether basic or detailed monitoring is enabled for the instance.</p> <p>Default: Disabled</p>"]
    pub monitoring: Option<RunInstancesMonitoringEnabled>,
    #[doc="<p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>"]
    pub network_interfaces: Option<Vec<InstanceNetworkInterfaceSpecification>>,
    #[doc="<p>The placement information for the instance.</p>"]
    pub placement: Option<SpotPlacement>,
    #[doc="<p>The ID of the RAM disk.</p>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>One or more security group IDs.</p>"]
    pub security_group_ids: Option<Vec<String>>,
    #[doc="<p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>"]
    pub security_groups: Option<Vec<String>>,
    #[doc="<p>The ID of the subnet in which to launch the instance.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>"]
    pub user_data: Option<String>,
}


/// Serialize `RequestSpotLaunchSpecification` contents to a `SignedRequest`.
struct RequestSpotLaunchSpecificationSerializer;
impl RequestSpotLaunchSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RequestSpotLaunchSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.addressing_type {
            params.put(&format!("{}{}", prefix, "AddressingType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.block_device_mappings {
            BlockDeviceMappingListSerializer::serialize(params,
                                                        &format!("{}{}",
                                                                prefix,
                                                                "BlockDeviceMapping"),
                                                        field_value);
        }
        if let Some(ref field_value) = obj.ebs_optimized {
            params.put(&format!("{}{}", prefix, "EbsOptimized"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.iam_instance_profile {
            IamInstanceProfileSpecificationSerializer::serialize(params,
                                                                 &format!("{}{}",
                                                                         prefix,
                                                                         "IamInstanceProfile"),
                                                                 field_value);
        }
        if let Some(ref field_value) = obj.image_id {
            params.put(&format!("{}{}", prefix, "ImageId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_type {
            params.put(&format!("{}{}", prefix, "InstanceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.kernel_id {
            params.put(&format!("{}{}", prefix, "KernelId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.key_name {
            params.put(&format!("{}{}", prefix, "KeyName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.monitoring {
            RunInstancesMonitoringEnabledSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "Monitoring"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.network_interfaces {
            InstanceNetworkInterfaceSpecificationListSerializer::serialize(params,
                                                                           &format!("{}{}",
                                                                                   prefix,
                                                                                   "NetworkInterface"),
                                                                           field_value);
        }
        if let Some(ref field_value) = obj.placement {
            SpotPlacementSerializer::serialize(params,
                                               &format!("{}{}", prefix, "Placement"),
                                               field_value);
        }
        if let Some(ref field_value) = obj.ramdisk_id {
            params.put(&format!("{}{}", prefix, "RamdiskId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.security_group_ids {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "SecurityGroupId"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.security_groups {
            ValueStringListSerializer::serialize(params,
                                                 &format!("{}{}", prefix, "SecurityGroup"),
                                                 field_value);
        }
        if let Some(ref field_value) = obj.subnet_id {
            params.put(&format!("{}{}", prefix, "SubnetId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_data {
            params.put(&format!("{}{}", prefix, "UserData"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a reservation.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Reservation {
    #[doc="<p>[EC2-Classic only] One or more security groups.</p>"]
    pub groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>One or more instances.</p>"]
    pub instances: Option<Vec<Instance>>,
    #[doc="<p>The ID of the AWS account that owns the reservation.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).</p>"]
    pub requester_id: Option<String>,
    #[doc="<p>The ID of the reservation.</p>"]
    pub reservation_id: Option<String>,
}

struct ReservationDeserializer;
impl ReservationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Reservation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Reservation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupSet" => {
                            obj.groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "instancesSet" => {
                            obj.instances =
                                Some(try!(InstanceListDeserializer::deserialize("instancesSet",
                                                                                stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "requesterId" => {
                            obj.requester_id = Some(try!(StringDeserializer::deserialize("requesterId",
                                                                                         stack)));
                        }
                        "reservationId" => {
                            obj.reservation_id = Some(try!(StringDeserializer::deserialize("reservationId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ReservationListDeserializer;
impl ReservationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Reservation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct ReservationStateDeserializer;
impl ReservationStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>The cost associated with the Reserved Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservationValue {
    #[doc="<p>The hourly rate of the reservation.</p>"]
    pub hourly_price: Option<String>,
    #[doc="<p>The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).</p>"]
    pub remaining_total_value: Option<String>,
    #[doc="<p>The remaining upfront cost of the reservation.</p>"]
    pub remaining_upfront_value: Option<String>,
}

struct ReservationValueDeserializer;
impl ReservationValueDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReservationValue, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservationValue::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "hourlyPrice" => {
                            obj.hourly_price = Some(try!(StringDeserializer::deserialize("hourlyPrice",
                                                                                         stack)));
                        }
                        "remainingTotalValue" => {
                            obj.remaining_total_value =
                                Some(try!(StringDeserializer::deserialize("remainingTotalValue",
                                                                          stack)));
                        }
                        "remainingUpfrontValue" => {
                            obj.remaining_upfront_value =
                                Some(try!(StringDeserializer::deserialize("remainingUpfrontValue",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ReservedInstanceIdSet` contents to a `SignedRequest`.
struct ReservedInstanceIdSetSerializer;
impl ReservedInstanceIdSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes the limit price of a Reserved Instance offering.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstanceLimitPrice {
    #[doc="<p>Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).</p>"]
    pub amount: Option<f64>,
    #[doc="<p>The currency in which the <code>limitPrice</code> amount is specified. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
}


/// Serialize `ReservedInstanceLimitPrice` contents to a `SignedRequest`.
struct ReservedInstanceLimitPriceSerializer;
impl ReservedInstanceLimitPriceSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReservedInstanceLimitPrice) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.amount {
            params.put(&format!("{}{}", prefix, "Amount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.currency_code {
            params.put(&format!("{}{}", prefix, "CurrencyCode"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>The total value of the Convertible Reserved Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstanceReservationValue {
    #[doc="<p>The total value of the Convertible Reserved Instance that you are exchanging.</p>"]
    pub reservation_value: Option<ReservationValue>,
    #[doc="<p>The ID of the Convertible Reserved Instance that you are exchanging.</p>"]
    pub reserved_instance_id: Option<String>,
}

struct ReservedInstanceReservationValueDeserializer;
impl ReservedInstanceReservationValueDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<ReservedInstanceReservationValue, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstanceReservationValue::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservationValue" => {
                            obj.reservation_value =
                                Some(try!(ReservationValueDeserializer::deserialize("reservationValue",
                                                                                    stack)));
                        }
                        "reservedInstanceId" => {
                            obj.reserved_instance_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstanceId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ReservedInstanceReservationValueSetDeserializer;
impl ReservedInstanceReservationValueSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<ReservedInstanceReservationValue>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservedInstanceReservationValueDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct ReservedInstanceStateDeserializer;
impl ReservedInstanceStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a Reserved Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstances {
    #[doc="<p>The Availability Zone in which the Reserved Instance can be used.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The duration of the Reserved Instance, in seconds.</p>"]
    pub duration: Option<i64>,
    #[doc="<p>The time when the Reserved Instance expires.</p>"]
    pub end: Option<String>,
    #[doc="<p>The purchase price of the Reserved Instance.</p>"]
    pub fixed_price: Option<f32>,
    #[doc="<p>The number of reservations purchased.</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The tenancy of the instance.</p>"]
    pub instance_tenancy: Option<String>,
    #[doc="<p>The instance type on which the Reserved Instance can be used.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The offering class of the Reserved Instance.</p>"]
    pub offering_class: Option<String>,
    #[doc="<p>The Reserved Instance offering type.</p>"]
    pub offering_type: Option<String>,
    #[doc="<p>The Reserved Instance product platform description.</p>"]
    pub product_description: Option<String>,
    #[doc="<p>The recurring charge tag assigned to the resource.</p>"]
    pub recurring_charges: Option<Vec<RecurringCharge>>,
    #[doc="<p>The ID of the Reserved Instance.</p>"]
    pub reserved_instances_id: Option<String>,
    #[doc="<p>The scope of the Reserved Instance.</p>"]
    pub scope: Option<String>,
    #[doc="<p>The date and time the Reserved Instance started.</p>"]
    pub start: Option<String>,
    #[doc="<p>The state of the Reserved Instance purchase.</p>"]
    pub state: Option<String>,
    #[doc="<p>Any tags assigned to the resource.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The usage price of the Reserved Instance, per hour.</p>"]
    pub usage_price: Option<f32>,
}

struct ReservedInstancesDeserializer;
impl ReservedInstancesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReservedInstances, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstances::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "duration" => {
                            obj.duration = Some(try!(LongDeserializer::deserialize("duration",
                                                                                   stack)));
                        }
                        "end" => {
                            obj.end = Some(try!(DateTimeDeserializer::deserialize("end", stack)));
                        }
                        "fixedPrice" => {
                            obj.fixed_price = Some(try!(FloatDeserializer::deserialize("fixedPrice",
                                                                                       stack)));
                        }
                        "instanceCount" => {
                            obj.instance_count =
                                Some(try!(IntegerDeserializer::deserialize("instanceCount",
                                                                           stack)));
                        }
                        "instanceTenancy" => {
                            obj.instance_tenancy =
                                Some(try!(TenancyDeserializer::deserialize("instanceTenancy",
                                                                           stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(InstanceTypeDeserializer::deserialize("instanceType",
                                                                                stack)));
                        }
                        "offeringClass" => {
                            obj.offering_class =
                                Some(try!(OfferingClassTypeDeserializer::deserialize("offeringClass",
                                                                                     stack)));
                        }
                        "offeringType" => {
                            obj.offering_type =
                                Some(try!(OfferingTypeValuesDeserializer::deserialize("offeringType",
                                                                                      stack)));
                        }
                        "productDescription" => {
                            obj.product_description =
                                Some(try!(RIProductDescriptionDeserializer::deserialize("productDescription",
                                                                                        stack)));
                        }
                        "recurringCharges" => {
                            obj.recurring_charges =
                                Some(try!(RecurringChargesListDeserializer::deserialize("recurringCharges",
                                                                                        stack)));
                        }
                        "reservedInstancesId" => {
                            obj.reserved_instances_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesId",
                                                                          stack)));
                        }
                        "scope" => {
                            obj.scope = Some(try!(ScopeDeserializer::deserialize("scope", stack)));
                        }
                        "start" => {
                            obj.start = Some(try!(DateTimeDeserializer::deserialize("start",
                                                                                    stack)));
                        }
                        "state" => {
                            obj.state =
                                Some(try!(ReservedInstanceStateDeserializer::deserialize("state",
                                                                                         stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "usagePrice" => {
                            obj.usage_price = Some(try!(FloatDeserializer::deserialize("usagePrice",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the configuration settings for the modified Reserved Instances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstancesConfiguration {
    #[doc="<p>The Availability Zone for the modified Reserved Instances.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The number of modified Reserved Instances.</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The instance type for the modified Reserved Instances.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.</p>"]
    pub platform: Option<String>,
    #[doc="<p>Whether the Reserved Instance is applied to instances in a region or instances in a specific Availability Zone.</p>"]
    pub scope: Option<String>,
}

struct ReservedInstancesConfigurationDeserializer;
impl ReservedInstancesConfigurationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReservedInstancesConfiguration, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstancesConfiguration::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "instanceCount" => {
                            obj.instance_count =
                                Some(try!(IntegerDeserializer::deserialize("instanceCount",
                                                                           stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(InstanceTypeDeserializer::deserialize("instanceType",
                                                                                stack)));
                        }
                        "platform" => {
                            obj.platform = Some(try!(StringDeserializer::deserialize("platform",
                                                                                     stack)));
                        }
                        "scope" => {
                            obj.scope = Some(try!(ScopeDeserializer::deserialize("scope", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ReservedInstancesConfiguration` contents to a `SignedRequest`.
struct ReservedInstancesConfigurationSerializer;
impl ReservedInstancesConfigurationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ReservedInstancesConfiguration) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_count {
            params.put(&format!("{}{}", prefix, "InstanceCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_type {
            params.put(&format!("{}{}", prefix, "InstanceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.platform {
            params.put(&format!("{}{}", prefix, "Platform"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.scope {
            params.put(&format!("{}{}", prefix, "Scope"),
                       &field_value.replace("+", "%2B"));
        }

    }
}


/// Serialize `ReservedInstancesConfigurationList` contents to a `SignedRequest`.
struct ReservedInstancesConfigurationListSerializer;
impl ReservedInstancesConfigurationListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<ReservedInstancesConfiguration>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            ReservedInstancesConfigurationSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes the ID of a Reserved Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstancesId {
    #[doc="<p>The ID of the Reserved Instance.</p>"]
    pub reserved_instances_id: Option<String>,
}

struct ReservedInstancesIdDeserializer;
impl ReservedInstancesIdDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReservedInstancesId, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstancesId::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesId" => {
                            obj.reserved_instances_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ReservedInstancesIdStringList` contents to a `SignedRequest`.
struct ReservedInstancesIdStringListSerializer;
impl ReservedInstancesIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ReservedInstancesListDeserializer;
impl ReservedInstancesListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ReservedInstances>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservedInstancesDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a Reserved Instance listing.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstancesListing {
    #[doc="<p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The time the listing was created.</p>"]
    pub create_date: Option<String>,
    #[doc="<p>The number of instances in this state.</p>"]
    pub instance_counts: Option<Vec<InstanceCount>>,
    #[doc="<p>The price of the Reserved Instance listing.</p>"]
    pub price_schedules: Option<Vec<PriceSchedule>>,
    #[doc="<p>The ID of the Reserved Instance.</p>"]
    pub reserved_instances_id: Option<String>,
    #[doc="<p>The ID of the Reserved Instance listing.</p>"]
    pub reserved_instances_listing_id: Option<String>,
    #[doc="<p>The status of the Reserved Instance listing.</p>"]
    pub status: Option<String>,
    #[doc="<p>The reason for the current status of the Reserved Instance listing. The response can be blank.</p>"]
    pub status_message: Option<String>,
    #[doc="<p>Any tags assigned to the resource.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The last modified timestamp of the listing.</p>"]
    pub update_date: Option<String>,
}

struct ReservedInstancesListingDeserializer;
impl ReservedInstancesListingDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReservedInstancesListing, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstancesListing::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "createDate" => {
                            obj.create_date = Some(try!(DateTimeDeserializer::deserialize("createDate",
                                                                                          stack)));
                        }
                        "instanceCounts" => {
                            obj.instance_counts =
                                Some(try!(InstanceCountListDeserializer::deserialize("instanceCounts",
                                                                                     stack)));
                        }
                        "priceSchedules" => {
                            obj.price_schedules =
                                Some(try!(PriceScheduleListDeserializer::deserialize("priceSchedules",
                                                                                     stack)));
                        }
                        "reservedInstancesId" => {
                            obj.reserved_instances_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesId",
                                                                          stack)));
                        }
                        "reservedInstancesListingId" => {
                            obj.reserved_instances_listing_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesListingId",
                                                                          stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(ListingStatusDeserializer::deserialize("status",
                                                                                          stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "updateDate" => {
                            obj.update_date = Some(try!(DateTimeDeserializer::deserialize("updateDate",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ReservedInstancesListingListDeserializer;
impl ReservedInstancesListingListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ReservedInstancesListing>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservedInstancesListingDeserializer::deserialize("item",
                                                                                        stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a Reserved Instance modification.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstancesModification {
    #[doc="<p>A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>The time when the modification request was created.</p>"]
    pub create_date: Option<String>,
    #[doc="<p>The time for the modification to become effective.</p>"]
    pub effective_date: Option<String>,
    #[doc="<p>Contains target configurations along with their corresponding new Reserved Instance IDs.</p>"]
    pub modification_results: Option<Vec<ReservedInstancesModificationResult>>,
    #[doc="<p>The IDs of one or more Reserved Instances.</p>"]
    pub reserved_instances_ids: Option<Vec<ReservedInstancesId>>,
    #[doc="<p>A unique ID for the Reserved Instance modification.</p>"]
    pub reserved_instances_modification_id: Option<String>,
    #[doc="<p>The status of the Reserved Instances modification request.</p>"]
    pub status: Option<String>,
    #[doc="<p>The reason for the status.</p>"]
    pub status_message: Option<String>,
    #[doc="<p>The time when the modification request was last updated.</p>"]
    pub update_date: Option<String>,
}

struct ReservedInstancesModificationDeserializer;
impl ReservedInstancesModificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReservedInstancesModification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstancesModification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "createDate" => {
                            obj.create_date = Some(try!(DateTimeDeserializer::deserialize("createDate",
                                                                                          stack)));
                        }
                        "effectiveDate" => {
                            obj.effective_date =
                                Some(try!(DateTimeDeserializer::deserialize("effectiveDate",
                                                                            stack)));
                        }
                        "modificationResultSet" => {
                            obj.modification_results = Some(try!(ReservedInstancesModificationResultListDeserializer::deserialize("modificationResultSet", stack)));
                        }
                        "reservedInstancesSet" => {
                            obj.reserved_instances_ids =
                                Some(try!(ReservedIntancesIdsDeserializer::deserialize("reservedInstancesSet",
                                                                                       stack)));
                        }
                        "reservedInstancesModificationId" => {
                            obj.reserved_instances_modification_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesModificationId",
                                                                          stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StringDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        "updateDate" => {
                            obj.update_date = Some(try!(DateTimeDeserializer::deserialize("updateDate",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ReservedInstancesModificationIdStringList` contents to a `SignedRequest`.
struct ReservedInstancesModificationIdStringListSerializer;
impl ReservedInstancesModificationIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ReservedInstancesModificationListDeserializer;
impl ReservedInstancesModificationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<ReservedInstancesModification>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservedInstancesModificationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the modification request/s.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstancesModificationResult {
    #[doc="<p>The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.</p>"]
    pub reserved_instances_id: Option<String>,
    #[doc="<p>The target Reserved Instances configurations supplied as part of the modification request.</p>"]
    pub target_configuration: Option<ReservedInstancesConfiguration>,
}

struct ReservedInstancesModificationResultDeserializer;
impl ReservedInstancesModificationResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<ReservedInstancesModificationResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstancesModificationResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservedInstancesId" => {
                            obj.reserved_instances_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesId",
                                                                          stack)));
                        }
                        "targetConfiguration" => {
                            obj.target_configuration = Some(try!(ReservedInstancesConfigurationDeserializer::deserialize("targetConfiguration", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ReservedInstancesModificationResultListDeserializer;
impl ReservedInstancesModificationResultListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<ReservedInstancesModificationResult>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservedInstancesModificationResultDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a Reserved Instance offering.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ReservedInstancesOffering {
    #[doc="<p>The Availability Zone in which the Reserved Instance can be used.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is <code>USD</code>.</p>"]
    pub currency_code: Option<String>,
    #[doc="<p>The duration of the Reserved Instance, in seconds.</p>"]
    pub duration: Option<i64>,
    #[doc="<p>The purchase price of the Reserved Instance.</p>"]
    pub fixed_price: Option<f32>,
    #[doc="<p>The tenancy of the instance.</p>"]
    pub instance_tenancy: Option<String>,
    #[doc="<p>The instance type on which the Reserved Instance can be used.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, this is <code>true</code>.</p>"]
    pub marketplace: Option<bool>,
    #[doc="<p>If <code>convertible</code> it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If <code>standard</code>, it is not possible to perform an exchange.</p>"]
    pub offering_class: Option<String>,
    #[doc="<p>The Reserved Instance offering type.</p>"]
    pub offering_type: Option<String>,
    #[doc="<p>The pricing details of the Reserved Instance offering.</p>"]
    pub pricing_details: Option<Vec<PricingDetail>>,
    #[doc="<p>The Reserved Instance product platform description.</p>"]
    pub product_description: Option<String>,
    #[doc="<p>The recurring charge tag assigned to the resource.</p>"]
    pub recurring_charges: Option<Vec<RecurringCharge>>,
    #[doc="<p>The ID of the Reserved Instance offering. This is the offering ID used in <a>GetReservedInstancesExchangeQuote</a> to confirm that an exchange can be made.</p>"]
    pub reserved_instances_offering_id: Option<String>,
    #[doc="<p>Whether the Reserved Instance is applied to instances in a region or an Availability Zone.</p>"]
    pub scope: Option<String>,
    #[doc="<p>The usage price of the Reserved Instance, per hour.</p>"]
    pub usage_price: Option<f32>,
}

struct ReservedInstancesOfferingDeserializer;
impl ReservedInstancesOfferingDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ReservedInstancesOffering, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ReservedInstancesOffering::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "currencyCode" => {
                            obj.currency_code =
                                Some(try!(CurrencyCodeValuesDeserializer::deserialize("currencyCode",
                                                                                      stack)));
                        }
                        "duration" => {
                            obj.duration = Some(try!(LongDeserializer::deserialize("duration",
                                                                                   stack)));
                        }
                        "fixedPrice" => {
                            obj.fixed_price = Some(try!(FloatDeserializer::deserialize("fixedPrice",
                                                                                       stack)));
                        }
                        "instanceTenancy" => {
                            obj.instance_tenancy =
                                Some(try!(TenancyDeserializer::deserialize("instanceTenancy",
                                                                           stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(InstanceTypeDeserializer::deserialize("instanceType",
                                                                                stack)));
                        }
                        "marketplace" => {
                            obj.marketplace = Some(try!(BooleanDeserializer::deserialize("marketplace",
                                                                                         stack)));
                        }
                        "offeringClass" => {
                            obj.offering_class =
                                Some(try!(OfferingClassTypeDeserializer::deserialize("offeringClass",
                                                                                     stack)));
                        }
                        "offeringType" => {
                            obj.offering_type =
                                Some(try!(OfferingTypeValuesDeserializer::deserialize("offeringType",
                                                                                      stack)));
                        }
                        "pricingDetailsSet" => {
                            obj.pricing_details =
                                Some(try!(PricingDetailsListDeserializer::deserialize("pricingDetailsSet",
                                                                                      stack)));
                        }
                        "productDescription" => {
                            obj.product_description =
                                Some(try!(RIProductDescriptionDeserializer::deserialize("productDescription",
                                                                                        stack)));
                        }
                        "recurringCharges" => {
                            obj.recurring_charges =
                                Some(try!(RecurringChargesListDeserializer::deserialize("recurringCharges",
                                                                                        stack)));
                        }
                        "reservedInstancesOfferingId" => {
                            obj.reserved_instances_offering_id =
                                Some(try!(StringDeserializer::deserialize("reservedInstancesOfferingId",
                                                                          stack)));
                        }
                        "scope" => {
                            obj.scope = Some(try!(ScopeDeserializer::deserialize("scope", stack)));
                        }
                        "usagePrice" => {
                            obj.usage_price = Some(try!(FloatDeserializer::deserialize("usagePrice",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ReservedInstancesOfferingIdStringList` contents to a `SignedRequest`.
struct ReservedInstancesOfferingIdStringListSerializer;
impl ReservedInstancesOfferingIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ReservedInstancesOfferingListDeserializer;
impl ReservedInstancesOfferingListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ReservedInstancesOffering>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservedInstancesOfferingDeserializer::deserialize("item",
                                                                                         stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct ReservedIntancesIdsDeserializer;
impl ReservedIntancesIdsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ReservedInstancesId>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ReservedInstancesIdDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for ResetImageAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ResetImageAttributeRequest {
    #[doc="<p>The attribute to reset (currently you can only reset the launch permission attribute).</p>"]
    pub attribute: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: String,
}


/// Serialize `ResetImageAttributeRequest` contents to a `SignedRequest`.
struct ResetImageAttributeRequestSerializer;
impl ResetImageAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ResetImageAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Attribute"),
                   &obj.attribute.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "ImageId"),
                   &obj.image_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for ResetInstanceAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ResetInstanceAttributeRequest {
    #[doc="<p>The attribute to reset.</p> <important> <p>You can only reset the following attributes: <code>kernel</code> | <code>ramdisk</code> | <code>sourceDestCheck</code>. To change an instance attribute, use <a>ModifyInstanceAttribute</a>.</p> </important>"]
    pub attribute: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: String,
}


/// Serialize `ResetInstanceAttributeRequest` contents to a `SignedRequest`.
struct ResetInstanceAttributeRequestSerializer;
impl ResetInstanceAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ResetInstanceAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Attribute"),
                   &obj.attribute.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "InstanceId"),
                   &obj.instance_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for ResetNetworkInterfaceAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ResetNetworkInterfaceAttributeRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
    #[doc="<p>The source/destination checking attribute. Resets the value to <code>true</code>.</p>"]
    pub source_dest_check: Option<String>,
}


/// Serialize `ResetNetworkInterfaceAttributeRequest` contents to a `SignedRequest`.
struct ResetNetworkInterfaceAttributeRequestSerializer;
impl ResetNetworkInterfaceAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ResetNetworkInterfaceAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.source_dest_check {
            params.put(&format!("{}{}", prefix, "SourceDestCheck"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for ResetSnapshotAttribute.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ResetSnapshotAttributeRequest {
    #[doc="<p>The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.</p>"]
    pub attribute: String,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The ID of the snapshot.</p>"]
    pub snapshot_id: String,
}


/// Serialize `ResetSnapshotAttributeRequest` contents to a `SignedRequest`.
struct ResetSnapshotAttributeRequestSerializer;
impl ResetSnapshotAttributeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ResetSnapshotAttributeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Attribute"),
                   &obj.attribute.replace("+", "%2B"));
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SnapshotId"),
                   &obj.snapshot_id.replace("+", "%2B"));

    }
}


/// Serialize `ResourceIdList` contents to a `SignedRequest`.
struct ResourceIdListSerializer;
impl ResourceIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ResourceTypeDeserializer;
impl ResourceTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ResponseHostIdListDeserializer;
impl ResponseHostIdListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct ResponseHostIdSetDeserializer;
impl ResponseHostIdSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `RestorableByStringList` contents to a `SignedRequest`.
struct RestorableByStringListSerializer;
impl RestorableByStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Contains the parameters for RestoreAddressToClassic.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RestoreAddressToClassicRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The Elastic IP address.</p>"]
    pub public_ip: String,
}


/// Serialize `RestoreAddressToClassicRequest` contents to a `SignedRequest`.
struct RestoreAddressToClassicRequestSerializer;
impl RestoreAddressToClassicRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RestoreAddressToClassicRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "PublicIp"),
                   &obj.public_ip.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of RestoreAddressToClassic.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RestoreAddressToClassicResult {
    #[doc="<p>The Elastic IP address.</p>"]
    pub public_ip: Option<String>,
    #[doc="<p>The move status for the IP address.</p>"]
    pub status: Option<String>,
}

struct RestoreAddressToClassicResultDeserializer;
impl RestoreAddressToClassicResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RestoreAddressToClassicResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RestoreAddressToClassicResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "publicIp" => {
                            obj.public_ip = Some(try!(StringDeserializer::deserialize("publicIp",
                                                                                      stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StatusDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for RevokeSecurityGroupEgress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RevokeSecurityGroupEgressRequest {
    #[doc="<p>The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.</p>"]
    pub cidr_ip: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.</p>"]
    pub from_port: Option<i64>,
    #[doc="<p>The ID of the security group.</p>"]
    pub group_id: String,
    #[doc="<p>A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.</p>"]
    pub ip_permissions: Option<Vec<IpPermission>>,
    #[doc="<p>The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.</p>"]
    pub ip_protocol: Option<String>,
    #[doc="<p>The name of a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.</p>"]
    pub source_security_group_name: Option<String>,
    #[doc="<p>The AWS account number for a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.</p>"]
    pub source_security_group_owner_id: Option<String>,
    #[doc="<p>The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.</p>"]
    pub to_port: Option<i64>,
}


/// Serialize `RevokeSecurityGroupEgressRequest` contents to a `SignedRequest`.
struct RevokeSecurityGroupEgressRequestSerializer;
impl RevokeSecurityGroupEgressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RevokeSecurityGroupEgressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_ip {
            params.put(&format!("{}{}", prefix, "CidrIp"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.from_port {
            params.put(&format!("{}{}", prefix, "FromPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "GroupId"),
                   &obj.group_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.ip_permissions {
            IpPermissionListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "IpPermissions"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.ip_protocol {
            params.put(&format!("{}{}", prefix, "IpProtocol"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_name {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_owner_id {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupOwnerId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.to_port {
            params.put(&format!("{}{}", prefix, "ToPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for RevokeSecurityGroupIngress.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RevokeSecurityGroupIngressRequest {
    #[doc="<p>The CIDR IP address range. You can't specify this parameter when specifying a source security group.</p>"]
    pub cidr_ip: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use <code>-1</code> to specify all ICMP types.</p>"]
    pub from_port: Option<i64>,
    #[doc="<p>The ID of the security group. Required for a security group in a nondefault VPC.</p>"]
    pub group_id: Option<String>,
    #[doc="<p>[EC2-Classic, default VPC] The name of the security group.</p>"]
    pub group_name: Option<String>,
    #[doc="<p>A set of IP permissions. You can't specify a source security group and a CIDR IP address range.</p>"]
    pub ip_permissions: Option<Vec<IpPermission>>,
    #[doc="<p>The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number (see <a href=\"http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml\">Protocol Numbers</a>). Use <code>-1</code> to specify all.</p>"]
    pub ip_protocol: Option<String>,
    #[doc="<p>[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.</p>"]
    pub source_security_group_name: Option<String>,
    #[doc="<p>[EC2-Classic] The AWS account ID of the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.</p>"]
    pub source_security_group_owner_id: Option<String>,
    #[doc="<p>The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use <code>-1</code> to specify all ICMP codes for the ICMP type.</p>"]
    pub to_port: Option<i64>,
}


/// Serialize `RevokeSecurityGroupIngressRequest` contents to a `SignedRequest`.
struct RevokeSecurityGroupIngressRequestSerializer;
impl RevokeSecurityGroupIngressRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RevokeSecurityGroupIngressRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.cidr_ip {
            params.put(&format!("{}{}", prefix, "CidrIp"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.from_port {
            params.put(&format!("{}{}", prefix, "FromPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_id {
            params.put(&format!("{}{}", prefix, "GroupId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ip_permissions {
            IpPermissionListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "IpPermissions"),
                                                  field_value);
        }
        if let Some(ref field_value) = obj.ip_protocol {
            params.put(&format!("{}{}", prefix, "IpProtocol"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_name {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.source_security_group_owner_id {
            params.put(&format!("{}{}", prefix, "SourceSecurityGroupOwnerId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.to_port {
            params.put(&format!("{}{}", prefix, "ToPort"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a route in a route table.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Route {
    #[doc="<p>The IPv4 CIDR block used for the destination match.</p>"]
    pub destination_cidr_block: Option<String>,
    #[doc="<p>The IPv6 CIDR block used for the destination match.</p>"]
    pub destination_ipv_6_cidr_block: Option<String>,
    #[doc="<p>The prefix of the AWS service.</p>"]
    pub destination_prefix_list_id: Option<String>,
    #[doc="<p>The ID of the egress-only Internet gateway.</p>"]
    pub egress_only_internet_gateway_id: Option<String>,
    #[doc="<p>The ID of a gateway attached to your VPC.</p>"]
    pub gateway_id: Option<String>,
    #[doc="<p>The ID of a NAT instance in your VPC.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The AWS account ID of the owner of the instance.</p>"]
    pub instance_owner_id: Option<String>,
    #[doc="<p>The ID of a NAT gateway.</p>"]
    pub nat_gateway_id: Option<String>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>Describes how the route was created.</p> <ul> <li> <p> <code>CreateRouteTable</code> - The route was automatically created when the route table was created.</p> </li> <li> <p> <code>CreateRoute</code> - The route was manually added to the route table.</p> </li> <li> <p> <code>EnableVgwRoutePropagation</code> - The route was propagated by route propagation.</p> </li> </ul>"]
    pub origin: Option<String>,
    #[doc="<p>The state of the route. The <code>blackhole</code> state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).</p>"]
    pub state: Option<String>,
    #[doc="<p>The ID of the VPC peering connection.</p>"]
    pub vpc_peering_connection_id: Option<String>,
}

struct RouteDeserializer;
impl RouteDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Route, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Route::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "destinationCidrBlock" => {
                            obj.destination_cidr_block =
                                Some(try!(StringDeserializer::deserialize("destinationCidrBlock",
                                                                          stack)));
                        }
                        "destinationIpv6CidrBlock" => {
                            obj.destination_ipv_6_cidr_block =
                                Some(try!(StringDeserializer::deserialize("destinationIpv6CidrBlock",
                                                                          stack)));
                        }
                        "destinationPrefixListId" => {
                            obj.destination_prefix_list_id =
                                Some(try!(StringDeserializer::deserialize("destinationPrefixListId",
                                                                          stack)));
                        }
                        "egressOnlyInternetGatewayId" => {
                            obj.egress_only_internet_gateway_id =
                                Some(try!(StringDeserializer::deserialize("egressOnlyInternetGatewayId",
                                                                          stack)));
                        }
                        "gatewayId" => {
                            obj.gateway_id = Some(try!(StringDeserializer::deserialize("gatewayId",
                                                                                       stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "instanceOwnerId" => {
                            obj.instance_owner_id =
                                Some(try!(StringDeserializer::deserialize("instanceOwnerId",
                                                                          stack)));
                        }
                        "natGatewayId" => {
                            obj.nat_gateway_id = Some(try!(StringDeserializer::deserialize("natGatewayId",
                                                                                           stack)));
                        }
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "origin" => {
                            obj.origin = Some(try!(RouteOriginDeserializer::deserialize("origin",
                                                                                        stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(RouteStateDeserializer::deserialize("state",
                                                                                      stack)));
                        }
                        "vpcPeeringConnectionId" => {
                            obj.vpc_peering_connection_id =
                                Some(try!(StringDeserializer::deserialize("vpcPeeringConnectionId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct RouteListDeserializer;
impl RouteListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Route>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(RouteDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct RouteOriginDeserializer;
impl RouteOriginDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct RouteStateDeserializer;
impl RouteStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a route table.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RouteTable {
    #[doc="<p>The associations between the route table and one or more subnets.</p>"]
    pub associations: Option<Vec<RouteTableAssociation>>,
    #[doc="<p>Any virtual private gateway (VGW) propagating routes.</p>"]
    pub propagating_vgws: Option<Vec<PropagatingVgw>>,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: Option<String>,
    #[doc="<p>The routes in the route table.</p>"]
    pub routes: Option<Vec<Route>>,
    #[doc="<p>Any tags assigned to the route table.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct RouteTableDeserializer;
impl RouteTableDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RouteTable, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RouteTable::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associationSet" => {
                            obj.associations = Some(try!(RouteTableAssociationListDeserializer::deserialize("associationSet", stack)));
                        }
                        "propagatingVgwSet" => {
                            obj.propagating_vgws =
                                Some(try!(PropagatingVgwListDeserializer::deserialize("propagatingVgwSet",
                                                                                      stack)));
                        }
                        "routeTableId" => {
                            obj.route_table_id = Some(try!(StringDeserializer::deserialize("routeTableId",
                                                                                           stack)));
                        }
                        "routeSet" => {
                            obj.routes = Some(try!(RouteListDeserializer::deserialize("routeSet",
                                                                                      stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an association between a route table and a subnet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RouteTableAssociation {
    #[doc="<p>Indicates whether this is the main route table.</p>"]
    pub main: Option<bool>,
    #[doc="<p>The ID of the association between a route table and a subnet.</p>"]
    pub route_table_association_id: Option<String>,
    #[doc="<p>The ID of the route table.</p>"]
    pub route_table_id: Option<String>,
    #[doc="<p>The ID of the subnet. A subnet ID is not returned for an implicit association.</p>"]
    pub subnet_id: Option<String>,
}

struct RouteTableAssociationDeserializer;
impl RouteTableAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RouteTableAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RouteTableAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "main" => {
                            obj.main = Some(try!(BooleanDeserializer::deserialize("main", stack)));
                        }
                        "routeTableAssociationId" => {
                            obj.route_table_association_id =
                                Some(try!(StringDeserializer::deserialize("routeTableAssociationId",
                                                                          stack)));
                        }
                        "routeTableId" => {
                            obj.route_table_id = Some(try!(StringDeserializer::deserialize("routeTableId",
                                                                                           stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct RouteTableAssociationListDeserializer;
impl RouteTableAssociationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<RouteTableAssociation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(RouteTableAssociationDeserializer::deserialize("item",
                                                                                     stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct RouteTableListDeserializer;
impl RouteTableListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<RouteTable>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(RouteTableDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct RuleActionDeserializer;
impl RuleActionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the monitoring of an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RunInstancesMonitoringEnabled {
    #[doc="<p>Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.</p>"]
    pub enabled: bool,
}

struct RunInstancesMonitoringEnabledDeserializer;
impl RunInstancesMonitoringEnabledDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RunInstancesMonitoringEnabled, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RunInstancesMonitoringEnabled::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "enabled" => {
                            obj.enabled = try!(BooleanDeserializer::deserialize("enabled", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `RunInstancesMonitoringEnabled` contents to a `SignedRequest`.
struct RunInstancesMonitoringEnabledSerializer;
impl RunInstancesMonitoringEnabledSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RunInstancesMonitoringEnabled) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Enabled"),
                   &obj.enabled.to_string().replace("+", "%2B"));

    }
}

#[doc="<p>Contains the parameters for RunInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RunInstancesRequest {
    #[doc="<p>Reserved.</p>"]
    pub additional_info: Option<String>,
    #[doc="<p>The block device mapping.</p> <important> <p>Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.</p> </important>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p> <p>Constraints: Maximum 64 ASCII characters</p>"]
    pub client_token: Option<String>,
    #[doc="<p>If you set this parameter to <code>true</code>, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to <code>false</code> after launch, use <a>ModifyInstanceAttribute</a>. Alternatively, if you set <code>InstanceInitiatedShutdownBehavior</code> to <code>terminate</code>, you can terminate the instance by running the shutdown command from the instance.</p> <p>Default: <code>false</code> </p>"]
    pub disable_api_termination: Option<bool>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p> <p>Default: <code>false</code> </p>"]
    pub ebs_optimized: Option<bool>,
    #[doc="<p>An Elastic GPU to associate with the instance.</p>"]
    pub elastic_gpu_specification: Option<Vec<ElasticGpuSpecification>>,
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: Option<IamInstanceProfileSpecification>,
    #[doc="<p>The ID of the AMI, which you can get by calling <a>DescribeImages</a>.</p>"]
    pub image_id: String,
    #[doc="<p>Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p> <p>Default: <code>stop</code> </p>"]
    pub instance_initiated_shutdown_behavior: Option<String>,
    #[doc="<p>The instance type. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html\">Instance Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>Default: <code>m1.small</code> </p>"]
    pub instance_type: Option<String>,
    #[doc="<p>[EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.</p>"]
    pub ipv_6_address_count: Option<i64>,
    #[doc="<p>[EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.</p>"]
    pub ipv_6_addresses: Option<Vec<InstanceIpv6Address>>,
    #[doc="<p>The ID of the kernel.</p> <important> <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html\"> PV-GRUB</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </important>"]
    pub kernel_id: Option<String>,
    #[doc="<p>The name of the key pair. You can create a key pair using <a>CreateKeyPair</a> or <a>ImportKeyPair</a>.</p> <important> <p>If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.</p> </important>"]
    pub key_name: Option<String>,
    #[doc="<p>The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above <code>MinCount</code>.</p> <p>Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see <a href=\"http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2\">How many instances can I run in Amazon EC2</a> in the Amazon EC2 FAQ.</p>"]
    pub max_count: i64,
    #[doc="<p>The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.</p> <p>Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see <a href=\"http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2\">How many instances can I run in Amazon EC2</a> in the Amazon EC2 General FAQ.</p>"]
    pub min_count: i64,
    #[doc="<p>The monitoring for the instance.</p>"]
    pub monitoring: Option<RunInstancesMonitoringEnabled>,
    #[doc="<p>One or more network interfaces.</p>"]
    pub network_interfaces: Option<Vec<InstanceNetworkInterfaceSpecification>>,
    #[doc="<p>The placement for the instance.</p>"]
    pub placement: Option<Placement>,
    #[doc="<p>[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.</p> <p>Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>The ID of the RAM disk.</p> <important> <p>We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html\"> PV-GRUB</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </important>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>One or more security group IDs. You can create a security group using <a>CreateSecurityGroup</a>.</p> <p>Default: Amazon EC2 uses the default security group.</p>"]
    pub security_group_ids: Option<Vec<String>>,
    #[doc="<p>[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.</p> <p>Default: Amazon EC2 uses the default security group.</p>"]
    pub security_groups: Option<Vec<String>>,
    #[doc="<p>[EC2-VPC] The ID of the subnet to launch the instance into.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.</p>"]
    pub tag_specifications: Option<Vec<TagSpecification>>,
    #[doc="<p>The user data to make available to the instance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html\">Running Commands on Your Linux Instance at Launch</a> (Linux) and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data\">Adding User Data</a> (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>"]
    pub user_data: Option<String>,
}


/// Serialize `RunInstancesRequest` contents to a `SignedRequest`.
struct RunInstancesRequestSerializer;
impl RunInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RunInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.additional_info {
            params.put(&format!("{}{}", prefix, "AdditionalInfo"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.block_device_mappings {
            BlockDeviceMappingRequestListSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "BlockDeviceMapping"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.disable_api_termination {
            params.put(&format!("{}{}", prefix, "DisableApiTermination"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ebs_optimized {
            params.put(&format!("{}{}", prefix, "EbsOptimized"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.elastic_gpu_specification {
            ElasticGpuSpecificationsSerializer::serialize(params,
                                                          &format!("{}{}",
                                                                  prefix,
                                                                  "ElasticGpuSpecification"),
                                                          field_value);
        }
        if let Some(ref field_value) = obj.iam_instance_profile {
            IamInstanceProfileSpecificationSerializer::serialize(params,
                                                                 &format!("{}{}",
                                                                         prefix,
                                                                         "IamInstanceProfile"),
                                                                 field_value);
        }
        params.put(&format!("{}{}", prefix, "ImageId"),
                   &obj.image_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.instance_initiated_shutdown_behavior {
            params.put(&format!("{}{}", prefix, "InstanceInitiatedShutdownBehavior"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_type {
            params.put(&format!("{}{}", prefix, "InstanceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ipv_6_address_count {
            params.put(&format!("{}{}", prefix, "Ipv6AddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ipv_6_addresses {
            InstanceIpv6AddressListSerializer::serialize(params,
                                                         &format!("{}{}", prefix, "Ipv6Address"),
                                                         field_value);
        }
        if let Some(ref field_value) = obj.kernel_id {
            params.put(&format!("{}{}", prefix, "KernelId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.key_name {
            params.put(&format!("{}{}", prefix, "KeyName"),
                       &field_value.replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "MaxCount"),
                   &obj.max_count.to_string().replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "MinCount"),
                   &obj.min_count.to_string().replace("+", "%2B"));
        if let Some(ref field_value) = obj.monitoring {
            RunInstancesMonitoringEnabledSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "Monitoring"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.network_interfaces {
            InstanceNetworkInterfaceSpecificationListSerializer::serialize(params,
                                                                           &format!("{}{}",
                                                                                   prefix,
                                                                                   "NetworkInterface"),
                                                                           field_value);
        }
        if let Some(ref field_value) = obj.placement {
            PlacementSerializer::serialize(params,
                                           &format!("{}{}", prefix, "Placement"),
                                           field_value);
        }
        if let Some(ref field_value) = obj.private_ip_address {
            params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ramdisk_id {
            params.put(&format!("{}{}", prefix, "RamdiskId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.security_group_ids {
            SecurityGroupIdStringListSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "SecurityGroupId"),
                                                           field_value);
        }
        if let Some(ref field_value) = obj.security_groups {
            SecurityGroupStringListSerializer::serialize(params,
                                                         &format!("{}{}", prefix, "SecurityGroup"),
                                                         field_value);
        }
        if let Some(ref field_value) = obj.subnet_id {
            params.put(&format!("{}{}", prefix, "SubnetId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.tag_specifications {
            TagSpecificationListSerializer::serialize(params,
                                                      &format!("{}{}", prefix, "TagSpecification"),
                                                      field_value);
        }
        if let Some(ref field_value) = obj.user_data {
            params.put(&format!("{}{}", prefix, "UserData"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Contains the parameters for RunScheduledInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RunScheduledInstancesRequest {
    #[doc="<p>Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>The number of instances.</p> <p>Default: 1</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.</p>"]
    pub launch_specification: ScheduledInstancesLaunchSpecification,
    #[doc="<p>The Scheduled Instance ID.</p>"]
    pub scheduled_instance_id: String,
}


/// Serialize `RunScheduledInstancesRequest` contents to a `SignedRequest`.
struct RunScheduledInstancesRequestSerializer;
impl RunScheduledInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &RunScheduledInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_count {
            params.put(&format!("{}{}", prefix, "InstanceCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        ScheduledInstancesLaunchSpecificationSerializer::serialize(params,
                                                                   &format!("{}{}",
                                                                           prefix,
                                                                           "LaunchSpecification"),
                                                                   &obj.launch_specification);
        params.put(&format!("{}{}", prefix, "ScheduledInstanceId"),
                   &obj.scheduled_instance_id.replace("+", "%2B"));

    }
}

#[doc="<p>Contains the output of RunScheduledInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct RunScheduledInstancesResult {
    #[doc="<p>The IDs of the newly launched instances.</p>"]
    pub instance_id_set: Option<Vec<String>>,
}

struct RunScheduledInstancesResultDeserializer;
impl RunScheduledInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<RunScheduledInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = RunScheduledInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceIdSet" => {
                            obj.instance_id_set =
                                Some(try!(InstanceIdSetDeserializer::deserialize("instanceIdSet",
                                                                                 stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the storage parameters for S3 and S3 buckets for an instance store-backed AMI.</p>"]
#[derive(Default,Debug,Clone)]
pub struct S3Storage {
    #[doc="<p>The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in <a href=\"http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html\">Best Practices for Managing AWS Access Keys</a>.</p>"]
    pub aws_access_key_id: Option<String>,
    #[doc="<p>The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>"]
    pub bucket: Option<String>,
    #[doc="<p>The beginning of the file name of the AMI.</p>"]
    pub prefix: Option<String>,
    #[doc="<p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.</p>"]
    pub upload_policy: Option<Vec<u8>>,
    #[doc="<p>The signature of the JSON document.</p>"]
    pub upload_policy_signature: Option<String>,
}

struct S3StorageDeserializer;
impl S3StorageDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<S3Storage, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = S3Storage::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "AWSAccessKeyId" => {
                            obj.aws_access_key_id =
                                Some(try!(StringDeserializer::deserialize("AWSAccessKeyId",
                                                                          stack)));
                        }
                        "bucket" => {
                            obj.bucket = Some(try!(StringDeserializer::deserialize("bucket",
                                                                                   stack)));
                        }
                        "prefix" => {
                            obj.prefix = Some(try!(StringDeserializer::deserialize("prefix",
                                                                                   stack)));
                        }
                        "uploadPolicy" => {
                            obj.upload_policy = Some(try!(BlobDeserializer::deserialize("uploadPolicy",
                                                                                        stack)));
                        }
                        "uploadPolicySignature" => {
                            obj.upload_policy_signature =
                                Some(try!(StringDeserializer::deserialize("uploadPolicySignature",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `S3Storage` contents to a `SignedRequest`.
struct S3StorageSerializer;
impl S3StorageSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &S3Storage) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.aws_access_key_id {
            params.put(&format!("{}{}", prefix, "AWSAccessKeyId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.bucket {
            params.put(&format!("{}{}", prefix, "Bucket"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.prefix {
            params.put(&format!("{}{}", prefix, "Prefix"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.upload_policy {
            params.put(&format!("{}{}", prefix, "UploadPolicy"),
                       ::std::str::from_utf8(&field_value)
                           .unwrap()
                           .replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.upload_policy_signature {
            params.put(&format!("{}{}", prefix, "UploadPolicySignature"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstance {
    #[doc="<p>The Availability Zone.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The date when the Scheduled Instance was purchased.</p>"]
    pub create_date: Option<String>,
    #[doc="<p>The hourly price for a single instance.</p>"]
    pub hourly_price: Option<String>,
    #[doc="<p>The number of instances.</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The instance type.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>"]
    pub network_platform: Option<String>,
    #[doc="<p>The time for the next schedule to start.</p>"]
    pub next_slot_start_time: Option<String>,
    #[doc="<p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>"]
    pub platform: Option<String>,
    #[doc="<p>The time that the previous schedule ended or will end.</p>"]
    pub previous_slot_end_time: Option<String>,
    #[doc="<p>The schedule recurrence.</p>"]
    pub recurrence: Option<ScheduledInstanceRecurrence>,
    #[doc="<p>The Scheduled Instance ID.</p>"]
    pub scheduled_instance_id: Option<String>,
    #[doc="<p>The number of hours in the schedule.</p>"]
    pub slot_duration_in_hours: Option<i64>,
    #[doc="<p>The end date for the Scheduled Instance.</p>"]
    pub term_end_date: Option<String>,
    #[doc="<p>The start date for the Scheduled Instance.</p>"]
    pub term_start_date: Option<String>,
    #[doc="<p>The total number of hours for a single instance for the entire term.</p>"]
    pub total_scheduled_instance_hours: Option<i64>,
}

struct ScheduledInstanceDeserializer;
impl ScheduledInstanceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ScheduledInstance, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ScheduledInstance::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "createDate" => {
                            obj.create_date = Some(try!(DateTimeDeserializer::deserialize("createDate",
                                                                                          stack)));
                        }
                        "hourlyPrice" => {
                            obj.hourly_price = Some(try!(StringDeserializer::deserialize("hourlyPrice",
                                                                                         stack)));
                        }
                        "instanceCount" => {
                            obj.instance_count =
                                Some(try!(IntegerDeserializer::deserialize("instanceCount",
                                                                           stack)));
                        }
                        "instanceType" => {
                            obj.instance_type = Some(try!(StringDeserializer::deserialize("instanceType",
                                                                                          stack)));
                        }
                        "networkPlatform" => {
                            obj.network_platform =
                                Some(try!(StringDeserializer::deserialize("networkPlatform",
                                                                          stack)));
                        }
                        "nextSlotStartTime" => {
                            obj.next_slot_start_time =
                                Some(try!(DateTimeDeserializer::deserialize("nextSlotStartTime",
                                                                            stack)));
                        }
                        "platform" => {
                            obj.platform = Some(try!(StringDeserializer::deserialize("platform",
                                                                                     stack)));
                        }
                        "previousSlotEndTime" => {
                            obj.previous_slot_end_time =
                                Some(try!(DateTimeDeserializer::deserialize("previousSlotEndTime",
                                                                            stack)));
                        }
                        "recurrence" => {
                            obj.recurrence = Some(try!(ScheduledInstanceRecurrenceDeserializer::deserialize("recurrence", stack)));
                        }
                        "scheduledInstanceId" => {
                            obj.scheduled_instance_id =
                                Some(try!(StringDeserializer::deserialize("scheduledInstanceId",
                                                                          stack)));
                        }
                        "slotDurationInHours" => {
                            obj.slot_duration_in_hours =
                                Some(try!(IntegerDeserializer::deserialize("slotDurationInHours",
                                                                           stack)));
                        }
                        "termEndDate" => {
                            obj.term_end_date =
                                Some(try!(DateTimeDeserializer::deserialize("termEndDate", stack)));
                        }
                        "termStartDate" => {
                            obj.term_start_date =
                                Some(try!(DateTimeDeserializer::deserialize("termStartDate",
                                                                            stack)));
                        }
                        "totalScheduledInstanceHours" => {
                            obj.total_scheduled_instance_hours =
                                Some(try!(IntegerDeserializer::deserialize("totalScheduledInstanceHours",
                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a schedule that is available for your Scheduled Instances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstanceAvailability {
    #[doc="<p>The Availability Zone.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The number of available instances.</p>"]
    pub available_instance_count: Option<i64>,
    #[doc="<p>The time period for the first schedule to start.</p>"]
    pub first_slot_start_time: Option<String>,
    #[doc="<p>The hourly price for a single instance.</p>"]
    pub hourly_price: Option<String>,
    #[doc="<p>The instance type. You can specify one of the C3, C4, M4, or R3 instance types.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The maximum term. The only possible value is 365 days.</p>"]
    pub max_term_duration_in_days: Option<i64>,
    #[doc="<p>The minimum term. The only possible value is 365 days.</p>"]
    pub min_term_duration_in_days: Option<i64>,
    #[doc="<p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>"]
    pub network_platform: Option<String>,
    #[doc="<p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>"]
    pub platform: Option<String>,
    #[doc="<p>The purchase token. This token expires in two hours.</p>"]
    pub purchase_token: Option<String>,
    #[doc="<p>The schedule recurrence.</p>"]
    pub recurrence: Option<ScheduledInstanceRecurrence>,
    #[doc="<p>The number of hours in the schedule.</p>"]
    pub slot_duration_in_hours: Option<i64>,
    #[doc="<p>The total number of hours for a single instance for the entire term.</p>"]
    pub total_scheduled_instance_hours: Option<i64>,
}

struct ScheduledInstanceAvailabilityDeserializer;
impl ScheduledInstanceAvailabilityDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ScheduledInstanceAvailability, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ScheduledInstanceAvailability::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "availableInstanceCount" => {
                            obj.available_instance_count =
                                Some(try!(IntegerDeserializer::deserialize("availableInstanceCount",
                                                                           stack)));
                        }
                        "firstSlotStartTime" => {
                            obj.first_slot_start_time =
                                Some(try!(DateTimeDeserializer::deserialize("firstSlotStartTime",
                                                                            stack)));
                        }
                        "hourlyPrice" => {
                            obj.hourly_price = Some(try!(StringDeserializer::deserialize("hourlyPrice",
                                                                                         stack)));
                        }
                        "instanceType" => {
                            obj.instance_type = Some(try!(StringDeserializer::deserialize("instanceType",
                                                                                          stack)));
                        }
                        "maxTermDurationInDays" => {
                            obj.max_term_duration_in_days =
                                Some(try!(IntegerDeserializer::deserialize("maxTermDurationInDays",
                                                                           stack)));
                        }
                        "minTermDurationInDays" => {
                            obj.min_term_duration_in_days =
                                Some(try!(IntegerDeserializer::deserialize("minTermDurationInDays",
                                                                           stack)));
                        }
                        "networkPlatform" => {
                            obj.network_platform =
                                Some(try!(StringDeserializer::deserialize("networkPlatform",
                                                                          stack)));
                        }
                        "platform" => {
                            obj.platform = Some(try!(StringDeserializer::deserialize("platform",
                                                                                     stack)));
                        }
                        "purchaseToken" => {
                            obj.purchase_token = Some(try!(StringDeserializer::deserialize("purchaseToken",
                                                                                           stack)));
                        }
                        "recurrence" => {
                            obj.recurrence = Some(try!(ScheduledInstanceRecurrenceDeserializer::deserialize("recurrence", stack)));
                        }
                        "slotDurationInHours" => {
                            obj.slot_duration_in_hours =
                                Some(try!(IntegerDeserializer::deserialize("slotDurationInHours",
                                                                           stack)));
                        }
                        "totalScheduledInstanceHours" => {
                            obj.total_scheduled_instance_hours =
                                Some(try!(IntegerDeserializer::deserialize("totalScheduledInstanceHours",
                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct ScheduledInstanceAvailabilitySetDeserializer;
impl ScheduledInstanceAvailabilitySetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<ScheduledInstanceAvailability>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ScheduledInstanceAvailabilityDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `ScheduledInstanceIdRequestSet` contents to a `SignedRequest`.
struct ScheduledInstanceIdRequestSetSerializer;
impl ScheduledInstanceIdRequestSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes the recurring schedule for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstanceRecurrence {
    #[doc="<p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>"]
    pub frequency: Option<String>,
    #[doc="<p>The interval quantity. The interval unit depends on the value of <code>frequency</code>. For example, every 2 weeks or every 2 months.</p>"]
    pub interval: Option<i64>,
    #[doc="<p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).</p>"]
    pub occurrence_day_set: Option<Vec<i64>>,
    #[doc="<p>Indicates whether the occurrence is relative to the end of the specified week or month.</p>"]
    pub occurrence_relative_to_end: Option<bool>,
    #[doc="<p>The unit for <code>occurrenceDaySet</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>).</p>"]
    pub occurrence_unit: Option<String>,
}

struct ScheduledInstanceRecurrenceDeserializer;
impl ScheduledInstanceRecurrenceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<ScheduledInstanceRecurrence, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = ScheduledInstanceRecurrence::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "frequency" => {
                            obj.frequency = Some(try!(StringDeserializer::deserialize("frequency",
                                                                                      stack)));
                        }
                        "interval" => {
                            obj.interval = Some(try!(IntegerDeserializer::deserialize("interval",
                                                                                      stack)));
                        }
                        "occurrenceDaySet" => {
                            obj.occurrence_day_set =
                                Some(try!(OccurrenceDaySetDeserializer::deserialize("occurrenceDaySet",
                                                                                    stack)));
                        }
                        "occurrenceRelativeToEnd" => {
                            obj.occurrence_relative_to_end =
                                Some(try!(BooleanDeserializer::deserialize("occurrenceRelativeToEnd",
                                                                           stack)));
                        }
                        "occurrenceUnit" => {
                            obj.occurrence_unit =
                                Some(try!(StringDeserializer::deserialize("occurrenceUnit",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the recurring schedule for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstanceRecurrenceRequest {
    #[doc="<p>The frequency (<code>Daily</code>, <code>Weekly</code>, or <code>Monthly</code>).</p>"]
    pub frequency: Option<String>,
    #[doc="<p>The interval quantity. The interval unit depends on the value of <code>Frequency</code>. For example, every 2 weeks or every 2 months.</p>"]
    pub interval: Option<i64>,
    #[doc="<p>The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.</p>"]
    pub occurrence_days: Option<Vec<i64>>,
    #[doc="<p>Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.</p>"]
    pub occurrence_relative_to_end: Option<bool>,
    #[doc="<p>The unit for <code>OccurrenceDays</code> (<code>DayOfWeek</code> or <code>DayOfMonth</code>). This value is required for a monthly schedule. You can't specify <code>DayOfWeek</code> with a weekly schedule. You can't specify this value with a daily schedule.</p>"]
    pub occurrence_unit: Option<String>,
}


/// Serialize `ScheduledInstanceRecurrenceRequest` contents to a `SignedRequest`.
struct ScheduledInstanceRecurrenceRequestSerializer;
impl ScheduledInstanceRecurrenceRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstanceRecurrenceRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.frequency {
            params.put(&format!("{}{}", prefix, "Frequency"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.interval {
            params.put(&format!("{}{}", prefix, "Interval"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.occurrence_days {
            OccurrenceDayRequestSetSerializer::serialize(params,
                                                         &format!("{}{}", prefix, "OccurrenceDay"),
                                                         field_value);
        }
        if let Some(ref field_value) = obj.occurrence_relative_to_end {
            params.put(&format!("{}{}", prefix, "OccurrenceRelativeToEnd"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.occurrence_unit {
            params.put(&format!("{}{}", prefix, "OccurrenceUnit"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct ScheduledInstanceSetDeserializer;
impl ScheduledInstanceSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<ScheduledInstance>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(ScheduledInstanceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a block device mapping for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesBlockDeviceMapping {
    #[doc="<p>The device name exposed to the instance (for example, <code>/dev/sdh</code> or <code>xvdh</code>).</p>"]
    pub device_name: Option<String>,
    #[doc="<p>Parameters used to set up EBS volumes automatically when the instance is launched.</p>"]
    pub ebs: Option<ScheduledInstancesEbs>,
    #[doc="<p>Suppresses the specified device included in the block device mapping of the AMI.</p>"]
    pub no_device: Option<String>,
    #[doc="<p>The virtual device name (<code>ephemeral</code>N). Instance store volumes are numbered starting from 0. An instance type with two available instance store volumes can specify mappings for <code>ephemeral0</code> and <code>ephemeral1</code>.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.</p> <p>Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.</p>"]
    pub virtual_name: Option<String>,
}


/// Serialize `ScheduledInstancesBlockDeviceMapping` contents to a `SignedRequest`.
struct ScheduledInstancesBlockDeviceMappingSerializer;
impl ScheduledInstancesBlockDeviceMappingSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesBlockDeviceMapping) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.device_name {
            params.put(&format!("{}{}", prefix, "DeviceName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ebs {
            ScheduledInstancesEbsSerializer::serialize(params,
                                                       &format!("{}{}", prefix, "Ebs"),
                                                       field_value);
        }
        if let Some(ref field_value) = obj.no_device {
            params.put(&format!("{}{}", prefix, "NoDevice"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.virtual_name {
            params.put(&format!("{}{}", prefix, "VirtualName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}


/// Serialize `ScheduledInstancesBlockDeviceMappingSet` contents to a `SignedRequest`.
struct ScheduledInstancesBlockDeviceMappingSetSerializer;
impl ScheduledInstancesBlockDeviceMappingSetSerializer {
    fn serialize(params: &mut Params,
                 name: &str,
                 obj: &Vec<ScheduledInstancesBlockDeviceMapping>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            ScheduledInstancesBlockDeviceMappingSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes an EBS volume for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesEbs {
    #[doc="<p>Indicates whether the volume is deleted on instance termination.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.</p>"]
    pub encrypted: Option<bool>,
    #[doc="<p>The number of I/O operations per second (IOPS) that the volume supports. For io1 volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about <code>gp2</code> baseline performance, I/O credits, and bursting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html\">Amazon EBS Volume Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>Constraint: Range is 100-20000 IOPS for <code>io1</code> volumes and 100-10000 IOPS for <code>gp2</code> volumes.</p> <p>Condition: This parameter is required for requests to create <code>io1</code>volumes; it is not used in requests to create <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>"]
    pub iops: Option<i64>,
    #[doc="<p>The ID of the snapshot.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>The size of the volume, in GiB.</p> <p>Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.</p>"]
    pub volume_size: Option<i64>,
    #[doc="<p>The volume type. <code>gp2</code> for General Purpose SSD, <code>io1</code> for Provisioned IOPS SSD, Throughput Optimized HDD for <code>st1</code>, Cold HDD for <code>sc1</code>, or <code>standard</code> for Magnetic.</p> <p>Default: <code>standard</code> </p>"]
    pub volume_type: Option<String>,
}


/// Serialize `ScheduledInstancesEbs` contents to a `SignedRequest`.
struct ScheduledInstancesEbsSerializer;
impl ScheduledInstancesEbsSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesEbs) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.delete_on_termination {
            params.put(&format!("{}{}", prefix, "DeleteOnTermination"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.encrypted {
            params.put(&format!("{}{}", prefix, "Encrypted"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.iops {
            params.put(&format!("{}{}", prefix, "Iops"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.snapshot_id {
            params.put(&format!("{}{}", prefix, "SnapshotId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_size {
            params.put(&format!("{}{}", prefix, "VolumeSize"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.volume_type {
            params.put(&format!("{}{}", prefix, "VolumeType"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes an IAM instance profile for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesIamInstanceProfile {
    #[doc="<p>The Amazon Resource Name (ARN).</p>"]
    pub arn: Option<String>,
    #[doc="<p>The name.</p>"]
    pub name: Option<String>,
}


/// Serialize `ScheduledInstancesIamInstanceProfile` contents to a `SignedRequest`.
struct ScheduledInstancesIamInstanceProfileSerializer;
impl ScheduledInstancesIamInstanceProfileSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesIamInstanceProfile) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.arn {
            params.put(&format!("{}{}", prefix, "Arn"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.name {
            params.put(&format!("{}{}", prefix, "Name"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes an IPv6 address.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesIpv6Address {
    #[doc="<p>The IPv6 address.</p>"]
    pub ipv_6_address: Option<String>,
}


/// Serialize `ScheduledInstancesIpv6Address` contents to a `SignedRequest`.
struct ScheduledInstancesIpv6AddressSerializer;
impl ScheduledInstancesIpv6AddressSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesIpv6Address) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.ipv_6_address {
            params.put(&format!("{}{}", prefix, "Ipv6Address"),
                       &field_value.replace("+", "%2B"));
        }

    }
}


/// Serialize `ScheduledInstancesIpv6AddressList` contents to a `SignedRequest`.
struct ScheduledInstancesIpv6AddressListSerializer;
impl ScheduledInstancesIpv6AddressListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<ScheduledInstancesIpv6Address>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            ScheduledInstancesIpv6AddressSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes the launch specification for a Scheduled Instance.</p> <p>If you are launching the Scheduled Instance in EC2-VPC, you must specify the ID of the subnet. You can specify the subnet using either <code>SubnetId</code> or <code>NetworkInterface</code>.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesLaunchSpecification {
    #[doc="<p>One or more block device mapping entries.</p>"]
    pub block_device_mappings: Option<Vec<ScheduledInstancesBlockDeviceMapping>>,
    #[doc="<p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.</p> <p>Default: <code>false</code> </p>"]
    pub ebs_optimized: Option<bool>,
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: Option<ScheduledInstancesIamInstanceProfile>,
    #[doc="<p>The ID of the Amazon Machine Image (AMI).</p>"]
    pub image_id: String,
    #[doc="<p>The instance type.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The ID of the kernel.</p>"]
    pub kernel_id: Option<String>,
    #[doc="<p>The name of the key pair.</p>"]
    pub key_name: Option<String>,
    #[doc="<p>Enable or disable monitoring for the instances.</p>"]
    pub monitoring: Option<ScheduledInstancesMonitoring>,
    #[doc="<p>One or more network interfaces.</p>"]
    pub network_interfaces: Option<Vec<ScheduledInstancesNetworkInterface>>,
    #[doc="<p>The placement information.</p>"]
    pub placement: Option<ScheduledInstancesPlacement>,
    #[doc="<p>The ID of the RAM disk.</p>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>The IDs of one or more security groups.</p>"]
    pub security_group_ids: Option<Vec<String>>,
    #[doc="<p>The ID of the subnet in which to launch the instances.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The base64-encoded MIME user data.</p>"]
    pub user_data: Option<String>,
}


/// Serialize `ScheduledInstancesLaunchSpecification` contents to a `SignedRequest`.
struct ScheduledInstancesLaunchSpecificationSerializer;
impl ScheduledInstancesLaunchSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesLaunchSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.block_device_mappings {
            ScheduledInstancesBlockDeviceMappingSetSerializer::serialize(params,
                                                                         &format!("{}{}",
                                                                                 prefix,
                                                                                 "BlockDeviceMapping"),
                                                                         field_value);
        }
        if let Some(ref field_value) = obj.ebs_optimized {
            params.put(&format!("{}{}", prefix, "EbsOptimized"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.iam_instance_profile {
            ScheduledInstancesIamInstanceProfileSerializer::serialize(params,
                                                                      &format!("{}{}",
                                                                              prefix,
                                                                              "IamInstanceProfile"),
                                                                      field_value);
        }
        params.put(&format!("{}{}", prefix, "ImageId"),
                   &obj.image_id.replace("+", "%2B"));
        if let Some(ref field_value) = obj.instance_type {
            params.put(&format!("{}{}", prefix, "InstanceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.kernel_id {
            params.put(&format!("{}{}", prefix, "KernelId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.key_name {
            params.put(&format!("{}{}", prefix, "KeyName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.monitoring {
            ScheduledInstancesMonitoringSerializer::serialize(params,
                                                              &format!("{}{}",
                                                                      prefix,
                                                                      "Monitoring"),
                                                              field_value);
        }
        if let Some(ref field_value) = obj.network_interfaces {
            ScheduledInstancesNetworkInterfaceSetSerializer::serialize(params,
                                                                       &format!("{}{}",
                                                                               prefix,
                                                                               "NetworkInterface"),
                                                                       field_value);
        }
        if let Some(ref field_value) = obj.placement {
            ScheduledInstancesPlacementSerializer::serialize(params,
                                                             &format!("{}{}", prefix, "Placement"),
                                                             field_value);
        }
        if let Some(ref field_value) = obj.ramdisk_id {
            params.put(&format!("{}{}", prefix, "RamdiskId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.security_group_ids {
            ScheduledInstancesSecurityGroupIdSetSerializer::serialize(params,
                                                                      &format!("{}{}",
                                                                              prefix,
                                                                              "SecurityGroupId"),
                                                                      field_value);
        }
        if let Some(ref field_value) = obj.subnet_id {
            params.put(&format!("{}{}", prefix, "SubnetId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_data {
            params.put(&format!("{}{}", prefix, "UserData"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes whether monitoring is enabled for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesMonitoring {
    #[doc="<p>Indicates whether monitoring is enabled.</p>"]
    pub enabled: Option<bool>,
}


/// Serialize `ScheduledInstancesMonitoring` contents to a `SignedRequest`.
struct ScheduledInstancesMonitoringSerializer;
impl ScheduledInstancesMonitoringSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesMonitoring) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.enabled {
            params.put(&format!("{}{}", prefix, "Enabled"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a network interface for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesNetworkInterface {
    #[doc="<p>Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is <code>true</code>.</p>"]
    pub associate_public_ip_address: Option<bool>,
    #[doc="<p>Indicates whether to delete the interface when the instance is terminated.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>The description.</p>"]
    pub description: Option<String>,
    #[doc="<p>The index of the device for the network interface attachment.</p>"]
    pub device_index: Option<i64>,
    #[doc="<p>The IDs of one or more security groups.</p>"]
    pub groups: Option<Vec<String>>,
    #[doc="<p>The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.</p>"]
    pub ipv_6_address_count: Option<i64>,
    #[doc="<p>One or more specific IPv6 addresses from the subnet range.</p>"]
    pub ipv_6_addresses: Option<Vec<ScheduledInstancesIpv6Address>>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The IPv4 address of the network interface within the subnet.</p>"]
    pub private_ip_address: Option<String>,
    #[doc="<p>The private IPv4 addresses.</p>"]
    pub private_ip_address_configs: Option<Vec<ScheduledInstancesPrivateIpAddressConfig>>,
    #[doc="<p>The number of secondary private IPv4 addresses.</p>"]
    pub secondary_private_ip_address_count: Option<i64>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: Option<String>,
}


/// Serialize `ScheduledInstancesNetworkInterface` contents to a `SignedRequest`.
struct ScheduledInstancesNetworkInterfaceSerializer;
impl ScheduledInstancesNetworkInterfaceSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesNetworkInterface) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.associate_public_ip_address {
            params.put(&format!("{}{}", prefix, "AssociatePublicIpAddress"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.delete_on_termination {
            params.put(&format!("{}{}", prefix, "DeleteOnTermination"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.device_index {
            params.put(&format!("{}{}", prefix, "DeviceIndex"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.groups {
            ScheduledInstancesSecurityGroupIdSetSerializer::serialize(params,
                                                                      &format!("{}{}",
                                                                              prefix,
                                                                              "Group"),
                                                                      field_value);
        }
        if let Some(ref field_value) = obj.ipv_6_address_count {
            params.put(&format!("{}{}", prefix, "Ipv6AddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.ipv_6_addresses {
            ScheduledInstancesIpv6AddressListSerializer::serialize(params,
                                                                   &format!("{}{}",
                                                                           prefix,
                                                                           "Ipv6Address"),
                                                                   field_value);
        }
        if let Some(ref field_value) = obj.network_interface_id {
            params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.private_ip_address {
            params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.private_ip_address_configs {
            PrivateIpAddressConfigSetSerializer::serialize(params,
                                                           &format!("{}{}",
                                                                   prefix,
                                                                   "PrivateIpAddressConfig"),
                                                           field_value);
        }
        if let Some(ref field_value) = obj.secondary_private_ip_address_count {
            params.put(&format!("{}{}", prefix, "SecondaryPrivateIpAddressCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.subnet_id {
            params.put(&format!("{}{}", prefix, "SubnetId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}


/// Serialize `ScheduledInstancesNetworkInterfaceSet` contents to a `SignedRequest`.
struct ScheduledInstancesNetworkInterfaceSetSerializer;
impl ScheduledInstancesNetworkInterfaceSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<ScheduledInstancesNetworkInterface>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            ScheduledInstancesNetworkInterfaceSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes the placement for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesPlacement {
    #[doc="<p>The Availability Zone.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The name of the placement group.</p>"]
    pub group_name: Option<String>,
}


/// Serialize `ScheduledInstancesPlacement` contents to a `SignedRequest`.
struct ScheduledInstancesPlacementSerializer;
impl ScheduledInstancesPlacementSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesPlacement) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a private IPv4 address for a Scheduled Instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct ScheduledInstancesPrivateIpAddressConfig {
    #[doc="<p>Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.</p>"]
    pub primary: Option<bool>,
    #[doc="<p>The IPv4 address.</p>"]
    pub private_ip_address: Option<String>,
}


/// Serialize `ScheduledInstancesPrivateIpAddressConfig` contents to a `SignedRequest`.
struct ScheduledInstancesPrivateIpAddressConfigSerializer;
impl ScheduledInstancesPrivateIpAddressConfigSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &ScheduledInstancesPrivateIpAddressConfig) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.primary {
            params.put(&format!("{}{}", prefix, "Primary"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.private_ip_address {
            params.put(&format!("{}{}", prefix, "PrivateIpAddress"),
                       &field_value.replace("+", "%2B"));
        }

    }
}


/// Serialize `ScheduledInstancesSecurityGroupIdSet` contents to a `SignedRequest`.
struct ScheduledInstancesSecurityGroupIdSetSerializer;
impl ScheduledInstancesSecurityGroupIdSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ScopeDeserializer;
impl ScopeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a security group</p>"]
#[derive(Default,Debug,Clone)]
pub struct SecurityGroup {
    #[doc="<p>A description of the security group.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of the security group.</p>"]
    pub group_id: Option<String>,
    #[doc="<p>The name of the security group.</p>"]
    pub group_name: Option<String>,
    #[doc="<p>One or more inbound rules associated with the security group.</p>"]
    pub ip_permissions: Option<Vec<IpPermission>>,
    #[doc="<p>[EC2-VPC] One or more outbound rules associated with the security group.</p>"]
    pub ip_permissions_egress: Option<Vec<IpPermission>>,
    #[doc="<p>The AWS account ID of the owner of the security group.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>Any tags assigned to the security group.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>[EC2-VPC] The ID of the VPC for the security group.</p>"]
    pub vpc_id: Option<String>,
}

struct SecurityGroupDeserializer;
impl SecurityGroupDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SecurityGroup, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SecurityGroup::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupDescription" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("groupDescription",
                                                                                        stack)));
                        }
                        "groupId" => {
                            obj.group_id = Some(try!(StringDeserializer::deserialize("groupId",
                                                                                     stack)));
                        }
                        "groupName" => {
                            obj.group_name = Some(try!(StringDeserializer::deserialize("groupName",
                                                                                       stack)));
                        }
                        "ipPermissions" => {
                            obj.ip_permissions =
                                Some(try!(IpPermissionListDeserializer::deserialize("ipPermissions",
                                                                                    stack)));
                        }
                        "ipPermissionsEgress" => {
                            obj.ip_permissions_egress =
                                Some(try!(IpPermissionListDeserializer::deserialize("ipPermissionsEgress",
                                                                                    stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SecurityGroupIdStringListDeserializer;
impl SecurityGroupIdStringListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "SecurityGroupId" {
                        obj.push(try!(StringDeserializer::deserialize("SecurityGroupId", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `SecurityGroupIdStringList` contents to a `SignedRequest`.
struct SecurityGroupIdStringListSerializer;
impl SecurityGroupIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct SecurityGroupListDeserializer;
impl SecurityGroupListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<SecurityGroup>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SecurityGroupDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a VPC with a security group that references your security group.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SecurityGroupReference {
    #[doc="<p>The ID of your security group.</p>"]
    pub group_id: String,
    #[doc="<p>The ID of the VPC with the referencing security group.</p>"]
    pub referencing_vpc_id: String,
    #[doc="<p>The ID of the VPC peering connection.</p>"]
    pub vpc_peering_connection_id: Option<String>,
}

struct SecurityGroupReferenceDeserializer;
impl SecurityGroupReferenceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SecurityGroupReference, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SecurityGroupReference::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupId" => {
                            obj.group_id = try!(StringDeserializer::deserialize("groupId", stack));
                        }
                        "referencingVpcId" => {
                            obj.referencing_vpc_id = try!(StringDeserializer::deserialize("referencingVpcId",
                                                                                          stack));
                        }
                        "vpcPeeringConnectionId" => {
                            obj.vpc_peering_connection_id =
                                Some(try!(StringDeserializer::deserialize("vpcPeeringConnectionId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SecurityGroupReferencesDeserializer;
impl SecurityGroupReferencesDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<SecurityGroupReference>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SecurityGroupReferenceDeserializer::deserialize("item",
                                                                                      stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `SecurityGroupStringList` contents to a `SignedRequest`.
struct SecurityGroupStringListSerializer;
impl SecurityGroupStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes the time period for a Scheduled Instance to start its first schedule. The time period must span less than one day.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SlotDateTimeRangeRequest {
    #[doc="<p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>"]
    pub earliest_time: String,
    #[doc="<p>The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.</p>"]
    pub latest_time: String,
}


/// Serialize `SlotDateTimeRangeRequest` contents to a `SignedRequest`.
struct SlotDateTimeRangeRequestSerializer;
impl SlotDateTimeRangeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SlotDateTimeRangeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "EarliestTime"),
                   &obj.earliest_time.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "LatestTime"),
                   &obj.latest_time.replace("+", "%2B"));

    }
}

#[doc="<p>Describes the time period for a Scheduled Instance to start its first schedule.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SlotStartTimeRangeRequest {
    #[doc="<p>The earliest date and time, in UTC, for the Scheduled Instance to start.</p>"]
    pub earliest_time: Option<String>,
    #[doc="<p>The latest date and time, in UTC, for the Scheduled Instance to start.</p>"]
    pub latest_time: Option<String>,
}


/// Serialize `SlotStartTimeRangeRequest` contents to a `SignedRequest`.
struct SlotStartTimeRangeRequestSerializer;
impl SlotStartTimeRangeRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SlotStartTimeRangeRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.earliest_time {
            params.put(&format!("{}{}", prefix, "EarliestTime"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.latest_time {
            params.put(&format!("{}{}", prefix, "LatestTime"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a snapshot.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Snapshot {
    #[doc="<p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the <a>DescribeSnapshots</a> API operation.</p>"]
    pub data_encryption_key_id: Option<String>,
    #[doc="<p>The description for the snapshot.</p>"]
    pub description: Option<String>,
    #[doc="<p>Indicates whether the snapshot is encrypted.</p>"]
    pub encrypted: Option<bool>,
    #[doc="<p>The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.</p>"]
    pub kms_key_id: Option<String>,
    #[doc="<p> Value from an Amazon-maintained list (<code>amazon</code> | <code>aws-marketplace</code> | <code>microsoft</code>) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console. </p>"]
    pub owner_alias: Option<String>,
    #[doc="<p>The AWS account ID of the EBS snapshot owner.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>The progress of the snapshot, as a percentage.</p>"]
    pub progress: Option<String>,
    #[doc="<p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>The time stamp when the snapshot was initiated.</p>"]
    pub start_time: Option<String>,
    #[doc="<p>The snapshot state.</p>"]
    pub state: Option<String>,
    #[doc="<p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the <a>DescribeSnapshots</a> API operation.</p>"]
    pub state_message: Option<String>,
    #[doc="<p>Any tags assigned to the snapshot.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the volume that was used to create the snapshot. Snapshots created by the <a>CopySnapshot</a> action have an arbitrary volume ID that should not be used for any purpose.</p>"]
    pub volume_id: Option<String>,
    #[doc="<p>The size of the volume, in GiB.</p>"]
    pub volume_size: Option<i64>,
}

struct SnapshotDeserializer;
impl SnapshotDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Snapshot, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Snapshot::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "dataEncryptionKeyId" => {
                            obj.data_encryption_key_id =
                                Some(try!(StringDeserializer::deserialize("dataEncryptionKeyId",
                                                                          stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "encrypted" => {
                            obj.encrypted = Some(try!(BooleanDeserializer::deserialize("encrypted",
                                                                                       stack)));
                        }
                        "kmsKeyId" => {
                            obj.kms_key_id = Some(try!(StringDeserializer::deserialize("kmsKeyId",
                                                                                       stack)));
                        }
                        "ownerAlias" => {
                            obj.owner_alias = Some(try!(StringDeserializer::deserialize("ownerAlias",
                                                                                        stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "progress" => {
                            obj.progress = Some(try!(StringDeserializer::deserialize("progress",
                                                                                     stack)));
                        }
                        "snapshotId" => {
                            obj.snapshot_id = Some(try!(StringDeserializer::deserialize("snapshotId",
                                                                                        stack)));
                        }
                        "startTime" => {
                            obj.start_time = Some(try!(DateTimeDeserializer::deserialize("startTime",
                                                                                         stack)));
                        }
                        "status" => {
                            obj.state = Some(try!(SnapshotStateDeserializer::deserialize("status",
                                                                                         stack)));
                        }
                        "statusMessage" => {
                            obj.state_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                          stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "volumeId" => {
                            obj.volume_id = Some(try!(StringDeserializer::deserialize("volumeId",
                                                                                      stack)));
                        }
                        "volumeSize" => {
                            obj.volume_size = Some(try!(IntegerDeserializer::deserialize("volumeSize",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the snapshot created from the imported disk.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SnapshotDetail {
    #[doc="<p>A description for the snapshot.</p>"]
    pub description: Option<String>,
    #[doc="<p>The block device mapping for the snapshot.</p>"]
    pub device_name: Option<String>,
    #[doc="<p>The size of the disk in the snapshot, in GiB.</p>"]
    pub disk_image_size: Option<f64>,
    #[doc="<p>The format of the disk image from which the snapshot is created.</p>"]
    pub format: Option<String>,
    #[doc="<p>The percentage of progress for the task.</p>"]
    pub progress: Option<String>,
    #[doc="<p>The snapshot ID of the disk being imported.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>A brief status of the snapshot creation.</p>"]
    pub status: Option<String>,
    #[doc="<p>A detailed status message for the snapshot creation.</p>"]
    pub status_message: Option<String>,
    #[doc="<p>The URL used to access the disk image.</p>"]
    pub url: Option<String>,
    #[doc="<p>The S3 bucket for the disk image.</p>"]
    pub user_bucket: Option<UserBucketDetails>,
}

struct SnapshotDetailDeserializer;
impl SnapshotDetailDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SnapshotDetail, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SnapshotDetail::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "deviceName" => {
                            obj.device_name = Some(try!(StringDeserializer::deserialize("deviceName",
                                                                                        stack)));
                        }
                        "diskImageSize" => {
                            obj.disk_image_size =
                                Some(try!(DoubleDeserializer::deserialize("diskImageSize", stack)));
                        }
                        "format" => {
                            obj.format = Some(try!(StringDeserializer::deserialize("format",
                                                                                   stack)));
                        }
                        "progress" => {
                            obj.progress = Some(try!(StringDeserializer::deserialize("progress",
                                                                                     stack)));
                        }
                        "snapshotId" => {
                            obj.snapshot_id = Some(try!(StringDeserializer::deserialize("snapshotId",
                                                                                        stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StringDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        "url" => {
                            obj.url = Some(try!(StringDeserializer::deserialize("url", stack)));
                        }
                        "userBucket" => {
                            obj.user_bucket =
                                Some(try!(UserBucketDetailsDeserializer::deserialize("userBucket",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SnapshotDetailListDeserializer;
impl SnapshotDetailListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<SnapshotDetail>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SnapshotDetailDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>The disk container object for the import snapshot request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SnapshotDiskContainer {
    #[doc="<p>The description of the disk image being imported.</p>"]
    pub description: Option<String>,
    #[doc="<p>The format of the disk image being imported.</p> <p>Valid values: <code>RAW</code> | <code>VHD</code> | <code>VMDK</code> | <code>OVA</code> </p>"]
    pub format: Option<String>,
    #[doc="<p>The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).</p>"]
    pub url: Option<String>,
    #[doc="<p>The S3 bucket for the disk image.</p>"]
    pub user_bucket: Option<UserBucket>,
}


/// Serialize `SnapshotDiskContainer` contents to a `SignedRequest`.
struct SnapshotDiskContainerSerializer;
impl SnapshotDiskContainerSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SnapshotDiskContainer) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.description {
            params.put(&format!("{}{}", prefix, "Description"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.format {
            params.put(&format!("{}{}", prefix, "Format"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.url {
            params.put(&format!("{}{}", prefix, "Url"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_bucket {
            UserBucketSerializer::serialize(params,
                                            &format!("{}{}", prefix, "UserBucket"),
                                            field_value);
        }

    }
}


/// Serialize `SnapshotIdStringList` contents to a `SignedRequest`.
struct SnapshotIdStringListSerializer;
impl SnapshotIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct SnapshotListDeserializer;
impl SnapshotListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Snapshot>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SnapshotDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct SnapshotStateDeserializer;
impl SnapshotStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Details about the import snapshot task.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SnapshotTaskDetail {
    #[doc="<p>The description of the snapshot.</p>"]
    pub description: Option<String>,
    #[doc="<p>The size of the disk in the snapshot, in GiB.</p>"]
    pub disk_image_size: Option<f64>,
    #[doc="<p>The format of the disk image from which the snapshot is created.</p>"]
    pub format: Option<String>,
    #[doc="<p>The percentage of completion for the import snapshot task.</p>"]
    pub progress: Option<String>,
    #[doc="<p>The snapshot ID of the disk being imported.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>A brief status for the import snapshot task.</p>"]
    pub status: Option<String>,
    #[doc="<p>A detailed status message for the import snapshot task.</p>"]
    pub status_message: Option<String>,
    #[doc="<p>The URL of the disk image from which the snapshot is created.</p>"]
    pub url: Option<String>,
    #[doc="<p>The S3 bucket for the disk image.</p>"]
    pub user_bucket: Option<UserBucketDetails>,
}

struct SnapshotTaskDetailDeserializer;
impl SnapshotTaskDetailDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SnapshotTaskDetail, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SnapshotTaskDetail::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "diskImageSize" => {
                            obj.disk_image_size =
                                Some(try!(DoubleDeserializer::deserialize("diskImageSize", stack)));
                        }
                        "format" => {
                            obj.format = Some(try!(StringDeserializer::deserialize("format",
                                                                                   stack)));
                        }
                        "progress" => {
                            obj.progress = Some(try!(StringDeserializer::deserialize("progress",
                                                                                     stack)));
                        }
                        "snapshotId" => {
                            obj.snapshot_id = Some(try!(StringDeserializer::deserialize("snapshotId",
                                                                                        stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StringDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        "url" => {
                            obj.url = Some(try!(StringDeserializer::deserialize("url", stack)));
                        }
                        "userBucket" => {
                            obj.user_bucket =
                                Some(try!(UserBucketDetailsDeserializer::deserialize("userBucket",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the data feed for a Spot instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotDatafeedSubscription {
    #[doc="<p>The Amazon S3 bucket where the Spot instance data feed is located.</p>"]
    pub bucket: Option<String>,
    #[doc="<p>The fault codes for the Spot instance request, if any.</p>"]
    pub fault: Option<SpotInstanceStateFault>,
    #[doc="<p>The AWS account ID of the account.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>The prefix that is prepended to data feed files.</p>"]
    pub prefix: Option<String>,
    #[doc="<p>The state of the Spot instance data feed subscription.</p>"]
    pub state: Option<String>,
}

struct SpotDatafeedSubscriptionDeserializer;
impl SpotDatafeedSubscriptionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotDatafeedSubscription, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotDatafeedSubscription::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "bucket" => {
                            obj.bucket = Some(try!(StringDeserializer::deserialize("bucket",
                                                                                   stack)));
                        }
                        "fault" => {
                            obj.fault =
                                Some(try!(SpotInstanceStateFaultDeserializer::deserialize("fault",
                                                                                          stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "prefix" => {
                            obj.prefix = Some(try!(StringDeserializer::deserialize("prefix",
                                                                                   stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(DatafeedSubscriptionStateDeserializer::deserialize("state", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the launch specification for one or more Spot instances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotFleetLaunchSpecification {
    #[doc="<p>Deprecated.</p>"]
    pub addressing_type: Option<String>,
    #[doc="<p>One or more block device mapping entries.</p>"]
    pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
    #[doc="<p>Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p> <p>Default: <code>false</code> </p>"]
    pub ebs_optimized: Option<bool>,
    #[doc="<p>The IAM instance profile.</p>"]
    pub iam_instance_profile: Option<IamInstanceProfileSpecification>,
    #[doc="<p>The ID of the AMI.</p>"]
    pub image_id: Option<String>,
    #[doc="<p>The instance type. Note that T2 and HS1 instance types are not supported.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>The ID of the kernel.</p>"]
    pub kernel_id: Option<String>,
    #[doc="<p>The name of the key pair.</p>"]
    pub key_name: Option<String>,
    #[doc="<p>Enable or disable monitoring for the instances.</p>"]
    pub monitoring: Option<SpotFleetMonitoring>,
    #[doc="<p>One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.</p>"]
    pub network_interfaces: Option<Vec<InstanceNetworkInterfaceSpecification>>,
    #[doc="<p>The placement information.</p>"]
    pub placement: Option<SpotPlacement>,
    #[doc="<p>The ID of the RAM disk.</p>"]
    pub ramdisk_id: Option<String>,
    #[doc="<p>One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.</p>"]
    pub security_groups: Option<Vec<GroupIdentifier>>,
    #[doc="<p>The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of <code>WeightedCapacity</code>.</p>"]
    pub spot_price: Option<String>,
    #[doc="<p>The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, \"subnet-a61dafcf, subnet-65ea5f08\".</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>The tags to apply during creation.</p>"]
    pub tag_specifications: Option<Vec<SpotFleetTagSpecification>>,
    #[doc="<p>The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>"]
    pub user_data: Option<String>,
    #[doc="<p>The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).</p> <p>If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.</p>"]
    pub weighted_capacity: Option<f64>,
}

struct SpotFleetLaunchSpecificationDeserializer;
impl SpotFleetLaunchSpecificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotFleetLaunchSpecification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotFleetLaunchSpecification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "addressingType" => {
                            obj.addressing_type =
                                Some(try!(StringDeserializer::deserialize("addressingType",
                                                                          stack)));
                        }
                        "blockDeviceMapping" => {
                            obj.block_device_mappings =
                                Some(try!(BlockDeviceMappingListDeserializer::deserialize("blockDeviceMapping",
                                                                                          stack)));
                        }
                        "ebsOptimized" => {
                            obj.ebs_optimized = Some(try!(BooleanDeserializer::deserialize("ebsOptimized",
                                                                                           stack)));
                        }
                        "iamInstanceProfile" => {
                            obj.iam_instance_profile = Some(try!(IamInstanceProfileSpecificationDeserializer::deserialize("iamInstanceProfile", stack)));
                        }
                        "imageId" => {
                            obj.image_id = Some(try!(StringDeserializer::deserialize("imageId",
                                                                                     stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(InstanceTypeDeserializer::deserialize("instanceType",
                                                                                stack)));
                        }
                        "kernelId" => {
                            obj.kernel_id = Some(try!(StringDeserializer::deserialize("kernelId",
                                                                                      stack)));
                        }
                        "keyName" => {
                            obj.key_name = Some(try!(StringDeserializer::deserialize("keyName",
                                                                                     stack)));
                        }
                        "monitoring" => {
                            obj.monitoring =
                                Some(try!(SpotFleetMonitoringDeserializer::deserialize("monitoring",
                                                                                       stack)));
                        }
                        "networkInterfaceSet" => {
                            obj.network_interfaces = Some(try!(InstanceNetworkInterfaceSpecificationListDeserializer::deserialize("networkInterfaceSet", stack)));
                        }
                        "placement" => {
                            obj.placement =
                                Some(try!(SpotPlacementDeserializer::deserialize("placement",
                                                                                 stack)));
                        }
                        "ramdiskId" => {
                            obj.ramdisk_id = Some(try!(StringDeserializer::deserialize("ramdiskId",
                                                                                       stack)));
                        }
                        "groupSet" => {
                            obj.security_groups =
                                Some(try!(GroupIdentifierListDeserializer::deserialize("groupSet",
                                                                                       stack)));
                        }
                        "spotPrice" => {
                            obj.spot_price = Some(try!(StringDeserializer::deserialize("spotPrice",
                                                                                       stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        "tagSpecificationSet" => {
                            obj.tag_specifications = Some(try!(SpotFleetTagSpecificationListDeserializer::deserialize("tagSpecificationSet", stack)));
                        }
                        "userData" => {
                            obj.user_data = Some(try!(StringDeserializer::deserialize("userData",
                                                                                      stack)));
                        }
                        "weightedCapacity" => {
                            obj.weighted_capacity =
                                Some(try!(DoubleDeserializer::deserialize("weightedCapacity",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `SpotFleetLaunchSpecification` contents to a `SignedRequest`.
struct SpotFleetLaunchSpecificationSerializer;
impl SpotFleetLaunchSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SpotFleetLaunchSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.addressing_type {
            params.put(&format!("{}{}", prefix, "AddressingType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.block_device_mappings {
            BlockDeviceMappingListSerializer::serialize(params,
                                                        &format!("{}{}",
                                                                prefix,
                                                                "BlockDeviceMapping"),
                                                        field_value);
        }
        if let Some(ref field_value) = obj.ebs_optimized {
            params.put(&format!("{}{}", prefix, "EbsOptimized"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.iam_instance_profile {
            IamInstanceProfileSpecificationSerializer::serialize(params,
                                                                 &format!("{}{}",
                                                                         prefix,
                                                                         "IamInstanceProfile"),
                                                                 field_value);
        }
        if let Some(ref field_value) = obj.image_id {
            params.put(&format!("{}{}", prefix, "ImageId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.instance_type {
            params.put(&format!("{}{}", prefix, "InstanceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.kernel_id {
            params.put(&format!("{}{}", prefix, "KernelId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.key_name {
            params.put(&format!("{}{}", prefix, "KeyName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.monitoring {
            SpotFleetMonitoringSerializer::serialize(params,
                                                     &format!("{}{}", prefix, "Monitoring"),
                                                     field_value);
        }
        if let Some(ref field_value) = obj.network_interfaces {
            InstanceNetworkInterfaceSpecificationListSerializer::serialize(params,
                                                                           &format!("{}{}",
                                                                                   prefix,
                                                                                   "NetworkInterfaceSet"),
                                                                           field_value);
        }
        if let Some(ref field_value) = obj.placement {
            SpotPlacementSerializer::serialize(params,
                                               &format!("{}{}", prefix, "Placement"),
                                               field_value);
        }
        if let Some(ref field_value) = obj.ramdisk_id {
            params.put(&format!("{}{}", prefix, "RamdiskId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.security_groups {
            GroupIdentifierListSerializer::serialize(params,
                                                     &format!("{}{}", prefix, "GroupSet"),
                                                     field_value);
        }
        if let Some(ref field_value) = obj.spot_price {
            params.put(&format!("{}{}", prefix, "SpotPrice"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.subnet_id {
            params.put(&format!("{}{}", prefix, "SubnetId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.tag_specifications {
            SpotFleetTagSpecificationListSerializer::serialize(params,
                                                               &format!("{}{}",
                                                                       prefix,
                                                                       "TagSpecificationSet"),
                                                               field_value);
        }
        if let Some(ref field_value) = obj.user_data {
            params.put(&format!("{}{}", prefix, "UserData"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.weighted_capacity {
            params.put(&format!("{}{}", prefix, "WeightedCapacity"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes whether monitoring is enabled.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotFleetMonitoring {
    #[doc="<p>Enables monitoring for the instance.</p> <p>Default: <code>false</code> </p>"]
    pub enabled: Option<bool>,
}

struct SpotFleetMonitoringDeserializer;
impl SpotFleetMonitoringDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotFleetMonitoring, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotFleetMonitoring::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "enabled" => {
                            obj.enabled = Some(try!(BooleanDeserializer::deserialize("enabled",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `SpotFleetMonitoring` contents to a `SignedRequest`.
struct SpotFleetMonitoringSerializer;
impl SpotFleetMonitoringSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SpotFleetMonitoring) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.enabled {
            params.put(&format!("{}{}", prefix, "Enabled"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a Spot fleet request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotFleetRequestConfig {
    #[doc="<p>The progress of the Spot fleet request. If there is an error, the status is <code>error</code>. After all bids are placed, the status is <code>pending_fulfillment</code>. If the size of the fleet is equal to or greater than its target capacity, the status is <code>fulfilled</code>. If the size of the fleet is decreased, the status is <code>pending_termination</code> while Spot instances are terminating.</p>"]
    pub activity_status: Option<String>,
    #[doc="<p>The creation date and time of the request.</p>"]
    pub create_time: String,
    #[doc="<p>Information about the configuration of the Spot fleet request.</p>"]
    pub spot_fleet_request_config: SpotFleetRequestConfigData,
    #[doc="<p>The ID of the Spot fleet request.</p>"]
    pub spot_fleet_request_id: String,
    #[doc="<p>The state of the Spot fleet request.</p>"]
    pub spot_fleet_request_state: String,
}

struct SpotFleetRequestConfigDeserializer;
impl SpotFleetRequestConfigDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotFleetRequestConfig, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotFleetRequestConfig::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "activityStatus" => {
                            obj.activity_status =
                                Some(try!(ActivityStatusDeserializer::deserialize("activityStatus",
                                                                                  stack)));
                        }
                        "createTime" => {
                            obj.create_time = try!(DateTimeDeserializer::deserialize("createTime",
                                                                                     stack));
                        }
                        "spotFleetRequestConfig" => {
                            obj.spot_fleet_request_config =
                                try!(SpotFleetRequestConfigDataDeserializer::deserialize("spotFleetRequestConfig",
                                                                                         stack));
                        }
                        "spotFleetRequestId" => {
                            obj.spot_fleet_request_id =
                                try!(StringDeserializer::deserialize("spotFleetRequestId", stack));
                        }
                        "spotFleetRequestState" => {
                            obj.spot_fleet_request_state =
                                try!(BatchStateDeserializer::deserialize("spotFleetRequestState",
                                                                         stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the configuration of a Spot fleet request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotFleetRequestConfigData {
    #[doc="<p>Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is <code>lowestPrice</code>.</p>"]
    pub allocation_strategy: Option<String>,
    #[doc="<p>A unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring Idempotency</a>.</p>"]
    pub client_token: Option<String>,
    #[doc="<p>Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.</p>"]
    pub excess_capacity_termination_policy: Option<String>,
    #[doc="<p>The number of units fulfilled by this request compared to the set target capacity.</p>"]
    pub fulfilled_capacity: Option<f64>,
    #[doc="<p>Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using <a>CancelSpotFleetRequests</a> or when the Spot fleet request expires, if you set <code>terminateInstancesWithExpiration</code>.</p>"]
    pub iam_fleet_role: String,
    #[doc="<p>Information about the launch specifications for the Spot fleet request.</p>"]
    pub launch_specifications: Vec<SpotFleetLaunchSpecification>,
    #[doc="<p>Indicates whether Spot fleet should replace unhealthy instances.</p>"]
    pub replace_unhealthy_instances: Option<bool>,
    #[doc="<p>The bid price per unit hour.</p>"]
    pub spot_price: String,
    #[doc="<p>The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.</p>"]
    pub target_capacity: i64,
    #[doc="<p>Indicates whether running Spot instances should be terminated when the Spot fleet request expires.</p>"]
    pub terminate_instances_with_expiration: Option<bool>,
    #[doc="<p>The type of request. Indicates whether the fleet will only <code>request</code> the target capacity or also attempt to <code>maintain</code> it. When you <code>request</code> a certain target capacity, the fleet will only place the required bids. It will not attempt to replenish Spot instances if capacity is diminished, nor will it submit bids in alternative Spot pools if capacity is not available. When you want to <code>maintain</code> a certain target capacity, fleet will place the required bids to meet this target capacity. It will also automatically replenish any interrupted instances. Default: <code>maintain</code>.</p>"]
    pub type_: Option<String>,
    #[doc="<p>The start date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The default is to start fulfilling the request immediately.</p>"]
    pub valid_from: Option<String>,
    #[doc="<p>The end date and time of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). At this point, no new Spot instance requests are placed or enabled to fulfill the request.</p>"]
    pub valid_until: Option<String>,
}

struct SpotFleetRequestConfigDataDeserializer;
impl SpotFleetRequestConfigDataDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotFleetRequestConfigData, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotFleetRequestConfigData::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allocationStrategy" => {
                            obj.allocation_strategy =
                                Some(try!(AllocationStrategyDeserializer::deserialize("allocationStrategy",
                                                                                      stack)));
                        }
                        "clientToken" => {
                            obj.client_token = Some(try!(StringDeserializer::deserialize("clientToken",
                                                                                         stack)));
                        }
                        "excessCapacityTerminationPolicy" => {
                            obj.excess_capacity_termination_policy = Some(try!(ExcessCapacityTerminationPolicyDeserializer::deserialize("excessCapacityTerminationPolicy", stack)));
                        }
                        "fulfilledCapacity" => {
                            obj.fulfilled_capacity =
                                Some(try!(DoubleDeserializer::deserialize("fulfilledCapacity",
                                                                          stack)));
                        }
                        "iamFleetRole" => {
                            obj.iam_fleet_role = try!(StringDeserializer::deserialize("iamFleetRole",
                                                                                      stack));
                        }
                        "launchSpecifications" => {
                            obj.launch_specifications =
                                try!(LaunchSpecsListDeserializer::deserialize("launchSpecifications",
                                                                              stack));
                        }
                        "replaceUnhealthyInstances" => {
                            obj.replace_unhealthy_instances =
                                Some(try!(BooleanDeserializer::deserialize("replaceUnhealthyInstances",
                                                                           stack)));
                        }
                        "spotPrice" => {
                            obj.spot_price = try!(StringDeserializer::deserialize("spotPrice",
                                                                                  stack));
                        }
                        "targetCapacity" => {
                            obj.target_capacity = try!(IntegerDeserializer::deserialize("targetCapacity",
                                                                                        stack));
                        }
                        "terminateInstancesWithExpiration" => {
                            obj.terminate_instances_with_expiration =
                                Some(try!(BooleanDeserializer::deserialize("terminateInstancesWithExpiration",
                                                                           stack)));
                        }
                        "type" => {
                            obj.type_ = Some(try!(FleetTypeDeserializer::deserialize("type",
                                                                                     stack)));
                        }
                        "validFrom" => {
                            obj.valid_from = Some(try!(DateTimeDeserializer::deserialize("validFrom",
                                                                                         stack)));
                        }
                        "validUntil" => {
                            obj.valid_until = Some(try!(DateTimeDeserializer::deserialize("validUntil",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `SpotFleetRequestConfigData` contents to a `SignedRequest`.
struct SpotFleetRequestConfigDataSerializer;
impl SpotFleetRequestConfigDataSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SpotFleetRequestConfigData) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.allocation_strategy {
            params.put(&format!("{}{}", prefix, "AllocationStrategy"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.client_token {
            params.put(&format!("{}{}", prefix, "ClientToken"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.excess_capacity_termination_policy {
            params.put(&format!("{}{}", prefix, "ExcessCapacityTerminationPolicy"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.fulfilled_capacity {
            params.put(&format!("{}{}", prefix, "FulfilledCapacity"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "IamFleetRole"),
                   &obj.iam_fleet_role.replace("+", "%2B"));
        LaunchSpecsListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "LaunchSpecifications"),
                                             &obj.launch_specifications);
        if let Some(ref field_value) = obj.replace_unhealthy_instances {
            params.put(&format!("{}{}", prefix, "ReplaceUnhealthyInstances"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "SpotPrice"),
                   &obj.spot_price.replace("+", "%2B"));
        params.put(&format!("{}{}", prefix, "TargetCapacity"),
                   &obj.target_capacity.to_string().replace("+", "%2B"));
        if let Some(ref field_value) = obj.terminate_instances_with_expiration {
            params.put(&format!("{}{}", prefix, "TerminateInstancesWithExpiration"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.type_ {
            params.put(&format!("{}{}", prefix, "Type"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.valid_from {
            params.put(&format!("{}{}", prefix, "ValidFrom"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.valid_until {
            params.put(&format!("{}{}", prefix, "ValidUntil"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct SpotFleetRequestConfigSetDeserializer;
impl SpotFleetRequestConfigSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<SpotFleetRequestConfig>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SpotFleetRequestConfigDeserializer::deserialize("item",
                                                                                      stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>The tags for a Spot fleet resource.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotFleetTagSpecification {
    #[doc="<p>The type of resource. Currently, the only resource type that is supported is <code>instance</code>.</p>"]
    pub resource_type: Option<String>,
    #[doc="<p>The tags.</p>"]
    pub tags: Option<Vec<Tag>>,
}

struct SpotFleetTagSpecificationDeserializer;
impl SpotFleetTagSpecificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotFleetTagSpecification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotFleetTagSpecification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "resourceType" => {
                            obj.resource_type =
                                Some(try!(ResourceTypeDeserializer::deserialize("resourceType",
                                                                                stack)));
                        }
                        "tag" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tag", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `SpotFleetTagSpecification` contents to a `SignedRequest`.
struct SpotFleetTagSpecificationSerializer;
impl SpotFleetTagSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SpotFleetTagSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.resource_type {
            params.put(&format!("{}{}", prefix, "ResourceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.tags {
            TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
        }

    }
}

struct SpotFleetTagSpecificationListDeserializer;
impl SpotFleetTagSpecificationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<SpotFleetTagSpecification>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SpotFleetTagSpecificationDeserializer::deserialize("item",
                                                                                         stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `SpotFleetTagSpecificationList` contents to a `SignedRequest`.
struct SpotFleetTagSpecificationListSerializer;
impl SpotFleetTagSpecificationListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<SpotFleetTagSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            SpotFleetTagSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Describes a Spot instance request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotInstanceRequest {
    #[doc="<p>If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.</p>"]
    pub actual_block_hourly_price: Option<String>,
    #[doc="<p>The Availability Zone group. If you specify the same Availability Zone group for all Spot instance requests, all Spot instances are launched in the same Availability Zone.</p>"]
    pub availability_zone_group: Option<String>,
    #[doc="<p>The duration for the Spot instance, in minutes.</p>"]
    pub block_duration_minutes: Option<i64>,
    #[doc="<p>The date and time when the Spot instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub create_time: Option<String>,
    #[doc="<p>The fault codes for the Spot instance request, if any.</p>"]
    pub fault: Option<SpotInstanceStateFault>,
    #[doc="<p>The instance ID, if an instance has been launched to fulfill the Spot instance request.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The instance launch group. Launch groups are Spot instances that launch together and terminate together.</p>"]
    pub launch_group: Option<String>,
    #[doc="<p>Additional information for launching instances.</p>"]
    pub launch_specification: Option<LaunchSpecification>,
    #[doc="<p>The Availability Zone in which the bid is launched.</p>"]
    pub launched_availability_zone: Option<String>,
    #[doc="<p>The product description associated with the Spot instance.</p>"]
    pub product_description: Option<String>,
    #[doc="<p>The ID of the Spot instance request.</p>"]
    pub spot_instance_request_id: Option<String>,
    #[doc="<p>The maximum hourly price (bid) for the Spot instance launched to fulfill the request.</p>"]
    pub spot_price: Option<String>,
    #[doc="<p>The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html\">Spot Bid Status</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub state: Option<String>,
    #[doc="<p>The status code and status message describing the Spot instance request.</p>"]
    pub status: Option<SpotInstanceStatus>,
    #[doc="<p>Any tags assigned to the resource.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The Spot instance request type.</p>"]
    pub type_: Option<String>,
    #[doc="<p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>"]
    pub valid_from: Option<String>,
    #[doc="<p>The end date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.</p>"]
    pub valid_until: Option<String>,
}

struct SpotInstanceRequestDeserializer;
impl SpotInstanceRequestDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotInstanceRequest, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotInstanceRequest::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "actualBlockHourlyPrice" => {
                            obj.actual_block_hourly_price =
                                Some(try!(StringDeserializer::deserialize("actualBlockHourlyPrice",
                                                                          stack)));
                        }
                        "availabilityZoneGroup" => {
                            obj.availability_zone_group =
                                Some(try!(StringDeserializer::deserialize("availabilityZoneGroup",
                                                                          stack)));
                        }
                        "blockDurationMinutes" => {
                            obj.block_duration_minutes =
                                Some(try!(IntegerDeserializer::deserialize("blockDurationMinutes",
                                                                           stack)));
                        }
                        "createTime" => {
                            obj.create_time = Some(try!(DateTimeDeserializer::deserialize("createTime",
                                                                                          stack)));
                        }
                        "fault" => {
                            obj.fault =
                                Some(try!(SpotInstanceStateFaultDeserializer::deserialize("fault",
                                                                                          stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "launchGroup" => {
                            obj.launch_group = Some(try!(StringDeserializer::deserialize("launchGroup",
                                                                                         stack)));
                        }
                        "launchSpecification" => {
                            obj.launch_specification =
                                Some(try!(LaunchSpecificationDeserializer::deserialize("launchSpecification",
                                                                                       stack)));
                        }
                        "launchedAvailabilityZone" => {
                            obj.launched_availability_zone =
                                Some(try!(StringDeserializer::deserialize("launchedAvailabilityZone",
                                                                          stack)));
                        }
                        "productDescription" => {
                            obj.product_description =
                                Some(try!(RIProductDescriptionDeserializer::deserialize("productDescription",
                                                                                        stack)));
                        }
                        "spotInstanceRequestId" => {
                            obj.spot_instance_request_id =
                                Some(try!(StringDeserializer::deserialize("spotInstanceRequestId",
                                                                          stack)));
                        }
                        "spotPrice" => {
                            obj.spot_price = Some(try!(StringDeserializer::deserialize("spotPrice",
                                                                                       stack)));
                        }
                        "state" => {
                            obj.state =
                                Some(try!(SpotInstanceStateDeserializer::deserialize("state",
                                                                                     stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(SpotInstanceStatusDeserializer::deserialize("status",
                                                                                      stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "type" => {
                            obj.type_ =
                                Some(try!(SpotInstanceTypeDeserializer::deserialize("type",
                                                                                    stack)));
                        }
                        "validFrom" => {
                            obj.valid_from = Some(try!(DateTimeDeserializer::deserialize("validFrom",
                                                                                         stack)));
                        }
                        "validUntil" => {
                            obj.valid_until = Some(try!(DateTimeDeserializer::deserialize("validUntil",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `SpotInstanceRequestIdList` contents to a `SignedRequest`.
struct SpotInstanceRequestIdListSerializer;
impl SpotInstanceRequestIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct SpotInstanceRequestListDeserializer;
impl SpotInstanceRequestListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<SpotInstanceRequest>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SpotInstanceRequestDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct SpotInstanceStateDeserializer;
impl SpotInstanceStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a Spot instance state change.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotInstanceStateFault {
    #[doc="<p>The reason code for the Spot instance state change.</p>"]
    pub code: Option<String>,
    #[doc="<p>The message for the Spot instance state change.</p>"]
    pub message: Option<String>,
}

struct SpotInstanceStateFaultDeserializer;
impl SpotInstanceStateFaultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotInstanceStateFault, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotInstanceStateFault::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(StringDeserializer::deserialize("code", stack)));
                        }
                        "message" => {
                            obj.message = Some(try!(StringDeserializer::deserialize("message",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the status of a Spot instance request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotInstanceStatus {
    #[doc="<p>The status code. For a list of status codes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand\">Spot Bid Status Codes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    pub code: Option<String>,
    #[doc="<p>The description for the status code.</p>"]
    pub message: Option<String>,
    #[doc="<p>The date and time of the most recent status update, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub update_time: Option<String>,
}

struct SpotInstanceStatusDeserializer;
impl SpotInstanceStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotInstanceStatus, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotInstanceStatus::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(StringDeserializer::deserialize("code", stack)));
                        }
                        "message" => {
                            obj.message = Some(try!(StringDeserializer::deserialize("message",
                                                                                    stack)));
                        }
                        "updateTime" => {
                            obj.update_time = Some(try!(DateTimeDeserializer::deserialize("updateTime",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SpotInstanceTypeDeserializer;
impl SpotInstanceTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes Spot instance placement.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotPlacement {
    #[doc="<p>The Availability Zone.</p> <p>[Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, \"us-west-2a, us-west-2b\".</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The name of the placement group (for cluster instances).</p>"]
    pub group_name: Option<String>,
    #[doc="<p>The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for Spot instances.</p>"]
    pub tenancy: Option<String>,
}

struct SpotPlacementDeserializer;
impl SpotPlacementDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotPlacement, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotPlacement::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "groupName" => {
                            obj.group_name = Some(try!(StringDeserializer::deserialize("groupName",
                                                                                       stack)));
                        }
                        "tenancy" => {
                            obj.tenancy = Some(try!(TenancyDeserializer::deserialize("tenancy",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `SpotPlacement` contents to a `SignedRequest`.
struct SpotPlacementSerializer;
impl SpotPlacementSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &SpotPlacement) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.availability_zone {
            params.put(&format!("{}{}", prefix, "AvailabilityZone"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.tenancy {
            params.put(&format!("{}{}", prefix, "Tenancy"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes the maximum hourly price (bid) for any Spot instance launched to fulfill the request.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SpotPrice {
    #[doc="<p>The Availability Zone.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The instance type. Note that T2 and HS1 instance types are not supported.</p>"]
    pub instance_type: Option<String>,
    #[doc="<p>A general description of the AMI.</p>"]
    pub product_description: Option<String>,
    #[doc="<p>The maximum price (bid) that you are willing to pay for a Spot instance.</p>"]
    pub spot_price: Option<String>,
    #[doc="<p>The date and time the request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"]
    pub timestamp: Option<String>,
}

struct SpotPriceDeserializer;
impl SpotPriceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SpotPrice, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SpotPrice::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "instanceType" => {
                            obj.instance_type =
                                Some(try!(InstanceTypeDeserializer::deserialize("instanceType",
                                                                                stack)));
                        }
                        "productDescription" => {
                            obj.product_description =
                                Some(try!(RIProductDescriptionDeserializer::deserialize("productDescription",
                                                                                        stack)));
                        }
                        "spotPrice" => {
                            obj.spot_price = Some(try!(StringDeserializer::deserialize("spotPrice",
                                                                                       stack)));
                        }
                        "timestamp" => {
                            obj.timestamp = Some(try!(DateTimeDeserializer::deserialize("timestamp",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SpotPriceHistoryListDeserializer;
impl SpotPriceHistoryListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<SpotPrice>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SpotPriceDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a stale rule in a security group.</p>"]
#[derive(Default,Debug,Clone)]
pub struct StaleIpPermission {
    #[doc="<p>The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of <code>-1</code> indicates all ICMP types. </p>"]
    pub from_port: Option<i64>,
    #[doc="<p>The IP protocol name (for <code>tcp</code>, <code>udp</code>, and <code>icmp</code>) or number (see <a href=\"http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml\">Protocol Numbers)</a>.</p>"]
    pub ip_protocol: Option<String>,
    #[doc="<p>One or more IP ranges. Not applicable for stale security group rules.</p>"]
    pub ip_ranges: Option<Vec<String>>,
    #[doc="<p>One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.</p>"]
    pub prefix_list_ids: Option<Vec<String>>,
    #[doc="<p>The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of <code>-1</code> indicates all ICMP types. </p>"]
    pub to_port: Option<i64>,
    #[doc="<p>One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.</p>"]
    pub user_id_group_pairs: Option<Vec<UserIdGroupPair>>,
}

struct StaleIpPermissionDeserializer;
impl StaleIpPermissionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<StaleIpPermission, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = StaleIpPermission::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "fromPort" => {
                            obj.from_port = Some(try!(IntegerDeserializer::deserialize("fromPort",
                                                                                       stack)));
                        }
                        "ipProtocol" => {
                            obj.ip_protocol = Some(try!(StringDeserializer::deserialize("ipProtocol",
                                                                                        stack)));
                        }
                        "ipRanges" => {
                            obj.ip_ranges = Some(try!(IpRangesDeserializer::deserialize("ipRanges",
                                                                                        stack)));
                        }
                        "prefixListIds" => {
                            obj.prefix_list_ids =
                                Some(try!(PrefixListIdSetDeserializer::deserialize("prefixListIds",
                                                                                   stack)));
                        }
                        "toPort" => {
                            obj.to_port = Some(try!(IntegerDeserializer::deserialize("toPort",
                                                                                     stack)));
                        }
                        "groups" => {
                            obj.user_id_group_pairs =
                                Some(try!(UserIdGroupPairSetDeserializer::deserialize("groups",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct StaleIpPermissionSetDeserializer;
impl StaleIpPermissionSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<StaleIpPermission>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StaleIpPermissionDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a stale security group (a security group that contains stale rules).</p>"]
#[derive(Default,Debug,Clone)]
pub struct StaleSecurityGroup {
    #[doc="<p>The description of the security group.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of the security group.</p>"]
    pub group_id: String,
    #[doc="<p>The name of the security group.</p>"]
    pub group_name: Option<String>,
    #[doc="<p>Information about the stale inbound rules in the security group.</p>"]
    pub stale_ip_permissions: Option<Vec<StaleIpPermission>>,
    #[doc="<p>Information about the stale outbound rules in the security group.</p>"]
    pub stale_ip_permissions_egress: Option<Vec<StaleIpPermission>>,
    #[doc="<p>The ID of the VPC for the security group.</p>"]
    pub vpc_id: Option<String>,
}

struct StaleSecurityGroupDeserializer;
impl StaleSecurityGroupDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<StaleSecurityGroup, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = StaleSecurityGroup::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "groupId" => {
                            obj.group_id = try!(StringDeserializer::deserialize("groupId", stack));
                        }
                        "groupName" => {
                            obj.group_name = Some(try!(StringDeserializer::deserialize("groupName",
                                                                                       stack)));
                        }
                        "staleIpPermissions" => {
                            obj.stale_ip_permissions =
                                Some(try!(StaleIpPermissionSetDeserializer::deserialize("staleIpPermissions",
                                                                                        stack)));
                        }
                        "staleIpPermissionsEgress" => {
                            obj.stale_ip_permissions_egress =
                                Some(try!(StaleIpPermissionSetDeserializer::deserialize("staleIpPermissionsEgress",
                                                                                        stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct StaleSecurityGroupSetDeserializer;
impl StaleSecurityGroupSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<StaleSecurityGroup>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StaleSecurityGroupDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for StartInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct StartInstancesRequest {
    #[doc="<p>Reserved.</p>"]
    pub additional_info: Option<String>,
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more instance IDs.</p>"]
    pub instance_ids: Vec<String>,
}


/// Serialize `StartInstancesRequest` contents to a `SignedRequest`.
struct StartInstancesRequestSerializer;
impl StartInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &StartInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.additional_info {
            params.put(&format!("{}{}", prefix, "AdditionalInfo"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        InstanceIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceId"),
                                                  &obj.instance_ids);

    }
}

#[doc="<p>Contains the output of StartInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct StartInstancesResult {
    #[doc="<p>Information about one or more started instances.</p>"]
    pub starting_instances: Option<Vec<InstanceStateChange>>,
}

struct StartInstancesResultDeserializer;
impl StartInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<StartInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = StartInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instancesSet" => {
                            obj.starting_instances =
                                Some(try!(InstanceStateChangeListDeserializer::deserialize("instancesSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct StateDeserializer;
impl StateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a state change.</p>"]
#[derive(Default,Debug,Clone)]
pub struct StateReason {
    #[doc="<p>The reason code for the state change.</p>"]
    pub code: Option<String>,
    #[doc="<p>The message for the state change.</p> <ul> <li> <p> <code>Server.InsufficientInstanceCapacity</code>: There was insufficient instance capacity to satisfy the launch request.</p> </li> <li> <p> <code>Server.InternalError</code>: An internal error occurred during instance launch, resulting in termination.</p> </li> <li> <p> <code>Server.ScheduledStop</code>: The instance was stopped due to a scheduled retirement.</p> </li> <li> <p> <code>Server.SpotInstanceTermination</code>: A Spot instance was terminated due to an increase in the market price.</p> </li> <li> <p> <code>Client.InternalError</code>: A client error caused the instance to terminate on launch.</p> </li> <li> <p> <code>Client.InstanceInitiatedShutdown</code>: The instance was shut down using the <code>shutdown -h</code> command from the instance.</p> </li> <li> <p> <code>Client.UserInitiatedShutdown</code>: The instance was shut down using the Amazon EC2 API.</p> </li> <li> <p> <code>Client.VolumeLimitExceeded</code>: The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits.</p> </li> <li> <p> <code>Client.InvalidSnapshot.NotFound</code>: The specified snapshot was not found.</p> </li> </ul>"]
    pub message: Option<String>,
}

struct StateReasonDeserializer;
impl StateReasonDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<StateReason, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = StateReason::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(StringDeserializer::deserialize("code", stack)));
                        }
                        "message" => {
                            obj.message = Some(try!(StringDeserializer::deserialize("message",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct StatusDeserializer;
impl StatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct StatusNameDeserializer;
impl StatusNameDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct StatusTypeDeserializer;
impl StatusTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for StopInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct StopInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.</p> <p>Default: <code>false</code> </p>"]
    pub force: Option<bool>,
    #[doc="<p>One or more instance IDs.</p>"]
    pub instance_ids: Vec<String>,
}


/// Serialize `StopInstancesRequest` contents to a `SignedRequest`.
struct StopInstancesRequestSerializer;
impl StopInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &StopInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.force {
            params.put(&format!("{}{}", prefix, "Force"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        InstanceIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceId"),
                                                  &obj.instance_ids);

    }
}

#[doc="<p>Contains the output of StopInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct StopInstancesResult {
    #[doc="<p>Information about one or more stopped instances.</p>"]
    pub stopping_instances: Option<Vec<InstanceStateChange>>,
}

struct StopInstancesResultDeserializer;
impl StopInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<StopInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = StopInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instancesSet" => {
                            obj.stopping_instances =
                                Some(try!(InstanceStateChangeListDeserializer::deserialize("instancesSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the storage location for an instance store-backed AMI.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Storage {
    #[doc="<p>An Amazon S3 storage location.</p>"]
    pub s3: Option<S3Storage>,
}

struct StorageDeserializer;
impl StorageDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Storage, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Storage::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "S3" => {
                            obj.s3 = Some(try!(S3StorageDeserializer::deserialize("S3", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `Storage` contents to a `SignedRequest`.
struct StorageSerializer;
impl StorageSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Storage) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.s3 {
            S3StorageSerializer::serialize(params, &format!("{}{}", prefix, "S3"), field_value);
        }

    }
}

#[doc="<p>Describes a storage location in Amazon S3.</p>"]
#[derive(Default,Debug,Clone)]
pub struct StorageLocation {
    #[doc="<p>The name of the S3 bucket.</p>"]
    pub bucket: Option<String>,
    #[doc="<p>The key.</p>"]
    pub key: Option<String>,
}


/// Serialize `StorageLocation` contents to a `SignedRequest`.
struct StorageLocationSerializer;
impl StorageLocationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &StorageLocation) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.bucket {
            params.put(&format!("{}{}", prefix, "Bucket"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.key {
            params.put(&format!("{}{}", prefix, "Key"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct StringDeserializer;
impl StringDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a subnet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Subnet {
    #[doc="<p>Indicates whether a network interface created in this subnet (including a network interface created by <a>RunInstances</a>) receives an IPv6 address.</p>"]
    pub assign_ipv_6_address_on_creation: Option<bool>,
    #[doc="<p>The Availability Zone of the subnet.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The number of unused private IPv4 addresses in the subnet. Note that the IPv4 addresses for any stopped instances are considered unavailable.</p>"]
    pub available_ip_address_count: Option<i64>,
    #[doc="<p>The IPv4 CIDR block assigned to the subnet.</p>"]
    pub cidr_block: Option<String>,
    #[doc="<p>Indicates whether this is the default subnet for the Availability Zone.</p>"]
    pub default_for_az: Option<bool>,
    #[doc="<p>Information about the IPv6 CIDR blocks associated with the subnet.</p>"]
    pub ipv_6_cidr_block_association_set: Option<Vec<SubnetIpv6CidrBlockAssociation>>,
    #[doc="<p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>"]
    pub map_public_ip_on_launch: Option<bool>,
    #[doc="<p>The current state of the subnet.</p>"]
    pub state: Option<String>,
    #[doc="<p>The ID of the subnet.</p>"]
    pub subnet_id: Option<String>,
    #[doc="<p>Any tags assigned to the subnet.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC the subnet is in.</p>"]
    pub vpc_id: Option<String>,
}

struct SubnetDeserializer;
impl SubnetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Subnet, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Subnet::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "assignIpv6AddressOnCreation" => {
                            obj.assign_ipv_6_address_on_creation =
                                Some(try!(BooleanDeserializer::deserialize("assignIpv6AddressOnCreation",
                                                                           stack)));
                        }
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "availableIpAddressCount" => {
                            obj.available_ip_address_count =
                                Some(try!(IntegerDeserializer::deserialize("availableIpAddressCount",
                                                                           stack)));
                        }
                        "cidrBlock" => {
                            obj.cidr_block = Some(try!(StringDeserializer::deserialize("cidrBlock",
                                                                                       stack)));
                        }
                        "defaultForAz" => {
                            obj.default_for_az =
                                Some(try!(BooleanDeserializer::deserialize("defaultForAz", stack)));
                        }
                        "ipv6CidrBlockAssociationSet" => {
                            obj.ipv_6_cidr_block_association_set = Some(try!(SubnetIpv6CidrBlockAssociationSetDeserializer::deserialize("ipv6CidrBlockAssociationSet", stack)));
                        }
                        "mapPublicIpOnLaunch" => {
                            obj.map_public_ip_on_launch =
                                Some(try!(BooleanDeserializer::deserialize("mapPublicIpOnLaunch",
                                                                           stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(SubnetStateDeserializer::deserialize("state",
                                                                                       stack)));
                        }
                        "subnetId" => {
                            obj.subnet_id = Some(try!(StringDeserializer::deserialize("subnetId",
                                                                                      stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the state of a CIDR block.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SubnetCidrBlockState {
    #[doc="<p>The state of a CIDR block.</p>"]
    pub state: Option<String>,
    #[doc="<p>A message about the status of the CIDR block, if applicable.</p>"]
    pub status_message: Option<String>,
}

struct SubnetCidrBlockStateDeserializer;
impl SubnetCidrBlockStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SubnetCidrBlockState, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SubnetCidrBlockState::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "state" => {
                            obj.state = Some(try!(SubnetCidrBlockStateCodeDeserializer::deserialize("state", stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SubnetCidrBlockStateCodeDeserializer;
impl SubnetCidrBlockStateCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `SubnetIdStringList` contents to a `SignedRequest`.
struct SubnetIdStringListSerializer;
impl SubnetIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes an IPv6 CIDR block associated with a subnet.</p>"]
#[derive(Default,Debug,Clone)]
pub struct SubnetIpv6CidrBlockAssociation {
    #[doc="<p>The association ID for the CIDR block.</p>"]
    pub association_id: Option<String>,
    #[doc="<p>The IPv6 CIDR block.</p>"]
    pub ipv_6_cidr_block: Option<String>,
    #[doc="<p>Information about the state of the CIDR block.</p>"]
    pub ipv_6_cidr_block_state: Option<SubnetCidrBlockState>,
}

struct SubnetIpv6CidrBlockAssociationDeserializer;
impl SubnetIpv6CidrBlockAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<SubnetIpv6CidrBlockAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = SubnetIpv6CidrBlockAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associationId" => {
                            obj.association_id = Some(try!(StringDeserializer::deserialize("associationId",
                                                                                           stack)));
                        }
                        "ipv6CidrBlock" => {
                            obj.ipv_6_cidr_block =
                                Some(try!(StringDeserializer::deserialize("ipv6CidrBlock", stack)));
                        }
                        "ipv6CidrBlockState" => {
                            obj.ipv_6_cidr_block_state =
                                Some(try!(SubnetCidrBlockStateDeserializer::deserialize("ipv6CidrBlockState",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SubnetIpv6CidrBlockAssociationSetDeserializer;
impl SubnetIpv6CidrBlockAssociationSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<SubnetIpv6CidrBlockAssociation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SubnetIpv6CidrBlockAssociationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct SubnetListDeserializer;
impl SubnetListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Subnet>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(SubnetDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct SubnetStateDeserializer;
impl SubnetStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct SummaryStatusDeserializer;
impl SummaryStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a tag.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Tag {
    #[doc="<p>The key of the tag.</p> <p>Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with <code>aws:</code> </p>"]
    pub key: Option<String>,
    #[doc="<p>The value of the tag.</p> <p>Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.</p>"]
    pub value: Option<String>,
}

struct TagDeserializer;
impl TagDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Tag, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Tag::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "key" => {
                            obj.key = Some(try!(StringDeserializer::deserialize("key", stack)));
                        }
                        "value" => {
                            obj.value = Some(try!(StringDeserializer::deserialize("value", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `Tag` contents to a `SignedRequest`.
struct TagSerializer;
impl TagSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Tag) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.key {
            params.put(&format!("{}{}", prefix, "Key"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.value {
            params.put(&format!("{}{}", prefix, "Value"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a tag.</p>"]
#[derive(Default,Debug,Clone)]
pub struct TagDescription {
    #[doc="<p>The tag key.</p>"]
    pub key: Option<String>,
    #[doc="<p>The ID of the resource. For example, <code>ami-1a2b3c4d</code>.</p>"]
    pub resource_id: Option<String>,
    #[doc="<p>The resource type.</p>"]
    pub resource_type: Option<String>,
    #[doc="<p>The tag value.</p>"]
    pub value: Option<String>,
}

struct TagDescriptionDeserializer;
impl TagDescriptionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<TagDescription, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = TagDescription::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "key" => {
                            obj.key = Some(try!(StringDeserializer::deserialize("key", stack)));
                        }
                        "resourceId" => {
                            obj.resource_id = Some(try!(StringDeserializer::deserialize("resourceId",
                                                                                        stack)));
                        }
                        "resourceType" => {
                            obj.resource_type =
                                Some(try!(ResourceTypeDeserializer::deserialize("resourceType",
                                                                                stack)));
                        }
                        "value" => {
                            obj.value = Some(try!(StringDeserializer::deserialize("value", stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct TagDescriptionListDeserializer;
impl TagDescriptionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<TagDescription>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(TagDescriptionDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct TagListDeserializer;
impl TagListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Tag>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(TagDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `TagList` contents to a `SignedRequest`.
struct TagListSerializer;
impl TagListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            TagSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>The tags to apply to a resource when the resource is being created.</p>"]
#[derive(Default,Debug,Clone)]
pub struct TagSpecification {
    #[doc="<p>The type of resource to tag. Currently, the resource types that support tagging on creation are <code>instance</code> and <code>volume</code>. </p>"]
    pub resource_type: Option<String>,
    #[doc="<p>The tags to apply to the resource.</p>"]
    pub tags: Option<Vec<Tag>>,
}


/// Serialize `TagSpecification` contents to a `SignedRequest`.
struct TagSpecificationSerializer;
impl TagSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &TagSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.resource_type {
            params.put(&format!("{}{}", prefix, "ResourceType"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.tags {
            TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
        }

    }
}


/// Serialize `TagSpecificationList` contents to a `SignedRequest`.
struct TagSpecificationListSerializer;
impl TagSpecificationListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<TagSpecification>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            TagSpecificationSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>Information about the Convertible Reserved Instance offering.</p>"]
#[derive(Default,Debug,Clone)]
pub struct TargetConfiguration {
    #[doc="<p>The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The ID of the Convertible Reserved Instance offering.</p>"]
    pub offering_id: Option<String>,
}

struct TargetConfigurationDeserializer;
impl TargetConfigurationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<TargetConfiguration, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = TargetConfiguration::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instanceCount" => {
                            obj.instance_count =
                                Some(try!(IntegerDeserializer::deserialize("instanceCount",
                                                                           stack)));
                        }
                        "offeringId" => {
                            obj.offering_id = Some(try!(StringDeserializer::deserialize("offeringId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Details about the target configuration.</p>"]
#[derive(Default,Debug,Clone)]
pub struct TargetConfigurationRequest {
    #[doc="<p>The number of instances the Covertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request</p>"]
    pub instance_count: Option<i64>,
    #[doc="<p>The Convertible Reserved Instance offering ID.</p>"]
    pub offering_id: String,
}


/// Serialize `TargetConfigurationRequest` contents to a `SignedRequest`.
struct TargetConfigurationRequestSerializer;
impl TargetConfigurationRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &TargetConfigurationRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.instance_count {
            params.put(&format!("{}{}", prefix, "InstanceCount"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        params.put(&format!("{}{}", prefix, "OfferingId"),
                   &obj.offering_id.replace("+", "%2B"));

    }
}


/// Serialize `TargetConfigurationRequestSet` contents to a `SignedRequest`.
struct TargetConfigurationRequestSetSerializer;
impl TargetConfigurationRequestSetSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<TargetConfigurationRequest>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            TargetConfigurationRequestSerializer::serialize(params, &key, obj);
        }
    }
}

#[doc="<p>The total value of the new Convertible Reserved Instances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct TargetReservationValue {
    #[doc="<p>The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.</p>"]
    pub reservation_value: Option<ReservationValue>,
    #[doc="<p>The configuration of the Convertible Reserved Instances that make up the exchange.</p>"]
    pub target_configuration: Option<TargetConfiguration>,
}

struct TargetReservationValueDeserializer;
impl TargetReservationValueDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<TargetReservationValue, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = TargetReservationValue::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "reservationValue" => {
                            obj.reservation_value =
                                Some(try!(ReservationValueDeserializer::deserialize("reservationValue",
                                                                                    stack)));
                        }
                        "targetConfiguration" => {
                            obj.target_configuration =
                                Some(try!(TargetConfigurationDeserializer::deserialize("targetConfiguration",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct TargetReservationValueSetDeserializer;
impl TargetReservationValueSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<TargetReservationValue>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(TargetReservationValueDeserializer::deserialize("item",
                                                                                      stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct TelemetryStatusDeserializer;
impl TelemetryStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct TenancyDeserializer;
impl TenancyDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for TerminateInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct TerminateInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more instance IDs.</p> <p>Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.</p>"]
    pub instance_ids: Vec<String>,
}


/// Serialize `TerminateInstancesRequest` contents to a `SignedRequest`.
struct TerminateInstancesRequestSerializer;
impl TerminateInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &TerminateInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        InstanceIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceId"),
                                                  &obj.instance_ids);

    }
}

#[doc="<p>Contains the output of TerminateInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct TerminateInstancesResult {
    #[doc="<p>Information about one or more terminated instances.</p>"]
    pub terminating_instances: Option<Vec<InstanceStateChange>>,
}

struct TerminateInstancesResultDeserializer;
impl TerminateInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<TerminateInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = TerminateInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instancesSet" => {
                            obj.terminating_instances =
                                Some(try!(InstanceStateChangeListDeserializer::deserialize("instancesSet",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct TrafficTypeDeserializer;
impl TrafficTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[derive(Default,Debug,Clone)]
pub struct UnassignIpv6AddressesRequest {
    #[doc="<p>The IPv6 addresses to unassign from the network interface.</p>"]
    pub ipv_6_addresses: Vec<String>,
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
}


/// Serialize `UnassignIpv6AddressesRequest` contents to a `SignedRequest`.
struct UnassignIpv6AddressesRequestSerializer;
impl UnassignIpv6AddressesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &UnassignIpv6AddressesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        Ipv6AddressListSerializer::serialize(params,
                                             &format!("{}{}", prefix, "Ipv6Addresses"),
                                             &obj.ipv_6_addresses);
        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));

    }
}

#[derive(Default,Debug,Clone)]
pub struct UnassignIpv6AddressesResult {
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: Option<String>,
    #[doc="<p>The IPv6 addresses that have been unassigned from the network interface.</p>"]
    pub unassigned_ipv_6_addresses: Option<Vec<String>>,
}

struct UnassignIpv6AddressesResultDeserializer;
impl UnassignIpv6AddressesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<UnassignIpv6AddressesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = UnassignIpv6AddressesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "networkInterfaceId" => {
                            obj.network_interface_id =
                                Some(try!(StringDeserializer::deserialize("networkInterfaceId",
                                                                          stack)));
                        }
                        "unassignedIpv6Addresses" => {
                            obj.unassigned_ipv_6_addresses =
                                Some(try!(Ipv6AddressListDeserializer::deserialize("unassignedIpv6Addresses",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Contains the parameters for UnassignPrivateIpAddresses.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UnassignPrivateIpAddressesRequest {
    #[doc="<p>The ID of the network interface.</p>"]
    pub network_interface_id: String,
    #[doc="<p>The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.</p>"]
    pub private_ip_addresses: Vec<String>,
}


/// Serialize `UnassignPrivateIpAddressesRequest` contents to a `SignedRequest`.
struct UnassignPrivateIpAddressesRequestSerializer;
impl UnassignPrivateIpAddressesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &UnassignPrivateIpAddressesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "NetworkInterfaceId"),
                   &obj.network_interface_id.replace("+", "%2B"));
        PrivateIpAddressStringListSerializer::serialize(params,
                                                        &format!("{}{}",
                                                                prefix,
                                                                "PrivateIpAddress"),
                                                        &obj.private_ip_addresses);

    }
}

#[doc="<p>Contains the parameters for UnmonitorInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UnmonitorInstancesRequest {
    #[doc="<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"]
    pub dry_run: Option<bool>,
    #[doc="<p>One or more instance IDs.</p>"]
    pub instance_ids: Vec<String>,
}


/// Serialize `UnmonitorInstancesRequest` contents to a `SignedRequest`.
struct UnmonitorInstancesRequestSerializer;
impl UnmonitorInstancesRequestSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &UnmonitorInstancesRequest) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.dry_run {
            params.put(&format!("{}{}", prefix, "DryRun"),
                       &field_value.to_string().replace("+", "%2B"));
        }
        InstanceIdStringListSerializer::serialize(params,
                                                  &format!("{}{}", prefix, "InstanceId"),
                                                  &obj.instance_ids);

    }
}

#[doc="<p>Contains the output of UnmonitorInstances.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UnmonitorInstancesResult {
    #[doc="<p>The monitoring information.</p>"]
    pub instance_monitorings: Option<Vec<InstanceMonitoring>>,
}

struct UnmonitorInstancesResultDeserializer;
impl UnmonitorInstancesResultDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<UnmonitorInstancesResult, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = UnmonitorInstancesResult::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "instancesSet" => {
                            obj.instance_monitorings =
                                Some(try!(InstanceMonitoringListDeserializer::deserialize("instancesSet",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Information about items that were not successfully processed in a batch call.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UnsuccessfulItem {
    #[doc="<p>Information about the error.</p>"]
    pub error: UnsuccessfulItemError,
    #[doc="<p>The ID of the resource.</p>"]
    pub resource_id: Option<String>,
}

struct UnsuccessfulItemDeserializer;
impl UnsuccessfulItemDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<UnsuccessfulItem, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = UnsuccessfulItem::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "error" => {
                            obj.error = try!(UnsuccessfulItemErrorDeserializer::deserialize("error",
                                                                                            stack));
                        }
                        "resourceId" => {
                            obj.resource_id = Some(try!(StringDeserializer::deserialize("resourceId",
                                                                                        stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Information about the error that occurred. For more information about errors, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html\">Error Codes</a>.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UnsuccessfulItemError {
    #[doc="<p>The error code.</p>"]
    pub code: String,
    #[doc="<p>The error message accompanying the error code.</p>"]
    pub message: String,
}

struct UnsuccessfulItemErrorDeserializer;
impl UnsuccessfulItemErrorDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<UnsuccessfulItemError, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = UnsuccessfulItemError::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = try!(StringDeserializer::deserialize("code", stack));
                        }
                        "message" => {
                            obj.message = try!(StringDeserializer::deserialize("message", stack));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct UnsuccessfulItemListDeserializer;
impl UnsuccessfulItemListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<UnsuccessfulItem>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(UnsuccessfulItemDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct UnsuccessfulItemSetDeserializer;
impl UnsuccessfulItemSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<UnsuccessfulItem>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(UnsuccessfulItemDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the S3 bucket for the disk image.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UserBucket {
    #[doc="<p>The name of the S3 bucket where the disk image is located.</p>"]
    pub s3_bucket: Option<String>,
    #[doc="<p>The file name of the disk image.</p>"]
    pub s3_key: Option<String>,
}


/// Serialize `UserBucket` contents to a `SignedRequest`.
struct UserBucketSerializer;
impl UserBucketSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &UserBucket) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.s3_bucket {
            params.put(&format!("{}{}", prefix, "S3Bucket"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.s3_key {
            params.put(&format!("{}{}", prefix, "S3Key"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes the S3 bucket for the disk image.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UserBucketDetails {
    #[doc="<p>The S3 bucket from which the disk image was created.</p>"]
    pub s3_bucket: Option<String>,
    #[doc="<p>The file name of the disk image.</p>"]
    pub s3_key: Option<String>,
}

struct UserBucketDetailsDeserializer;
impl UserBucketDetailsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<UserBucketDetails, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = UserBucketDetails::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "s3Bucket" => {
                            obj.s3_bucket = Some(try!(StringDeserializer::deserialize("s3Bucket",
                                                                                      stack)));
                        }
                        "s3Key" => {
                            obj.s3_key = Some(try!(StringDeserializer::deserialize("s3Key",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the user data for an instance.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UserData {
    #[doc="<p>The user data. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.</p>"]
    pub data: Option<String>,
}


/// Serialize `UserData` contents to a `SignedRequest`.
struct UserDataSerializer;
impl UserDataSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &UserData) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.data {
            params.put(&format!("{}{}", prefix, "Data"),
                       &field_value.replace("+", "%2B"));
        }

    }
}


/// Serialize `UserGroupStringList` contents to a `SignedRequest`.
struct UserGroupStringListSerializer;
impl UserGroupStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes a security group and AWS account ID pair.</p>"]
#[derive(Default,Debug,Clone)]
pub struct UserIdGroupPair {
    #[doc="<p>The ID of the security group.</p>"]
    pub group_id: Option<String>,
    #[doc="<p>The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.</p>"]
    pub group_name: Option<String>,
    #[doc="<p>The status of a VPC peering connection, if applicable.</p>"]
    pub peering_status: Option<String>,
    #[doc="<p>The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.</p> <p>[EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.</p>"]
    pub user_id: Option<String>,
    #[doc="<p>The ID of the VPC for the referenced security group, if applicable.</p>"]
    pub vpc_id: Option<String>,
    #[doc="<p>The ID of the VPC peering connection, if applicable.</p>"]
    pub vpc_peering_connection_id: Option<String>,
}

struct UserIdGroupPairDeserializer;
impl UserIdGroupPairDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<UserIdGroupPair, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = UserIdGroupPair::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "groupId" => {
                            obj.group_id = Some(try!(StringDeserializer::deserialize("groupId",
                                                                                     stack)));
                        }
                        "groupName" => {
                            obj.group_name = Some(try!(StringDeserializer::deserialize("groupName",
                                                                                       stack)));
                        }
                        "peeringStatus" => {
                            obj.peering_status = Some(try!(StringDeserializer::deserialize("peeringStatus",
                                                                                           stack)));
                        }
                        "userId" => {
                            obj.user_id = Some(try!(StringDeserializer::deserialize("userId",
                                                                                    stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        "vpcPeeringConnectionId" => {
                            obj.vpc_peering_connection_id =
                                Some(try!(StringDeserializer::deserialize("vpcPeeringConnectionId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `UserIdGroupPair` contents to a `SignedRequest`.
struct UserIdGroupPairSerializer;
impl UserIdGroupPairSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &UserIdGroupPair) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.group_id {
            params.put(&format!("{}{}", prefix, "GroupId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.group_name {
            params.put(&format!("{}{}", prefix, "GroupName"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.peering_status {
            params.put(&format!("{}{}", prefix, "PeeringStatus"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.user_id {
            params.put(&format!("{}{}", prefix, "UserId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.vpc_id {
            params.put(&format!("{}{}", prefix, "VpcId"),
                       &field_value.replace("+", "%2B"));
        }
        if let Some(ref field_value) = obj.vpc_peering_connection_id {
            params.put(&format!("{}{}", prefix, "VpcPeeringConnectionId"),
                       &field_value.replace("+", "%2B"));
        }

    }
}

struct UserIdGroupPairListDeserializer;
impl UserIdGroupPairListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<UserIdGroupPair>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(UserIdGroupPairDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `UserIdGroupPairList` contents to a `SignedRequest`.
struct UserIdGroupPairListSerializer;
impl UserIdGroupPairListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<UserIdGroupPair>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            UserIdGroupPairSerializer::serialize(params, &key, obj);
        }
    }
}

struct UserIdGroupPairSetDeserializer;
impl UserIdGroupPairSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<UserIdGroupPair>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(UserIdGroupPairDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `UserIdStringList` contents to a `SignedRequest`.
struct UserIdStringListSerializer;
impl UserIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct ValueStringListDeserializer;
impl ValueStringListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<String>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(StringDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `ValueStringList` contents to a `SignedRequest`.
struct ValueStringListSerializer;
impl ValueStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes telemetry for a VPN tunnel.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VgwTelemetry {
    #[doc="<p>The number of accepted routes.</p>"]
    pub accepted_route_count: Option<i64>,
    #[doc="<p>The date and time of the last change in status.</p>"]
    pub last_status_change: Option<String>,
    #[doc="<p>The Internet-routable IP address of the virtual private gateway's outside interface.</p>"]
    pub outside_ip_address: Option<String>,
    #[doc="<p>The status of the VPN tunnel.</p>"]
    pub status: Option<String>,
    #[doc="<p>If an error occurs, a description of the error.</p>"]
    pub status_message: Option<String>,
}

struct VgwTelemetryDeserializer;
impl VgwTelemetryDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VgwTelemetry, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VgwTelemetry::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "acceptedRouteCount" => {
                            obj.accepted_route_count =
                                Some(try!(IntegerDeserializer::deserialize("acceptedRouteCount",
                                                                           stack)));
                        }
                        "lastStatusChange" => {
                            obj.last_status_change =
                                Some(try!(DateTimeDeserializer::deserialize("lastStatusChange",
                                                                            stack)));
                        }
                        "outsideIpAddress" => {
                            obj.outside_ip_address =
                                Some(try!(StringDeserializer::deserialize("outsideIpAddress",
                                                                          stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(TelemetryStatusDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VgwTelemetryListDeserializer;
impl VgwTelemetryListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VgwTelemetry>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VgwTelemetryDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct VirtualizationTypeDeserializer;
impl VirtualizationTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a volume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Volume {
    #[doc="<p>Information about the volume attachments.</p>"]
    pub attachments: Option<Vec<VolumeAttachment>>,
    #[doc="<p>The Availability Zone for the volume.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The time stamp when volume creation was initiated.</p>"]
    pub create_time: Option<String>,
    #[doc="<p>Indicates whether the volume will be encrypted.</p>"]
    pub encrypted: Option<bool>,
    #[doc="<p>The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html\">Amazon EBS Volume Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for <code>gp2</code> volumes.</p> <p>Condition: This parameter is required for requests to create <code>io1</code> volumes; it is not used in requests to create <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>"]
    pub iops: Option<i64>,
    #[doc="<p>The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.</p>"]
    pub kms_key_id: Option<String>,
    #[doc="<p>The size of the volume, in GiBs.</p>"]
    pub size: Option<i64>,
    #[doc="<p>The snapshot from which the volume was created, if applicable.</p>"]
    pub snapshot_id: Option<String>,
    #[doc="<p>The volume state.</p>"]
    pub state: Option<String>,
    #[doc="<p>Any tags assigned to the volume.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: Option<String>,
    #[doc="<p>The volume type. This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p>"]
    pub volume_type: Option<String>,
}

struct VolumeDeserializer;
impl VolumeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Volume, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Volume::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachmentSet" => {
                            obj.attachments =
                                Some(try!(VolumeAttachmentListDeserializer::deserialize("attachmentSet",
                                                                                        stack)));
                        }
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "createTime" => {
                            obj.create_time = Some(try!(DateTimeDeserializer::deserialize("createTime",
                                                                                          stack)));
                        }
                        "encrypted" => {
                            obj.encrypted = Some(try!(BooleanDeserializer::deserialize("encrypted",
                                                                                       stack)));
                        }
                        "iops" => {
                            obj.iops = Some(try!(IntegerDeserializer::deserialize("iops", stack)));
                        }
                        "kmsKeyId" => {
                            obj.kms_key_id = Some(try!(StringDeserializer::deserialize("kmsKeyId",
                                                                                       stack)));
                        }
                        "size" => {
                            obj.size = Some(try!(IntegerDeserializer::deserialize("size", stack)));
                        }
                        "snapshotId" => {
                            obj.snapshot_id = Some(try!(StringDeserializer::deserialize("snapshotId",
                                                                                        stack)));
                        }
                        "status" => {
                            obj.state = Some(try!(VolumeStateDeserializer::deserialize("status",
                                                                                       stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "volumeId" => {
                            obj.volume_id = Some(try!(StringDeserializer::deserialize("volumeId",
                                                                                      stack)));
                        }
                        "volumeType" => {
                            obj.volume_type =
                                Some(try!(VolumeTypeDeserializer::deserialize("volumeType",
                                                                              stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes volume attachment details.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeAttachment {
    #[doc="<p>The time stamp when the attachment initiated.</p>"]
    pub attach_time: Option<String>,
    #[doc="<p>Indicates whether the EBS volume is deleted on instance termination.</p>"]
    pub delete_on_termination: Option<bool>,
    #[doc="<p>The device name.</p>"]
    pub device: Option<String>,
    #[doc="<p>The ID of the instance.</p>"]
    pub instance_id: Option<String>,
    #[doc="<p>The attachment state of the volume.</p>"]
    pub state: Option<String>,
    #[doc="<p>The ID of the volume.</p>"]
    pub volume_id: Option<String>,
}

struct VolumeAttachmentDeserializer;
impl VolumeAttachmentDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VolumeAttachment, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VolumeAttachment::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "attachTime" => {
                            obj.attach_time = Some(try!(DateTimeDeserializer::deserialize("attachTime",
                                                                                          stack)));
                        }
                        "deleteOnTermination" => {
                            obj.delete_on_termination =
                                Some(try!(BooleanDeserializer::deserialize("deleteOnTermination",
                                                                           stack)));
                        }
                        "device" => {
                            obj.device = Some(try!(StringDeserializer::deserialize("device",
                                                                                   stack)));
                        }
                        "instanceId" => {
                            obj.instance_id = Some(try!(StringDeserializer::deserialize("instanceId",
                                                                                        stack)));
                        }
                        "status" => {
                            obj.state =
                                Some(try!(VolumeAttachmentStateDeserializer::deserialize("status",
                                                                                         stack)));
                        }
                        "volumeId" => {
                            obj.volume_id = Some(try!(StringDeserializer::deserialize("volumeId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeAttachmentListDeserializer;
impl VolumeAttachmentListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VolumeAttachment>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VolumeAttachmentDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct VolumeAttachmentStateDeserializer;
impl VolumeAttachmentStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an EBS volume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeDetail {
    #[doc="<p>The size of the volume, in GiB.</p>"]
    pub size: i64,
}


/// Serialize `VolumeDetail` contents to a `SignedRequest`.
struct VolumeDetailSerializer;
impl VolumeDetailSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &VolumeDetail) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        params.put(&format!("{}{}", prefix, "Size"),
                   &obj.size.to_string().replace("+", "%2B"));

    }
}


/// Serialize `VolumeIdStringList` contents to a `SignedRequest`.
struct VolumeIdStringListSerializer;
impl VolumeIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct VolumeListDeserializer;
impl VolumeListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Volume>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VolumeDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the modification status of an EBS volume.</p> <p>If the volume has never been modified, some element values will be null.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeModification {
    #[doc="<p>Modification completion or failure time.</p>"]
    pub end_time: Option<String>,
    #[doc="<p>Current state of modification. Modification state is null for unmodified volumes. </p>"]
    pub modification_state: Option<String>,
    #[doc="<p>Original IOPS rate of the volume being modified.</p>"]
    pub original_iops: Option<i64>,
    #[doc="<p>Original size of the volume being modified.</p>"]
    pub original_size: Option<i64>,
    #[doc="<p>Original EBS volume type of the volume being modified.</p>"]
    pub original_volume_type: Option<String>,
    #[doc="<p>Modification progress from 0 to 100%.</p>"]
    pub progress: Option<i64>,
    #[doc="<p>Modification start time </p>"]
    pub start_time: Option<String>,
    #[doc="<p>Generic status message on modification progress or failure.</p>"]
    pub status_message: Option<String>,
    #[doc="<p>Target IOPS rate of the volume being modified.</p>"]
    pub target_iops: Option<i64>,
    #[doc="<p>Target size of the volume being modified.</p>"]
    pub target_size: Option<i64>,
    #[doc="<p>Target EBS volume type of the volume being modified.</p>"]
    pub target_volume_type: Option<String>,
    #[doc="<p>ID of the volume being modified.</p>"]
    pub volume_id: Option<String>,
}

struct VolumeModificationDeserializer;
impl VolumeModificationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VolumeModification, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VolumeModification::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "endTime" => {
                            obj.end_time = Some(try!(DateTimeDeserializer::deserialize("endTime",
                                                                                       stack)));
                        }
                        "modificationState" => {
                            obj.modification_state =
                                Some(try!(VolumeModificationStateDeserializer::deserialize("modificationState",
                                                                                           stack)));
                        }
                        "originalIops" => {
                            obj.original_iops = Some(try!(IntegerDeserializer::deserialize("originalIops",
                                                                                           stack)));
                        }
                        "originalSize" => {
                            obj.original_size = Some(try!(IntegerDeserializer::deserialize("originalSize",
                                                                                           stack)));
                        }
                        "originalVolumeType" => {
                            obj.original_volume_type =
                                Some(try!(VolumeTypeDeserializer::deserialize("originalVolumeType",
                                                                              stack)));
                        }
                        "progress" => {
                            obj.progress = Some(try!(LongDeserializer::deserialize("progress",
                                                                                   stack)));
                        }
                        "startTime" => {
                            obj.start_time = Some(try!(DateTimeDeserializer::deserialize("startTime",
                                                                                         stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        "targetIops" => {
                            obj.target_iops = Some(try!(IntegerDeserializer::deserialize("targetIops",
                                                                                         stack)));
                        }
                        "targetSize" => {
                            obj.target_size = Some(try!(IntegerDeserializer::deserialize("targetSize",
                                                                                         stack)));
                        }
                        "targetVolumeType" => {
                            obj.target_volume_type =
                                Some(try!(VolumeTypeDeserializer::deserialize("targetVolumeType",
                                                                              stack)));
                        }
                        "volumeId" => {
                            obj.volume_id = Some(try!(StringDeserializer::deserialize("volumeId",
                                                                                      stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeModificationListDeserializer;
impl VolumeModificationListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VolumeModification>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VolumeModificationDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct VolumeModificationStateDeserializer;
impl VolumeModificationStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeStateDeserializer;
impl VolumeStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a volume status operation code.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeStatusAction {
    #[doc="<p>The code identifying the operation, for example, <code>enable-volume-io</code>.</p>"]
    pub code: Option<String>,
    #[doc="<p>A description of the operation.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of the event associated with this operation.</p>"]
    pub event_id: Option<String>,
    #[doc="<p>The event type associated with this operation.</p>"]
    pub event_type: Option<String>,
}

struct VolumeStatusActionDeserializer;
impl VolumeStatusActionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VolumeStatusAction, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VolumeStatusAction::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(StringDeserializer::deserialize("code", stack)));
                        }
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "eventId" => {
                            obj.event_id = Some(try!(StringDeserializer::deserialize("eventId",
                                                                                     stack)));
                        }
                        "eventType" => {
                            obj.event_type = Some(try!(StringDeserializer::deserialize("eventType",
                                                                                       stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeStatusActionsListDeserializer;
impl VolumeStatusActionsListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VolumeStatusAction>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VolumeStatusActionDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a volume status.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeStatusDetails {
    #[doc="<p>The name of the volume status.</p>"]
    pub name: Option<String>,
    #[doc="<p>The intended status of the volume status.</p>"]
    pub status: Option<String>,
}

struct VolumeStatusDetailsDeserializer;
impl VolumeStatusDetailsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VolumeStatusDetails, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VolumeStatusDetails::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "name" => {
                            obj.name = Some(try!(VolumeStatusNameDeserializer::deserialize("name",
                                                                                           stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(StringDeserializer::deserialize("status",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeStatusDetailsListDeserializer;
impl VolumeStatusDetailsListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VolumeStatusDetails>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VolumeStatusDetailsDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a volume status event.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeStatusEvent {
    #[doc="<p>A description of the event.</p>"]
    pub description: Option<String>,
    #[doc="<p>The ID of this event.</p>"]
    pub event_id: Option<String>,
    #[doc="<p>The type of this event.</p>"]
    pub event_type: Option<String>,
    #[doc="<p>The latest end time of the event.</p>"]
    pub not_after: Option<String>,
    #[doc="<p>The earliest start time of the event.</p>"]
    pub not_before: Option<String>,
}

struct VolumeStatusEventDeserializer;
impl VolumeStatusEventDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VolumeStatusEvent, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VolumeStatusEvent::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "description" => {
                            obj.description = Some(try!(StringDeserializer::deserialize("description",
                                                                                        stack)));
                        }
                        "eventId" => {
                            obj.event_id = Some(try!(StringDeserializer::deserialize("eventId",
                                                                                     stack)));
                        }
                        "eventType" => {
                            obj.event_type = Some(try!(StringDeserializer::deserialize("eventType",
                                                                                       stack)));
                        }
                        "notAfter" => {
                            obj.not_after = Some(try!(DateTimeDeserializer::deserialize("notAfter",
                                                                                        stack)));
                        }
                        "notBefore" => {
                            obj.not_before = Some(try!(DateTimeDeserializer::deserialize("notBefore",
                                                                                         stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeStatusEventsListDeserializer;
impl VolumeStatusEventsListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VolumeStatusEvent>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VolumeStatusEventDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the status of a volume.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeStatusInfo {
    #[doc="<p>The details of the volume status.</p>"]
    pub details: Option<Vec<VolumeStatusDetails>>,
    #[doc="<p>The status of the volume.</p>"]
    pub status: Option<String>,
}

struct VolumeStatusInfoDeserializer;
impl VolumeStatusInfoDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VolumeStatusInfo, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VolumeStatusInfo::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "details" => {
                            obj.details =
                                Some(try!(VolumeStatusDetailsListDeserializer::deserialize("details",
                                                                                           stack)));
                        }
                        "status" => {
                            obj.status =
                                Some(try!(VolumeStatusInfoStatusDeserializer::deserialize("status",
                                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeStatusInfoStatusDeserializer;
impl VolumeStatusInfoStatusDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the volume status.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VolumeStatusItem {
    #[doc="<p>The details of the operation.</p>"]
    pub actions: Option<Vec<VolumeStatusAction>>,
    #[doc="<p>The Availability Zone of the volume.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>A list of events associated with the volume.</p>"]
    pub events: Option<Vec<VolumeStatusEvent>>,
    #[doc="<p>The volume ID.</p>"]
    pub volume_id: Option<String>,
    #[doc="<p>The volume status.</p>"]
    pub volume_status: Option<VolumeStatusInfo>,
}

struct VolumeStatusItemDeserializer;
impl VolumeStatusItemDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VolumeStatusItem, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VolumeStatusItem::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "actionsSet" => {
                            obj.actions =
                                Some(try!(VolumeStatusActionsListDeserializer::deserialize("actionsSet",
                                                                                           stack)));
                        }
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "eventsSet" => {
                            obj.events =
                                Some(try!(VolumeStatusEventsListDeserializer::deserialize("eventsSet",
                                                                                          stack)));
                        }
                        "volumeId" => {
                            obj.volume_id = Some(try!(StringDeserializer::deserialize("volumeId",
                                                                                      stack)));
                        }
                        "volumeStatus" => {
                            obj.volume_status =
                                Some(try!(VolumeStatusInfoDeserializer::deserialize("volumeStatus",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeStatusListDeserializer;
impl VolumeStatusListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VolumeStatusItem>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VolumeStatusItemDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct VolumeStatusNameDeserializer;
impl VolumeStatusNameDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VolumeTypeDeserializer;
impl VolumeTypeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a VPC.</p>"]
#[derive(Default,Debug,Clone)]
pub struct Vpc {
    #[doc="<p>The IPv4 CIDR block for the VPC.</p>"]
    pub cidr_block: Option<String>,
    #[doc="<p>The ID of the set of DHCP options you've associated with the VPC (or <code>default</code> if the default options are associated with the VPC).</p>"]
    pub dhcp_options_id: Option<String>,
    #[doc="<p>The allowed tenancy of instances launched into the VPC.</p>"]
    pub instance_tenancy: Option<String>,
    #[doc="<p>Information about the IPv6 CIDR blocks associated with the VPC.</p>"]
    pub ipv_6_cidr_block_association_set: Option<Vec<VpcIpv6CidrBlockAssociation>>,
    #[doc="<p>Indicates whether the VPC is the default VPC.</p>"]
    pub is_default: Option<bool>,
    #[doc="<p>The current state of the VPC.</p>"]
    pub state: Option<String>,
    #[doc="<p>Any tags assigned to the VPC.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct VpcDeserializer;
impl VpcDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vpc, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = Vpc::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "cidrBlock" => {
                            obj.cidr_block = Some(try!(StringDeserializer::deserialize("cidrBlock",
                                                                                       stack)));
                        }
                        "dhcpOptionsId" => {
                            obj.dhcp_options_id =
                                Some(try!(StringDeserializer::deserialize("dhcpOptionsId", stack)));
                        }
                        "instanceTenancy" => {
                            obj.instance_tenancy =
                                Some(try!(TenancyDeserializer::deserialize("instanceTenancy",
                                                                           stack)));
                        }
                        "ipv6CidrBlockAssociationSet" => {
                            obj.ipv_6_cidr_block_association_set = Some(try!(VpcIpv6CidrBlockAssociationSetDeserializer::deserialize("ipv6CidrBlockAssociationSet", stack)));
                        }
                        "isDefault" => {
                            obj.is_default = Some(try!(BooleanDeserializer::deserialize("isDefault",
                                                                                        stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(VpcStateDeserializer::deserialize("state",
                                                                                    stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes an attachment between a virtual private gateway and a VPC.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcAttachment {
    #[doc="<p>The current state of the attachment.</p>"]
    pub state: Option<String>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct VpcAttachmentDeserializer;
impl VpcAttachmentDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpcAttachment, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcAttachment::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "state" => {
                            obj.state =
                                Some(try!(AttachmentStatusDeserializer::deserialize("state",
                                                                                    stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpcAttachmentListDeserializer;
impl VpcAttachmentListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VpcAttachment>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpcAttachmentDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the state of a CIDR block.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcCidrBlockState {
    #[doc="<p>The state of the CIDR block.</p>"]
    pub state: Option<String>,
    #[doc="<p>A message about the status of the CIDR block, if applicable.</p>"]
    pub status_message: Option<String>,
}

struct VpcCidrBlockStateDeserializer;
impl VpcCidrBlockStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpcCidrBlockState, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcCidrBlockState::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "state" => {
                            obj.state =
                                Some(try!(VpcCidrBlockStateCodeDeserializer::deserialize("state",
                                                                                         stack)));
                        }
                        "statusMessage" => {
                            obj.status_message = Some(try!(StringDeserializer::deserialize("statusMessage",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpcCidrBlockStateCodeDeserializer;
impl VpcCidrBlockStateCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes whether a VPC is enabled for ClassicLink.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcClassicLink {
    #[doc="<p>Indicates whether the VPC is enabled for ClassicLink.</p>"]
    pub classic_link_enabled: Option<bool>,
    #[doc="<p>Any tags assigned to the VPC.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct VpcClassicLinkDeserializer;
impl VpcClassicLinkDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpcClassicLink, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcClassicLink::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "classicLinkEnabled" => {
                            obj.classic_link_enabled =
                                Some(try!(BooleanDeserializer::deserialize("classicLinkEnabled",
                                                                           stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `VpcClassicLinkIdList` contents to a `SignedRequest`.
struct VpcClassicLinkIdListSerializer;
impl VpcClassicLinkIdListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct VpcClassicLinkListDeserializer;
impl VpcClassicLinkListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VpcClassicLink>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpcClassicLinkDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a VPC endpoint.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcEndpoint {
    #[doc="<p>The date and time the VPC endpoint was created.</p>"]
    pub creation_timestamp: Option<String>,
    #[doc="<p>The policy document associated with the endpoint.</p>"]
    pub policy_document: Option<String>,
    #[doc="<p>One or more route tables associated with the endpoint.</p>"]
    pub route_table_ids: Option<Vec<String>>,
    #[doc="<p>The name of the AWS service to which the endpoint is associated.</p>"]
    pub service_name: Option<String>,
    #[doc="<p>The state of the VPC endpoint.</p>"]
    pub state: Option<String>,
    #[doc="<p>The ID of the VPC endpoint.</p>"]
    pub vpc_endpoint_id: Option<String>,
    #[doc="<p>The ID of the VPC to which the endpoint is associated.</p>"]
    pub vpc_id: Option<String>,
}

struct VpcEndpointDeserializer;
impl VpcEndpointDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpcEndpoint, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcEndpoint::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "creationTimestamp" => {
                            obj.creation_timestamp =
                                Some(try!(DateTimeDeserializer::deserialize("creationTimestamp",
                                                                            stack)));
                        }
                        "policyDocument" => {
                            obj.policy_document =
                                Some(try!(StringDeserializer::deserialize("policyDocument",
                                                                          stack)));
                        }
                        "routeTableIdSet" => {
                            obj.route_table_ids =
                                Some(try!(ValueStringListDeserializer::deserialize("routeTableIdSet",
                                                                                   stack)));
                        }
                        "serviceName" => {
                            obj.service_name = Some(try!(StringDeserializer::deserialize("serviceName",
                                                                                         stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(StateDeserializer::deserialize("state", stack)));
                        }
                        "vpcEndpointId" => {
                            obj.vpc_endpoint_id =
                                Some(try!(StringDeserializer::deserialize("vpcEndpointId", stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpcEndpointSetDeserializer;
impl VpcEndpointSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VpcEndpoint>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpcEndpointDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}

/// Serialize `VpcIdStringList` contents to a `SignedRequest`.
struct VpcIdStringListSerializer;
impl VpcIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

#[doc="<p>Describes an IPv6 CIDR block associated with a VPC.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcIpv6CidrBlockAssociation {
    #[doc="<p>The association ID for the IPv6 CIDR block.</p>"]
    pub association_id: Option<String>,
    #[doc="<p>The IPv6 CIDR block.</p>"]
    pub ipv_6_cidr_block: Option<String>,
    #[doc="<p>Information about the state of the CIDR block.</p>"]
    pub ipv_6_cidr_block_state: Option<VpcCidrBlockState>,
}

struct VpcIpv6CidrBlockAssociationDeserializer;
impl VpcIpv6CidrBlockAssociationDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpcIpv6CidrBlockAssociation, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcIpv6CidrBlockAssociation::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "associationId" => {
                            obj.association_id = Some(try!(StringDeserializer::deserialize("associationId",
                                                                                           stack)));
                        }
                        "ipv6CidrBlock" => {
                            obj.ipv_6_cidr_block =
                                Some(try!(StringDeserializer::deserialize("ipv6CidrBlock", stack)));
                        }
                        "ipv6CidrBlockState" => {
                            obj.ipv_6_cidr_block_state =
                                Some(try!(VpcCidrBlockStateDeserializer::deserialize("ipv6CidrBlockState",
                                                                                     stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpcIpv6CidrBlockAssociationSetDeserializer;
impl VpcIpv6CidrBlockAssociationSetDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<Vec<VpcIpv6CidrBlockAssociation>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpcIpv6CidrBlockAssociationDeserializer::deserialize("item",
                                                                                           stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct VpcListDeserializer;
impl VpcListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<Vpc>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpcDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes a VPC peering connection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcPeeringConnection {
    #[doc="<p>Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>"]
    pub accepter_vpc_info: Option<VpcPeeringConnectionVpcInfo>,
    #[doc="<p>The time that an unaccepted VPC peering connection will expire.</p>"]
    pub expiration_time: Option<String>,
    #[doc="<p>Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.</p>"]
    pub requester_vpc_info: Option<VpcPeeringConnectionVpcInfo>,
    #[doc="<p>The status of the VPC peering connection.</p>"]
    pub status: Option<VpcPeeringConnectionStateReason>,
    #[doc="<p>Any tags assigned to the resource.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The ID of the VPC peering connection.</p>"]
    pub vpc_peering_connection_id: Option<String>,
}

struct VpcPeeringConnectionDeserializer;
impl VpcPeeringConnectionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpcPeeringConnection, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcPeeringConnection::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "accepterVpcInfo" => {
                            obj.accepter_vpc_info = Some(try!(VpcPeeringConnectionVpcInfoDeserializer::deserialize("accepterVpcInfo", stack)));
                        }
                        "expirationTime" => {
                            obj.expiration_time =
                                Some(try!(DateTimeDeserializer::deserialize("expirationTime",
                                                                            stack)));
                        }
                        "requesterVpcInfo" => {
                            obj.requester_vpc_info = Some(try!(VpcPeeringConnectionVpcInfoDeserializer::deserialize("requesterVpcInfo", stack)));
                        }
                        "status" => {
                            obj.status = Some(try!(VpcPeeringConnectionStateReasonDeserializer::deserialize("status", stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "vpcPeeringConnectionId" => {
                            obj.vpc_peering_connection_id =
                                Some(try!(StringDeserializer::deserialize("vpcPeeringConnectionId",
                                                                          stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpcPeeringConnectionListDeserializer;
impl VpcPeeringConnectionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VpcPeeringConnection>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpcPeeringConnectionDeserializer::deserialize("item",
                                                                                    stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes the VPC peering connection options.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcPeeringConnectionOptionsDescription {
    #[doc="<p>Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.</p>"]
    pub allow_dns_resolution_from_remote_vpc: Option<bool>,
    #[doc="<p>Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.</p>"]
    pub allow_egress_from_local_classic_link_to_remote_vpc: Option<bool>,
    #[doc="<p>Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.</p>"]
    pub allow_egress_from_local_vpc_to_remote_classic_link: Option<bool>,
}

struct VpcPeeringConnectionOptionsDescriptionDeserializer;
impl VpcPeeringConnectionOptionsDescriptionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<VpcPeeringConnectionOptionsDescription, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcPeeringConnectionOptionsDescription::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "allowDnsResolutionFromRemoteVpc" => {
                            obj.allow_dns_resolution_from_remote_vpc =
                                Some(try!(BooleanDeserializer::deserialize("allowDnsResolutionFromRemoteVpc",
                                                                           stack)));
                        }
                        "allowEgressFromLocalClassicLinkToRemoteVpc" => {
                            obj.allow_egress_from_local_classic_link_to_remote_vpc =
                                Some(try!(BooleanDeserializer::deserialize("allowEgressFromLocalClassicLinkToRemoteVpc",
                                                                           stack)));
                        }
                        "allowEgressFromLocalVpcToRemoteClassicLink" => {
                            obj.allow_egress_from_local_vpc_to_remote_classic_link =
                                Some(try!(BooleanDeserializer::deserialize("allowEgressFromLocalVpcToRemoteClassicLink",
                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes the status of a VPC peering connection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcPeeringConnectionStateReason {
    #[doc="<p>The status of the VPC peering connection.</p>"]
    pub code: Option<String>,
    #[doc="<p>A message that provides more information about the status, if applicable.</p>"]
    pub message: Option<String>,
}

struct VpcPeeringConnectionStateReasonDeserializer;
impl VpcPeeringConnectionStateReasonDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>
        (tag_name: &str,
         stack: &mut T)
         -> Result<VpcPeeringConnectionStateReason, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcPeeringConnectionStateReason::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "code" => {
                            obj.code = Some(try!(VpcPeeringConnectionStateReasonCodeDeserializer::deserialize("code", stack)));
                        }
                        "message" => {
                            obj.message = Some(try!(StringDeserializer::deserialize("message",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpcPeeringConnectionStateReasonCodeDeserializer;
impl VpcPeeringConnectionStateReasonCodeDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a VPC in a VPC peering connection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpcPeeringConnectionVpcInfo {
    #[doc="<p>The IPv4 CIDR block for the VPC.</p>"]
    pub cidr_block: Option<String>,
    #[doc="<p>The IPv6 CIDR block for the VPC.</p>"]
    pub ipv_6_cidr_block_set: Option<Vec<Ipv6CidrBlock>>,
    #[doc="<p>The AWS account ID of the VPC owner.</p>"]
    pub owner_id: Option<String>,
    #[doc="<p>Information about the VPC peering connection options for the accepter or requester VPC.</p>"]
    pub peering_options: Option<VpcPeeringConnectionOptionsDescription>,
    #[doc="<p>The ID of the VPC.</p>"]
    pub vpc_id: Option<String>,
}

struct VpcPeeringConnectionVpcInfoDeserializer;
impl VpcPeeringConnectionVpcInfoDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpcPeeringConnectionVpcInfo, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpcPeeringConnectionVpcInfo::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "cidrBlock" => {
                            obj.cidr_block = Some(try!(StringDeserializer::deserialize("cidrBlock",
                                                                                       stack)));
                        }
                        "ipv6CidrBlockSet" => {
                            obj.ipv_6_cidr_block_set =
                                Some(try!(Ipv6CidrBlockSetDeserializer::deserialize("ipv6CidrBlockSet",
                                                                                    stack)));
                        }
                        "ownerId" => {
                            obj.owner_id = Some(try!(StringDeserializer::deserialize("ownerId",
                                                                                     stack)));
                        }
                        "peeringOptions" => {
                            obj.peering_options = Some(try!(VpcPeeringConnectionOptionsDescriptionDeserializer::deserialize("peeringOptions", stack)));
                        }
                        "vpcId" => {
                            obj.vpc_id = Some(try!(StringDeserializer::deserialize("vpcId",
                                                                                   stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpcStateDeserializer;
impl VpcStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a VPN connection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpnConnection {
    #[doc="<p>The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the <a>CreateVpnConnection</a> response; however, it's present in the <a>DescribeVpnConnections</a> response only if the VPN connection is in the <code>pending</code> or <code>available</code> state.</p>"]
    pub customer_gateway_configuration: Option<String>,
    #[doc="<p>The ID of the customer gateway at your end of the VPN connection.</p>"]
    pub customer_gateway_id: Option<String>,
    #[doc="<p>The VPN connection options.</p>"]
    pub options: Option<VpnConnectionOptions>,
    #[doc="<p>The static routes associated with the VPN connection.</p>"]
    pub routes: Option<Vec<VpnStaticRoute>>,
    #[doc="<p>The current state of the VPN connection.</p>"]
    pub state: Option<String>,
    #[doc="<p>Any tags assigned to the VPN connection.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The type of VPN connection.</p>"]
    pub type_: Option<String>,
    #[doc="<p>Information about the VPN tunnel.</p>"]
    pub vgw_telemetry: Option<Vec<VgwTelemetry>>,
    #[doc="<p>The ID of the VPN connection.</p>"]
    pub vpn_connection_id: Option<String>,
    #[doc="<p>The ID of the virtual private gateway at the AWS side of the VPN connection.</p>"]
    pub vpn_gateway_id: Option<String>,
}

struct VpnConnectionDeserializer;
impl VpnConnectionDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpnConnection, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpnConnection::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "customerGatewayConfiguration" => {
                            obj.customer_gateway_configuration =
                                Some(try!(StringDeserializer::deserialize("customerGatewayConfiguration",
                                                                          stack)));
                        }
                        "customerGatewayId" => {
                            obj.customer_gateway_id =
                                Some(try!(StringDeserializer::deserialize("customerGatewayId",
                                                                          stack)));
                        }
                        "options" => {
                            obj.options =
                                Some(try!(VpnConnectionOptionsDeserializer::deserialize("options",
                                                                                        stack)));
                        }
                        "routes" => {
                            obj.routes =
                                Some(try!(VpnStaticRouteListDeserializer::deserialize("routes",
                                                                                      stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(VpnStateDeserializer::deserialize("state",
                                                                                    stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "type" => {
                            obj.type_ = Some(try!(GatewayTypeDeserializer::deserialize("type",
                                                                                       stack)));
                        }
                        "vgwTelemetry" => {
                            obj.vgw_telemetry =
                                Some(try!(VgwTelemetryListDeserializer::deserialize("vgwTelemetry",
                                                                                    stack)));
                        }
                        "vpnConnectionId" => {
                            obj.vpn_connection_id =
                                Some(try!(StringDeserializer::deserialize("vpnConnectionId",
                                                                          stack)));
                        }
                        "vpnGatewayId" => {
                            obj.vpn_gateway_id = Some(try!(StringDeserializer::deserialize("vpnGatewayId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `VpnConnectionIdStringList` contents to a `SignedRequest`.
struct VpnConnectionIdStringListSerializer;
impl VpnConnectionIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct VpnConnectionListDeserializer;
impl VpnConnectionListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VpnConnection>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpnConnectionDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
#[doc="<p>Describes VPN connection options.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpnConnectionOptions {
    #[doc="<p>Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.</p>"]
    pub static_routes_only: Option<bool>,
}

struct VpnConnectionOptionsDeserializer;
impl VpnConnectionOptionsDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpnConnectionOptions, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpnConnectionOptions::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "staticRoutesOnly" => {
                            obj.static_routes_only =
                                Some(try!(BooleanDeserializer::deserialize("staticRoutesOnly",
                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes VPN connection options.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpnConnectionOptionsSpecification {
    #[doc="<p>Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.</p>"]
    pub static_routes_only: Option<bool>,
}


/// Serialize `VpnConnectionOptionsSpecification` contents to a `SignedRequest`.
struct VpnConnectionOptionsSpecificationSerializer;
impl VpnConnectionOptionsSpecificationSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &VpnConnectionOptionsSpecification) {
        let mut prefix = name.to_string();
        if prefix != "" {
            prefix.push_str(".");
        }

        if let Some(ref field_value) = obj.static_routes_only {
            params.put(&format!("{}{}", prefix, "StaticRoutesOnly"),
                       &field_value.to_string().replace("+", "%2B"));
        }

    }
}

#[doc="<p>Describes a virtual private gateway.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpnGateway {
    #[doc="<p>The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.</p>"]
    pub availability_zone: Option<String>,
    #[doc="<p>The current state of the virtual private gateway.</p>"]
    pub state: Option<String>,
    #[doc="<p>Any tags assigned to the virtual private gateway.</p>"]
    pub tags: Option<Vec<Tag>>,
    #[doc="<p>The type of VPN connection the virtual private gateway supports.</p>"]
    pub type_: Option<String>,
    #[doc="<p>Any VPCs attached to the virtual private gateway.</p>"]
    pub vpc_attachments: Option<Vec<VpcAttachment>>,
    #[doc="<p>The ID of the virtual private gateway.</p>"]
    pub vpn_gateway_id: Option<String>,
}

struct VpnGatewayDeserializer;
impl VpnGatewayDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpnGateway, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpnGateway::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "availabilityZone" => {
                            obj.availability_zone =
                                Some(try!(StringDeserializer::deserialize("availabilityZone",
                                                                          stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(VpnStateDeserializer::deserialize("state",
                                                                                    stack)));
                        }
                        "tagSet" => {
                            obj.tags = Some(try!(TagListDeserializer::deserialize("tagSet",
                                                                                  stack)));
                        }
                        "type" => {
                            obj.type_ = Some(try!(GatewayTypeDeserializer::deserialize("type",
                                                                                       stack)));
                        }
                        "attachments" => {
                            obj.vpc_attachments =
                                Some(try!(VpcAttachmentListDeserializer::deserialize("attachments",
                                                                                     stack)));
                        }
                        "vpnGatewayId" => {
                            obj.vpn_gateway_id = Some(try!(StringDeserializer::deserialize("vpnGatewayId",
                                                                                           stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `VpnGatewayIdStringList` contents to a `SignedRequest`.
struct VpnGatewayIdStringListSerializer;
impl VpnGatewayIdStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

struct VpnGatewayListDeserializer;
impl VpnGatewayListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VpnGateway>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpnGatewayDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct VpnStateDeserializer;
impl VpnStateDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
#[doc="<p>Describes a static route for a VPN connection.</p>"]
#[derive(Default,Debug,Clone)]
pub struct VpnStaticRoute {
    #[doc="<p>The CIDR block associated with the local subnet of the customer data center.</p>"]
    pub destination_cidr_block: Option<String>,
    #[doc="<p>Indicates how the routes were provided.</p>"]
    pub source: Option<String>,
    #[doc="<p>The current state of the static route.</p>"]
    pub state: Option<String>,
}

struct VpnStaticRouteDeserializer;
impl VpnStaticRouteDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<VpnStaticRoute, XmlParseError> {
        try!(start_element(tag_name, stack));

        let mut obj = VpnStaticRoute::default();

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    match &name[..] {
                        "destinationCidrBlock" => {
                            obj.destination_cidr_block =
                                Some(try!(StringDeserializer::deserialize("destinationCidrBlock",
                                                                          stack)));
                        }
                        "source" => {
                            obj.source =
                                Some(try!(VpnStaticRouteSourceDeserializer::deserialize("source",
                                                                                        stack)));
                        }
                        "state" => {
                            obj.state = Some(try!(VpnStateDeserializer::deserialize("state",
                                                                                    stack)));
                        }
                        _ => skip_tree(stack),
                    }
                }
                DeserializerNext::Close => break,
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}
struct VpnStaticRouteListDeserializer;
impl VpnStaticRouteListDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<Vec<VpnStaticRoute>, XmlParseError> {

        let mut obj = vec![];
        try!(start_element(tag_name, stack));

        loop {
            let next_event = match stack.peek() {
                Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
                Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
                    DeserializerNext::Element(name.local_name.to_owned())
                }
                _ => DeserializerNext::Skip,
            };

            match next_event {
                DeserializerNext::Element(name) => {
                    if name == "item" {
                        obj.push(try!(VpnStaticRouteDeserializer::deserialize("item", stack)));
                    } else {
                        skip_tree(stack);
                    }
                }
                DeserializerNext::Close => {
                    try!(end_element(tag_name, stack));
                    break;
                }
                DeserializerNext::Skip => {
                    stack.next();
                }
            }
        }

        Ok(obj)

    }
}
struct VpnStaticRouteSourceDeserializer;
impl VpnStaticRouteSourceDeserializer {
    #[allow(unused_variables)]
    fn deserialize<'a, T: Peek + Next>(tag_name: &str,
                                       stack: &mut T)
                                       -> Result<String, XmlParseError> {
        try!(start_element(tag_name, stack));
        let obj = try!(characters(stack));
        try!(end_element(tag_name, stack));

        Ok(obj)

    }
}

/// Serialize `ZoneNameStringList` contents to a `SignedRequest`.
struct ZoneNameStringListSerializer;
impl ZoneNameStringListSerializer {
    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
        for (index, obj) in obj.iter().enumerate() {
            let key = format!("{}.{}", name, index + 1);
            params.put(&key, &obj);
        }
    }
}

/// Errors returned by AcceptReservedInstancesExchangeQuote
#[derive(Debug, PartialEq)]
pub enum AcceptReservedInstancesExchangeQuoteError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AcceptReservedInstancesExchangeQuoteError {
    pub fn from_body(body: &str) -> AcceptReservedInstancesExchangeQuoteError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AcceptReservedInstancesExchangeQuoteError::Unknown(String::from(body)),
                }
            }
            Err(_) => AcceptReservedInstancesExchangeQuoteError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AcceptReservedInstancesExchangeQuoteError {
    fn from(err: XmlParseError) -> AcceptReservedInstancesExchangeQuoteError {
        let XmlParseError(message) = err;
        AcceptReservedInstancesExchangeQuoteError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AcceptReservedInstancesExchangeQuoteError {
    fn from(err: CredentialsError) -> AcceptReservedInstancesExchangeQuoteError {
        AcceptReservedInstancesExchangeQuoteError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AcceptReservedInstancesExchangeQuoteError {
    fn from(err: HttpDispatchError) -> AcceptReservedInstancesExchangeQuoteError {
        AcceptReservedInstancesExchangeQuoteError::HttpDispatch(err)
    }
}
impl From<io::Error> for AcceptReservedInstancesExchangeQuoteError {
    fn from(err: io::Error) -> AcceptReservedInstancesExchangeQuoteError {
        AcceptReservedInstancesExchangeQuoteError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AcceptReservedInstancesExchangeQuoteError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AcceptReservedInstancesExchangeQuoteError {
    fn description(&self) -> &str {
        match *self {
            AcceptReservedInstancesExchangeQuoteError::Validation(ref cause) => cause,
            AcceptReservedInstancesExchangeQuoteError::Credentials(ref err) => err.description(),
            AcceptReservedInstancesExchangeQuoteError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AcceptReservedInstancesExchangeQuoteError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AcceptVpcPeeringConnection
#[derive(Debug, PartialEq)]
pub enum AcceptVpcPeeringConnectionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AcceptVpcPeeringConnectionError {
    pub fn from_body(body: &str) -> AcceptVpcPeeringConnectionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AcceptVpcPeeringConnectionError::Unknown(String::from(body)),
                }
            }
            Err(_) => AcceptVpcPeeringConnectionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AcceptVpcPeeringConnectionError {
    fn from(err: XmlParseError) -> AcceptVpcPeeringConnectionError {
        let XmlParseError(message) = err;
        AcceptVpcPeeringConnectionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AcceptVpcPeeringConnectionError {
    fn from(err: CredentialsError) -> AcceptVpcPeeringConnectionError {
        AcceptVpcPeeringConnectionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AcceptVpcPeeringConnectionError {
    fn from(err: HttpDispatchError) -> AcceptVpcPeeringConnectionError {
        AcceptVpcPeeringConnectionError::HttpDispatch(err)
    }
}
impl From<io::Error> for AcceptVpcPeeringConnectionError {
    fn from(err: io::Error) -> AcceptVpcPeeringConnectionError {
        AcceptVpcPeeringConnectionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AcceptVpcPeeringConnectionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AcceptVpcPeeringConnectionError {
    fn description(&self) -> &str {
        match *self {
            AcceptVpcPeeringConnectionError::Validation(ref cause) => cause,
            AcceptVpcPeeringConnectionError::Credentials(ref err) => err.description(),
            AcceptVpcPeeringConnectionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AcceptVpcPeeringConnectionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AllocateAddress
#[derive(Debug, PartialEq)]
pub enum AllocateAddressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AllocateAddressError {
    pub fn from_body(body: &str) -> AllocateAddressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AllocateAddressError::Unknown(String::from(body)),
                }
            }
            Err(_) => AllocateAddressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AllocateAddressError {
    fn from(err: XmlParseError) -> AllocateAddressError {
        let XmlParseError(message) = err;
        AllocateAddressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AllocateAddressError {
    fn from(err: CredentialsError) -> AllocateAddressError {
        AllocateAddressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AllocateAddressError {
    fn from(err: HttpDispatchError) -> AllocateAddressError {
        AllocateAddressError::HttpDispatch(err)
    }
}
impl From<io::Error> for AllocateAddressError {
    fn from(err: io::Error) -> AllocateAddressError {
        AllocateAddressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AllocateAddressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AllocateAddressError {
    fn description(&self) -> &str {
        match *self {
            AllocateAddressError::Validation(ref cause) => cause,
            AllocateAddressError::Credentials(ref err) => err.description(),
            AllocateAddressError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            AllocateAddressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AllocateHosts
#[derive(Debug, PartialEq)]
pub enum AllocateHostsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AllocateHostsError {
    pub fn from_body(body: &str) -> AllocateHostsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AllocateHostsError::Unknown(String::from(body)),
                }
            }
            Err(_) => AllocateHostsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AllocateHostsError {
    fn from(err: XmlParseError) -> AllocateHostsError {
        let XmlParseError(message) = err;
        AllocateHostsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AllocateHostsError {
    fn from(err: CredentialsError) -> AllocateHostsError {
        AllocateHostsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AllocateHostsError {
    fn from(err: HttpDispatchError) -> AllocateHostsError {
        AllocateHostsError::HttpDispatch(err)
    }
}
impl From<io::Error> for AllocateHostsError {
    fn from(err: io::Error) -> AllocateHostsError {
        AllocateHostsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AllocateHostsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AllocateHostsError {
    fn description(&self) -> &str {
        match *self {
            AllocateHostsError::Validation(ref cause) => cause,
            AllocateHostsError::Credentials(ref err) => err.description(),
            AllocateHostsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            AllocateHostsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssignIpv6Addresses
#[derive(Debug, PartialEq)]
pub enum AssignIpv6AddressesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssignIpv6AddressesError {
    pub fn from_body(body: &str) -> AssignIpv6AddressesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssignIpv6AddressesError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssignIpv6AddressesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssignIpv6AddressesError {
    fn from(err: XmlParseError) -> AssignIpv6AddressesError {
        let XmlParseError(message) = err;
        AssignIpv6AddressesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssignIpv6AddressesError {
    fn from(err: CredentialsError) -> AssignIpv6AddressesError {
        AssignIpv6AddressesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssignIpv6AddressesError {
    fn from(err: HttpDispatchError) -> AssignIpv6AddressesError {
        AssignIpv6AddressesError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssignIpv6AddressesError {
    fn from(err: io::Error) -> AssignIpv6AddressesError {
        AssignIpv6AddressesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssignIpv6AddressesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssignIpv6AddressesError {
    fn description(&self) -> &str {
        match *self {
            AssignIpv6AddressesError::Validation(ref cause) => cause,
            AssignIpv6AddressesError::Credentials(ref err) => err.description(),
            AssignIpv6AddressesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AssignIpv6AddressesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssignPrivateIpAddresses
#[derive(Debug, PartialEq)]
pub enum AssignPrivateIpAddressesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssignPrivateIpAddressesError {
    pub fn from_body(body: &str) -> AssignPrivateIpAddressesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssignPrivateIpAddressesError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssignPrivateIpAddressesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssignPrivateIpAddressesError {
    fn from(err: XmlParseError) -> AssignPrivateIpAddressesError {
        let XmlParseError(message) = err;
        AssignPrivateIpAddressesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssignPrivateIpAddressesError {
    fn from(err: CredentialsError) -> AssignPrivateIpAddressesError {
        AssignPrivateIpAddressesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssignPrivateIpAddressesError {
    fn from(err: HttpDispatchError) -> AssignPrivateIpAddressesError {
        AssignPrivateIpAddressesError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssignPrivateIpAddressesError {
    fn from(err: io::Error) -> AssignPrivateIpAddressesError {
        AssignPrivateIpAddressesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssignPrivateIpAddressesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssignPrivateIpAddressesError {
    fn description(&self) -> &str {
        match *self {
            AssignPrivateIpAddressesError::Validation(ref cause) => cause,
            AssignPrivateIpAddressesError::Credentials(ref err) => err.description(),
            AssignPrivateIpAddressesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AssignPrivateIpAddressesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssociateAddress
#[derive(Debug, PartialEq)]
pub enum AssociateAddressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssociateAddressError {
    pub fn from_body(body: &str) -> AssociateAddressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssociateAddressError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssociateAddressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssociateAddressError {
    fn from(err: XmlParseError) -> AssociateAddressError {
        let XmlParseError(message) = err;
        AssociateAddressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssociateAddressError {
    fn from(err: CredentialsError) -> AssociateAddressError {
        AssociateAddressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssociateAddressError {
    fn from(err: HttpDispatchError) -> AssociateAddressError {
        AssociateAddressError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssociateAddressError {
    fn from(err: io::Error) -> AssociateAddressError {
        AssociateAddressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssociateAddressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssociateAddressError {
    fn description(&self) -> &str {
        match *self {
            AssociateAddressError::Validation(ref cause) => cause,
            AssociateAddressError::Credentials(ref err) => err.description(),
            AssociateAddressError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            AssociateAddressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssociateDhcpOptions
#[derive(Debug, PartialEq)]
pub enum AssociateDhcpOptionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssociateDhcpOptionsError {
    pub fn from_body(body: &str) -> AssociateDhcpOptionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssociateDhcpOptionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssociateDhcpOptionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssociateDhcpOptionsError {
    fn from(err: XmlParseError) -> AssociateDhcpOptionsError {
        let XmlParseError(message) = err;
        AssociateDhcpOptionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssociateDhcpOptionsError {
    fn from(err: CredentialsError) -> AssociateDhcpOptionsError {
        AssociateDhcpOptionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssociateDhcpOptionsError {
    fn from(err: HttpDispatchError) -> AssociateDhcpOptionsError {
        AssociateDhcpOptionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssociateDhcpOptionsError {
    fn from(err: io::Error) -> AssociateDhcpOptionsError {
        AssociateDhcpOptionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssociateDhcpOptionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssociateDhcpOptionsError {
    fn description(&self) -> &str {
        match *self {
            AssociateDhcpOptionsError::Validation(ref cause) => cause,
            AssociateDhcpOptionsError::Credentials(ref err) => err.description(),
            AssociateDhcpOptionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AssociateDhcpOptionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssociateIamInstanceProfile
#[derive(Debug, PartialEq)]
pub enum AssociateIamInstanceProfileError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssociateIamInstanceProfileError {
    pub fn from_body(body: &str) -> AssociateIamInstanceProfileError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssociateIamInstanceProfileError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssociateIamInstanceProfileError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssociateIamInstanceProfileError {
    fn from(err: XmlParseError) -> AssociateIamInstanceProfileError {
        let XmlParseError(message) = err;
        AssociateIamInstanceProfileError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssociateIamInstanceProfileError {
    fn from(err: CredentialsError) -> AssociateIamInstanceProfileError {
        AssociateIamInstanceProfileError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssociateIamInstanceProfileError {
    fn from(err: HttpDispatchError) -> AssociateIamInstanceProfileError {
        AssociateIamInstanceProfileError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssociateIamInstanceProfileError {
    fn from(err: io::Error) -> AssociateIamInstanceProfileError {
        AssociateIamInstanceProfileError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssociateIamInstanceProfileError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssociateIamInstanceProfileError {
    fn description(&self) -> &str {
        match *self {
            AssociateIamInstanceProfileError::Validation(ref cause) => cause,
            AssociateIamInstanceProfileError::Credentials(ref err) => err.description(),
            AssociateIamInstanceProfileError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AssociateIamInstanceProfileError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssociateRouteTable
#[derive(Debug, PartialEq)]
pub enum AssociateRouteTableError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssociateRouteTableError {
    pub fn from_body(body: &str) -> AssociateRouteTableError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssociateRouteTableError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssociateRouteTableError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssociateRouteTableError {
    fn from(err: XmlParseError) -> AssociateRouteTableError {
        let XmlParseError(message) = err;
        AssociateRouteTableError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssociateRouteTableError {
    fn from(err: CredentialsError) -> AssociateRouteTableError {
        AssociateRouteTableError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssociateRouteTableError {
    fn from(err: HttpDispatchError) -> AssociateRouteTableError {
        AssociateRouteTableError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssociateRouteTableError {
    fn from(err: io::Error) -> AssociateRouteTableError {
        AssociateRouteTableError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssociateRouteTableError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssociateRouteTableError {
    fn description(&self) -> &str {
        match *self {
            AssociateRouteTableError::Validation(ref cause) => cause,
            AssociateRouteTableError::Credentials(ref err) => err.description(),
            AssociateRouteTableError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AssociateRouteTableError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssociateSubnetCidrBlock
#[derive(Debug, PartialEq)]
pub enum AssociateSubnetCidrBlockError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssociateSubnetCidrBlockError {
    pub fn from_body(body: &str) -> AssociateSubnetCidrBlockError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssociateSubnetCidrBlockError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssociateSubnetCidrBlockError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssociateSubnetCidrBlockError {
    fn from(err: XmlParseError) -> AssociateSubnetCidrBlockError {
        let XmlParseError(message) = err;
        AssociateSubnetCidrBlockError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssociateSubnetCidrBlockError {
    fn from(err: CredentialsError) -> AssociateSubnetCidrBlockError {
        AssociateSubnetCidrBlockError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssociateSubnetCidrBlockError {
    fn from(err: HttpDispatchError) -> AssociateSubnetCidrBlockError {
        AssociateSubnetCidrBlockError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssociateSubnetCidrBlockError {
    fn from(err: io::Error) -> AssociateSubnetCidrBlockError {
        AssociateSubnetCidrBlockError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssociateSubnetCidrBlockError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssociateSubnetCidrBlockError {
    fn description(&self) -> &str {
        match *self {
            AssociateSubnetCidrBlockError::Validation(ref cause) => cause,
            AssociateSubnetCidrBlockError::Credentials(ref err) => err.description(),
            AssociateSubnetCidrBlockError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AssociateSubnetCidrBlockError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AssociateVpcCidrBlock
#[derive(Debug, PartialEq)]
pub enum AssociateVpcCidrBlockError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AssociateVpcCidrBlockError {
    pub fn from_body(body: &str) -> AssociateVpcCidrBlockError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AssociateVpcCidrBlockError::Unknown(String::from(body)),
                }
            }
            Err(_) => AssociateVpcCidrBlockError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AssociateVpcCidrBlockError {
    fn from(err: XmlParseError) -> AssociateVpcCidrBlockError {
        let XmlParseError(message) = err;
        AssociateVpcCidrBlockError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AssociateVpcCidrBlockError {
    fn from(err: CredentialsError) -> AssociateVpcCidrBlockError {
        AssociateVpcCidrBlockError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AssociateVpcCidrBlockError {
    fn from(err: HttpDispatchError) -> AssociateVpcCidrBlockError {
        AssociateVpcCidrBlockError::HttpDispatch(err)
    }
}
impl From<io::Error> for AssociateVpcCidrBlockError {
    fn from(err: io::Error) -> AssociateVpcCidrBlockError {
        AssociateVpcCidrBlockError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AssociateVpcCidrBlockError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AssociateVpcCidrBlockError {
    fn description(&self) -> &str {
        match *self {
            AssociateVpcCidrBlockError::Validation(ref cause) => cause,
            AssociateVpcCidrBlockError::Credentials(ref err) => err.description(),
            AssociateVpcCidrBlockError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AssociateVpcCidrBlockError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AttachClassicLinkVpc
#[derive(Debug, PartialEq)]
pub enum AttachClassicLinkVpcError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AttachClassicLinkVpcError {
    pub fn from_body(body: &str) -> AttachClassicLinkVpcError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AttachClassicLinkVpcError::Unknown(String::from(body)),
                }
            }
            Err(_) => AttachClassicLinkVpcError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AttachClassicLinkVpcError {
    fn from(err: XmlParseError) -> AttachClassicLinkVpcError {
        let XmlParseError(message) = err;
        AttachClassicLinkVpcError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AttachClassicLinkVpcError {
    fn from(err: CredentialsError) -> AttachClassicLinkVpcError {
        AttachClassicLinkVpcError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AttachClassicLinkVpcError {
    fn from(err: HttpDispatchError) -> AttachClassicLinkVpcError {
        AttachClassicLinkVpcError::HttpDispatch(err)
    }
}
impl From<io::Error> for AttachClassicLinkVpcError {
    fn from(err: io::Error) -> AttachClassicLinkVpcError {
        AttachClassicLinkVpcError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AttachClassicLinkVpcError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AttachClassicLinkVpcError {
    fn description(&self) -> &str {
        match *self {
            AttachClassicLinkVpcError::Validation(ref cause) => cause,
            AttachClassicLinkVpcError::Credentials(ref err) => err.description(),
            AttachClassicLinkVpcError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AttachClassicLinkVpcError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AttachInternetGateway
#[derive(Debug, PartialEq)]
pub enum AttachInternetGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AttachInternetGatewayError {
    pub fn from_body(body: &str) -> AttachInternetGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AttachInternetGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => AttachInternetGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AttachInternetGatewayError {
    fn from(err: XmlParseError) -> AttachInternetGatewayError {
        let XmlParseError(message) = err;
        AttachInternetGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AttachInternetGatewayError {
    fn from(err: CredentialsError) -> AttachInternetGatewayError {
        AttachInternetGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AttachInternetGatewayError {
    fn from(err: HttpDispatchError) -> AttachInternetGatewayError {
        AttachInternetGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for AttachInternetGatewayError {
    fn from(err: io::Error) -> AttachInternetGatewayError {
        AttachInternetGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AttachInternetGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AttachInternetGatewayError {
    fn description(&self) -> &str {
        match *self {
            AttachInternetGatewayError::Validation(ref cause) => cause,
            AttachInternetGatewayError::Credentials(ref err) => err.description(),
            AttachInternetGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AttachInternetGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AttachNetworkInterface
#[derive(Debug, PartialEq)]
pub enum AttachNetworkInterfaceError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AttachNetworkInterfaceError {
    pub fn from_body(body: &str) -> AttachNetworkInterfaceError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AttachNetworkInterfaceError::Unknown(String::from(body)),
                }
            }
            Err(_) => AttachNetworkInterfaceError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AttachNetworkInterfaceError {
    fn from(err: XmlParseError) -> AttachNetworkInterfaceError {
        let XmlParseError(message) = err;
        AttachNetworkInterfaceError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AttachNetworkInterfaceError {
    fn from(err: CredentialsError) -> AttachNetworkInterfaceError {
        AttachNetworkInterfaceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AttachNetworkInterfaceError {
    fn from(err: HttpDispatchError) -> AttachNetworkInterfaceError {
        AttachNetworkInterfaceError::HttpDispatch(err)
    }
}
impl From<io::Error> for AttachNetworkInterfaceError {
    fn from(err: io::Error) -> AttachNetworkInterfaceError {
        AttachNetworkInterfaceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AttachNetworkInterfaceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AttachNetworkInterfaceError {
    fn description(&self) -> &str {
        match *self {
            AttachNetworkInterfaceError::Validation(ref cause) => cause,
            AttachNetworkInterfaceError::Credentials(ref err) => err.description(),
            AttachNetworkInterfaceError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AttachNetworkInterfaceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AttachVolume
#[derive(Debug, PartialEq)]
pub enum AttachVolumeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AttachVolumeError {
    pub fn from_body(body: &str) -> AttachVolumeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AttachVolumeError::Unknown(String::from(body)),
                }
            }
            Err(_) => AttachVolumeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AttachVolumeError {
    fn from(err: XmlParseError) -> AttachVolumeError {
        let XmlParseError(message) = err;
        AttachVolumeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AttachVolumeError {
    fn from(err: CredentialsError) -> AttachVolumeError {
        AttachVolumeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AttachVolumeError {
    fn from(err: HttpDispatchError) -> AttachVolumeError {
        AttachVolumeError::HttpDispatch(err)
    }
}
impl From<io::Error> for AttachVolumeError {
    fn from(err: io::Error) -> AttachVolumeError {
        AttachVolumeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AttachVolumeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AttachVolumeError {
    fn description(&self) -> &str {
        match *self {
            AttachVolumeError::Validation(ref cause) => cause,
            AttachVolumeError::Credentials(ref err) => err.description(),
            AttachVolumeError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            AttachVolumeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AttachVpnGateway
#[derive(Debug, PartialEq)]
pub enum AttachVpnGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AttachVpnGatewayError {
    pub fn from_body(body: &str) -> AttachVpnGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AttachVpnGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => AttachVpnGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AttachVpnGatewayError {
    fn from(err: XmlParseError) -> AttachVpnGatewayError {
        let XmlParseError(message) = err;
        AttachVpnGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AttachVpnGatewayError {
    fn from(err: CredentialsError) -> AttachVpnGatewayError {
        AttachVpnGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AttachVpnGatewayError {
    fn from(err: HttpDispatchError) -> AttachVpnGatewayError {
        AttachVpnGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for AttachVpnGatewayError {
    fn from(err: io::Error) -> AttachVpnGatewayError {
        AttachVpnGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AttachVpnGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AttachVpnGatewayError {
    fn description(&self) -> &str {
        match *self {
            AttachVpnGatewayError::Validation(ref cause) => cause,
            AttachVpnGatewayError::Credentials(ref err) => err.description(),
            AttachVpnGatewayError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            AttachVpnGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AuthorizeSecurityGroupEgress
#[derive(Debug, PartialEq)]
pub enum AuthorizeSecurityGroupEgressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AuthorizeSecurityGroupEgressError {
    pub fn from_body(body: &str) -> AuthorizeSecurityGroupEgressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AuthorizeSecurityGroupEgressError::Unknown(String::from(body)),
                }
            }
            Err(_) => AuthorizeSecurityGroupEgressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AuthorizeSecurityGroupEgressError {
    fn from(err: XmlParseError) -> AuthorizeSecurityGroupEgressError {
        let XmlParseError(message) = err;
        AuthorizeSecurityGroupEgressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AuthorizeSecurityGroupEgressError {
    fn from(err: CredentialsError) -> AuthorizeSecurityGroupEgressError {
        AuthorizeSecurityGroupEgressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AuthorizeSecurityGroupEgressError {
    fn from(err: HttpDispatchError) -> AuthorizeSecurityGroupEgressError {
        AuthorizeSecurityGroupEgressError::HttpDispatch(err)
    }
}
impl From<io::Error> for AuthorizeSecurityGroupEgressError {
    fn from(err: io::Error) -> AuthorizeSecurityGroupEgressError {
        AuthorizeSecurityGroupEgressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AuthorizeSecurityGroupEgressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AuthorizeSecurityGroupEgressError {
    fn description(&self) -> &str {
        match *self {
            AuthorizeSecurityGroupEgressError::Validation(ref cause) => cause,
            AuthorizeSecurityGroupEgressError::Credentials(ref err) => err.description(),
            AuthorizeSecurityGroupEgressError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AuthorizeSecurityGroupEgressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by AuthorizeSecurityGroupIngress
#[derive(Debug, PartialEq)]
pub enum AuthorizeSecurityGroupIngressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl AuthorizeSecurityGroupIngressError {
    pub fn from_body(body: &str) -> AuthorizeSecurityGroupIngressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => AuthorizeSecurityGroupIngressError::Unknown(String::from(body)),
                }
            }
            Err(_) => AuthorizeSecurityGroupIngressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for AuthorizeSecurityGroupIngressError {
    fn from(err: XmlParseError) -> AuthorizeSecurityGroupIngressError {
        let XmlParseError(message) = err;
        AuthorizeSecurityGroupIngressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for AuthorizeSecurityGroupIngressError {
    fn from(err: CredentialsError) -> AuthorizeSecurityGroupIngressError {
        AuthorizeSecurityGroupIngressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for AuthorizeSecurityGroupIngressError {
    fn from(err: HttpDispatchError) -> AuthorizeSecurityGroupIngressError {
        AuthorizeSecurityGroupIngressError::HttpDispatch(err)
    }
}
impl From<io::Error> for AuthorizeSecurityGroupIngressError {
    fn from(err: io::Error) -> AuthorizeSecurityGroupIngressError {
        AuthorizeSecurityGroupIngressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for AuthorizeSecurityGroupIngressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for AuthorizeSecurityGroupIngressError {
    fn description(&self) -> &str {
        match *self {
            AuthorizeSecurityGroupIngressError::Validation(ref cause) => cause,
            AuthorizeSecurityGroupIngressError::Credentials(ref err) => err.description(),
            AuthorizeSecurityGroupIngressError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            AuthorizeSecurityGroupIngressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by BundleInstance
#[derive(Debug, PartialEq)]
pub enum BundleInstanceError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl BundleInstanceError {
    pub fn from_body(body: &str) -> BundleInstanceError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => BundleInstanceError::Unknown(String::from(body)),
                }
            }
            Err(_) => BundleInstanceError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for BundleInstanceError {
    fn from(err: XmlParseError) -> BundleInstanceError {
        let XmlParseError(message) = err;
        BundleInstanceError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for BundleInstanceError {
    fn from(err: CredentialsError) -> BundleInstanceError {
        BundleInstanceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for BundleInstanceError {
    fn from(err: HttpDispatchError) -> BundleInstanceError {
        BundleInstanceError::HttpDispatch(err)
    }
}
impl From<io::Error> for BundleInstanceError {
    fn from(err: io::Error) -> BundleInstanceError {
        BundleInstanceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for BundleInstanceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for BundleInstanceError {
    fn description(&self) -> &str {
        match *self {
            BundleInstanceError::Validation(ref cause) => cause,
            BundleInstanceError::Credentials(ref err) => err.description(),
            BundleInstanceError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            BundleInstanceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CancelBundleTask
#[derive(Debug, PartialEq)]
pub enum CancelBundleTaskError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CancelBundleTaskError {
    pub fn from_body(body: &str) -> CancelBundleTaskError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CancelBundleTaskError::Unknown(String::from(body)),
                }
            }
            Err(_) => CancelBundleTaskError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CancelBundleTaskError {
    fn from(err: XmlParseError) -> CancelBundleTaskError {
        let XmlParseError(message) = err;
        CancelBundleTaskError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CancelBundleTaskError {
    fn from(err: CredentialsError) -> CancelBundleTaskError {
        CancelBundleTaskError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CancelBundleTaskError {
    fn from(err: HttpDispatchError) -> CancelBundleTaskError {
        CancelBundleTaskError::HttpDispatch(err)
    }
}
impl From<io::Error> for CancelBundleTaskError {
    fn from(err: io::Error) -> CancelBundleTaskError {
        CancelBundleTaskError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CancelBundleTaskError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CancelBundleTaskError {
    fn description(&self) -> &str {
        match *self {
            CancelBundleTaskError::Validation(ref cause) => cause,
            CancelBundleTaskError::Credentials(ref err) => err.description(),
            CancelBundleTaskError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CancelBundleTaskError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CancelConversionTask
#[derive(Debug, PartialEq)]
pub enum CancelConversionTaskError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CancelConversionTaskError {
    pub fn from_body(body: &str) -> CancelConversionTaskError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CancelConversionTaskError::Unknown(String::from(body)),
                }
            }
            Err(_) => CancelConversionTaskError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CancelConversionTaskError {
    fn from(err: XmlParseError) -> CancelConversionTaskError {
        let XmlParseError(message) = err;
        CancelConversionTaskError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CancelConversionTaskError {
    fn from(err: CredentialsError) -> CancelConversionTaskError {
        CancelConversionTaskError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CancelConversionTaskError {
    fn from(err: HttpDispatchError) -> CancelConversionTaskError {
        CancelConversionTaskError::HttpDispatch(err)
    }
}
impl From<io::Error> for CancelConversionTaskError {
    fn from(err: io::Error) -> CancelConversionTaskError {
        CancelConversionTaskError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CancelConversionTaskError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CancelConversionTaskError {
    fn description(&self) -> &str {
        match *self {
            CancelConversionTaskError::Validation(ref cause) => cause,
            CancelConversionTaskError::Credentials(ref err) => err.description(),
            CancelConversionTaskError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CancelConversionTaskError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CancelExportTask
#[derive(Debug, PartialEq)]
pub enum CancelExportTaskError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CancelExportTaskError {
    pub fn from_body(body: &str) -> CancelExportTaskError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CancelExportTaskError::Unknown(String::from(body)),
                }
            }
            Err(_) => CancelExportTaskError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CancelExportTaskError {
    fn from(err: XmlParseError) -> CancelExportTaskError {
        let XmlParseError(message) = err;
        CancelExportTaskError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CancelExportTaskError {
    fn from(err: CredentialsError) -> CancelExportTaskError {
        CancelExportTaskError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CancelExportTaskError {
    fn from(err: HttpDispatchError) -> CancelExportTaskError {
        CancelExportTaskError::HttpDispatch(err)
    }
}
impl From<io::Error> for CancelExportTaskError {
    fn from(err: io::Error) -> CancelExportTaskError {
        CancelExportTaskError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CancelExportTaskError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CancelExportTaskError {
    fn description(&self) -> &str {
        match *self {
            CancelExportTaskError::Validation(ref cause) => cause,
            CancelExportTaskError::Credentials(ref err) => err.description(),
            CancelExportTaskError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CancelExportTaskError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CancelImportTask
#[derive(Debug, PartialEq)]
pub enum CancelImportTaskError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CancelImportTaskError {
    pub fn from_body(body: &str) -> CancelImportTaskError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CancelImportTaskError::Unknown(String::from(body)),
                }
            }
            Err(_) => CancelImportTaskError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CancelImportTaskError {
    fn from(err: XmlParseError) -> CancelImportTaskError {
        let XmlParseError(message) = err;
        CancelImportTaskError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CancelImportTaskError {
    fn from(err: CredentialsError) -> CancelImportTaskError {
        CancelImportTaskError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CancelImportTaskError {
    fn from(err: HttpDispatchError) -> CancelImportTaskError {
        CancelImportTaskError::HttpDispatch(err)
    }
}
impl From<io::Error> for CancelImportTaskError {
    fn from(err: io::Error) -> CancelImportTaskError {
        CancelImportTaskError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CancelImportTaskError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CancelImportTaskError {
    fn description(&self) -> &str {
        match *self {
            CancelImportTaskError::Validation(ref cause) => cause,
            CancelImportTaskError::Credentials(ref err) => err.description(),
            CancelImportTaskError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CancelImportTaskError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CancelReservedInstancesListing
#[derive(Debug, PartialEq)]
pub enum CancelReservedInstancesListingError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CancelReservedInstancesListingError {
    pub fn from_body(body: &str) -> CancelReservedInstancesListingError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CancelReservedInstancesListingError::Unknown(String::from(body)),
                }
            }
            Err(_) => CancelReservedInstancesListingError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CancelReservedInstancesListingError {
    fn from(err: XmlParseError) -> CancelReservedInstancesListingError {
        let XmlParseError(message) = err;
        CancelReservedInstancesListingError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CancelReservedInstancesListingError {
    fn from(err: CredentialsError) -> CancelReservedInstancesListingError {
        CancelReservedInstancesListingError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CancelReservedInstancesListingError {
    fn from(err: HttpDispatchError) -> CancelReservedInstancesListingError {
        CancelReservedInstancesListingError::HttpDispatch(err)
    }
}
impl From<io::Error> for CancelReservedInstancesListingError {
    fn from(err: io::Error) -> CancelReservedInstancesListingError {
        CancelReservedInstancesListingError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CancelReservedInstancesListingError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CancelReservedInstancesListingError {
    fn description(&self) -> &str {
        match *self {
            CancelReservedInstancesListingError::Validation(ref cause) => cause,
            CancelReservedInstancesListingError::Credentials(ref err) => err.description(),
            CancelReservedInstancesListingError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CancelReservedInstancesListingError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CancelSpotFleetRequests
#[derive(Debug, PartialEq)]
pub enum EC2CancelSpotFleetRequestsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl EC2CancelSpotFleetRequestsError {
    pub fn from_body(body: &str) -> EC2CancelSpotFleetRequestsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => EC2CancelSpotFleetRequestsError::Unknown(String::from(body)),
                }
            }
            Err(_) => EC2CancelSpotFleetRequestsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for EC2CancelSpotFleetRequestsError {
    fn from(err: XmlParseError) -> EC2CancelSpotFleetRequestsError {
        let XmlParseError(message) = err;
        EC2CancelSpotFleetRequestsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for EC2CancelSpotFleetRequestsError {
    fn from(err: CredentialsError) -> EC2CancelSpotFleetRequestsError {
        EC2CancelSpotFleetRequestsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for EC2CancelSpotFleetRequestsError {
    fn from(err: HttpDispatchError) -> EC2CancelSpotFleetRequestsError {
        EC2CancelSpotFleetRequestsError::HttpDispatch(err)
    }
}
impl From<io::Error> for EC2CancelSpotFleetRequestsError {
    fn from(err: io::Error) -> EC2CancelSpotFleetRequestsError {
        EC2CancelSpotFleetRequestsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for EC2CancelSpotFleetRequestsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for EC2CancelSpotFleetRequestsError {
    fn description(&self) -> &str {
        match *self {
            EC2CancelSpotFleetRequestsError::Validation(ref cause) => cause,
            EC2CancelSpotFleetRequestsError::Credentials(ref err) => err.description(),
            EC2CancelSpotFleetRequestsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            EC2CancelSpotFleetRequestsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CancelSpotInstanceRequests
#[derive(Debug, PartialEq)]
pub enum CancelSpotInstanceRequestsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CancelSpotInstanceRequestsError {
    pub fn from_body(body: &str) -> CancelSpotInstanceRequestsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CancelSpotInstanceRequestsError::Unknown(String::from(body)),
                }
            }
            Err(_) => CancelSpotInstanceRequestsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CancelSpotInstanceRequestsError {
    fn from(err: XmlParseError) -> CancelSpotInstanceRequestsError {
        let XmlParseError(message) = err;
        CancelSpotInstanceRequestsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CancelSpotInstanceRequestsError {
    fn from(err: CredentialsError) -> CancelSpotInstanceRequestsError {
        CancelSpotInstanceRequestsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CancelSpotInstanceRequestsError {
    fn from(err: HttpDispatchError) -> CancelSpotInstanceRequestsError {
        CancelSpotInstanceRequestsError::HttpDispatch(err)
    }
}
impl From<io::Error> for CancelSpotInstanceRequestsError {
    fn from(err: io::Error) -> CancelSpotInstanceRequestsError {
        CancelSpotInstanceRequestsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CancelSpotInstanceRequestsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CancelSpotInstanceRequestsError {
    fn description(&self) -> &str {
        match *self {
            CancelSpotInstanceRequestsError::Validation(ref cause) => cause,
            CancelSpotInstanceRequestsError::Credentials(ref err) => err.description(),
            CancelSpotInstanceRequestsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CancelSpotInstanceRequestsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ConfirmProductInstance
#[derive(Debug, PartialEq)]
pub enum ConfirmProductInstanceError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ConfirmProductInstanceError {
    pub fn from_body(body: &str) -> ConfirmProductInstanceError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ConfirmProductInstanceError::Unknown(String::from(body)),
                }
            }
            Err(_) => ConfirmProductInstanceError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ConfirmProductInstanceError {
    fn from(err: XmlParseError) -> ConfirmProductInstanceError {
        let XmlParseError(message) = err;
        ConfirmProductInstanceError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ConfirmProductInstanceError {
    fn from(err: CredentialsError) -> ConfirmProductInstanceError {
        ConfirmProductInstanceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ConfirmProductInstanceError {
    fn from(err: HttpDispatchError) -> ConfirmProductInstanceError {
        ConfirmProductInstanceError::HttpDispatch(err)
    }
}
impl From<io::Error> for ConfirmProductInstanceError {
    fn from(err: io::Error) -> ConfirmProductInstanceError {
        ConfirmProductInstanceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ConfirmProductInstanceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ConfirmProductInstanceError {
    fn description(&self) -> &str {
        match *self {
            ConfirmProductInstanceError::Validation(ref cause) => cause,
            ConfirmProductInstanceError::Credentials(ref err) => err.description(),
            ConfirmProductInstanceError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ConfirmProductInstanceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CopyImage
#[derive(Debug, PartialEq)]
pub enum CopyImageError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CopyImageError {
    pub fn from_body(body: &str) -> CopyImageError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CopyImageError::Unknown(String::from(body)),
                }
            }
            Err(_) => CopyImageError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CopyImageError {
    fn from(err: XmlParseError) -> CopyImageError {
        let XmlParseError(message) = err;
        CopyImageError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CopyImageError {
    fn from(err: CredentialsError) -> CopyImageError {
        CopyImageError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CopyImageError {
    fn from(err: HttpDispatchError) -> CopyImageError {
        CopyImageError::HttpDispatch(err)
    }
}
impl From<io::Error> for CopyImageError {
    fn from(err: io::Error) -> CopyImageError {
        CopyImageError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CopyImageError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CopyImageError {
    fn description(&self) -> &str {
        match *self {
            CopyImageError::Validation(ref cause) => cause,
            CopyImageError::Credentials(ref err) => err.description(),
            CopyImageError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CopyImageError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CopySnapshot
#[derive(Debug, PartialEq)]
pub enum CopySnapshotError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CopySnapshotError {
    pub fn from_body(body: &str) -> CopySnapshotError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CopySnapshotError::Unknown(String::from(body)),
                }
            }
            Err(_) => CopySnapshotError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CopySnapshotError {
    fn from(err: XmlParseError) -> CopySnapshotError {
        let XmlParseError(message) = err;
        CopySnapshotError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CopySnapshotError {
    fn from(err: CredentialsError) -> CopySnapshotError {
        CopySnapshotError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CopySnapshotError {
    fn from(err: HttpDispatchError) -> CopySnapshotError {
        CopySnapshotError::HttpDispatch(err)
    }
}
impl From<io::Error> for CopySnapshotError {
    fn from(err: io::Error) -> CopySnapshotError {
        CopySnapshotError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CopySnapshotError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CopySnapshotError {
    fn description(&self) -> &str {
        match *self {
            CopySnapshotError::Validation(ref cause) => cause,
            CopySnapshotError::Credentials(ref err) => err.description(),
            CopySnapshotError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CopySnapshotError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateCustomerGateway
#[derive(Debug, PartialEq)]
pub enum CreateCustomerGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateCustomerGatewayError {
    pub fn from_body(body: &str) -> CreateCustomerGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateCustomerGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateCustomerGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateCustomerGatewayError {
    fn from(err: XmlParseError) -> CreateCustomerGatewayError {
        let XmlParseError(message) = err;
        CreateCustomerGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateCustomerGatewayError {
    fn from(err: CredentialsError) -> CreateCustomerGatewayError {
        CreateCustomerGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateCustomerGatewayError {
    fn from(err: HttpDispatchError) -> CreateCustomerGatewayError {
        CreateCustomerGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateCustomerGatewayError {
    fn from(err: io::Error) -> CreateCustomerGatewayError {
        CreateCustomerGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateCustomerGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateCustomerGatewayError {
    fn description(&self) -> &str {
        match *self {
            CreateCustomerGatewayError::Validation(ref cause) => cause,
            CreateCustomerGatewayError::Credentials(ref err) => err.description(),
            CreateCustomerGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateCustomerGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateDefaultVpc
#[derive(Debug, PartialEq)]
pub enum CreateDefaultVpcError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateDefaultVpcError {
    pub fn from_body(body: &str) -> CreateDefaultVpcError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateDefaultVpcError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateDefaultVpcError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateDefaultVpcError {
    fn from(err: XmlParseError) -> CreateDefaultVpcError {
        let XmlParseError(message) = err;
        CreateDefaultVpcError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateDefaultVpcError {
    fn from(err: CredentialsError) -> CreateDefaultVpcError {
        CreateDefaultVpcError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateDefaultVpcError {
    fn from(err: HttpDispatchError) -> CreateDefaultVpcError {
        CreateDefaultVpcError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateDefaultVpcError {
    fn from(err: io::Error) -> CreateDefaultVpcError {
        CreateDefaultVpcError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateDefaultVpcError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateDefaultVpcError {
    fn description(&self) -> &str {
        match *self {
            CreateDefaultVpcError::Validation(ref cause) => cause,
            CreateDefaultVpcError::Credentials(ref err) => err.description(),
            CreateDefaultVpcError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateDefaultVpcError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateDhcpOptions
#[derive(Debug, PartialEq)]
pub enum CreateDhcpOptionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateDhcpOptionsError {
    pub fn from_body(body: &str) -> CreateDhcpOptionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateDhcpOptionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateDhcpOptionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateDhcpOptionsError {
    fn from(err: XmlParseError) -> CreateDhcpOptionsError {
        let XmlParseError(message) = err;
        CreateDhcpOptionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateDhcpOptionsError {
    fn from(err: CredentialsError) -> CreateDhcpOptionsError {
        CreateDhcpOptionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateDhcpOptionsError {
    fn from(err: HttpDispatchError) -> CreateDhcpOptionsError {
        CreateDhcpOptionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateDhcpOptionsError {
    fn from(err: io::Error) -> CreateDhcpOptionsError {
        CreateDhcpOptionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateDhcpOptionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateDhcpOptionsError {
    fn description(&self) -> &str {
        match *self {
            CreateDhcpOptionsError::Validation(ref cause) => cause,
            CreateDhcpOptionsError::Credentials(ref err) => err.description(),
            CreateDhcpOptionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateDhcpOptionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateEgressOnlyInternetGateway
#[derive(Debug, PartialEq)]
pub enum CreateEgressOnlyInternetGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateEgressOnlyInternetGatewayError {
    pub fn from_body(body: &str) -> CreateEgressOnlyInternetGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateEgressOnlyInternetGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateEgressOnlyInternetGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateEgressOnlyInternetGatewayError {
    fn from(err: XmlParseError) -> CreateEgressOnlyInternetGatewayError {
        let XmlParseError(message) = err;
        CreateEgressOnlyInternetGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateEgressOnlyInternetGatewayError {
    fn from(err: CredentialsError) -> CreateEgressOnlyInternetGatewayError {
        CreateEgressOnlyInternetGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateEgressOnlyInternetGatewayError {
    fn from(err: HttpDispatchError) -> CreateEgressOnlyInternetGatewayError {
        CreateEgressOnlyInternetGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateEgressOnlyInternetGatewayError {
    fn from(err: io::Error) -> CreateEgressOnlyInternetGatewayError {
        CreateEgressOnlyInternetGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateEgressOnlyInternetGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateEgressOnlyInternetGatewayError {
    fn description(&self) -> &str {
        match *self {
            CreateEgressOnlyInternetGatewayError::Validation(ref cause) => cause,
            CreateEgressOnlyInternetGatewayError::Credentials(ref err) => err.description(),
            CreateEgressOnlyInternetGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateEgressOnlyInternetGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateFlowLogs
#[derive(Debug, PartialEq)]
pub enum CreateFlowLogsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateFlowLogsError {
    pub fn from_body(body: &str) -> CreateFlowLogsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateFlowLogsError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateFlowLogsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateFlowLogsError {
    fn from(err: XmlParseError) -> CreateFlowLogsError {
        let XmlParseError(message) = err;
        CreateFlowLogsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateFlowLogsError {
    fn from(err: CredentialsError) -> CreateFlowLogsError {
        CreateFlowLogsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateFlowLogsError {
    fn from(err: HttpDispatchError) -> CreateFlowLogsError {
        CreateFlowLogsError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateFlowLogsError {
    fn from(err: io::Error) -> CreateFlowLogsError {
        CreateFlowLogsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateFlowLogsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateFlowLogsError {
    fn description(&self) -> &str {
        match *self {
            CreateFlowLogsError::Validation(ref cause) => cause,
            CreateFlowLogsError::Credentials(ref err) => err.description(),
            CreateFlowLogsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateFlowLogsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateFpgaImage
#[derive(Debug, PartialEq)]
pub enum CreateFpgaImageError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateFpgaImageError {
    pub fn from_body(body: &str) -> CreateFpgaImageError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateFpgaImageError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateFpgaImageError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateFpgaImageError {
    fn from(err: XmlParseError) -> CreateFpgaImageError {
        let XmlParseError(message) = err;
        CreateFpgaImageError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateFpgaImageError {
    fn from(err: CredentialsError) -> CreateFpgaImageError {
        CreateFpgaImageError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateFpgaImageError {
    fn from(err: HttpDispatchError) -> CreateFpgaImageError {
        CreateFpgaImageError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateFpgaImageError {
    fn from(err: io::Error) -> CreateFpgaImageError {
        CreateFpgaImageError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateFpgaImageError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateFpgaImageError {
    fn description(&self) -> &str {
        match *self {
            CreateFpgaImageError::Validation(ref cause) => cause,
            CreateFpgaImageError::Credentials(ref err) => err.description(),
            CreateFpgaImageError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateFpgaImageError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateImage
#[derive(Debug, PartialEq)]
pub enum CreateImageError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateImageError {
    pub fn from_body(body: &str) -> CreateImageError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateImageError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateImageError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateImageError {
    fn from(err: XmlParseError) -> CreateImageError {
        let XmlParseError(message) = err;
        CreateImageError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateImageError {
    fn from(err: CredentialsError) -> CreateImageError {
        CreateImageError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateImageError {
    fn from(err: HttpDispatchError) -> CreateImageError {
        CreateImageError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateImageError {
    fn from(err: io::Error) -> CreateImageError {
        CreateImageError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateImageError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateImageError {
    fn description(&self) -> &str {
        match *self {
            CreateImageError::Validation(ref cause) => cause,
            CreateImageError::Credentials(ref err) => err.description(),
            CreateImageError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateImageError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateInstanceExportTask
#[derive(Debug, PartialEq)]
pub enum CreateInstanceExportTaskError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateInstanceExportTaskError {
    pub fn from_body(body: &str) -> CreateInstanceExportTaskError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateInstanceExportTaskError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateInstanceExportTaskError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateInstanceExportTaskError {
    fn from(err: XmlParseError) -> CreateInstanceExportTaskError {
        let XmlParseError(message) = err;
        CreateInstanceExportTaskError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateInstanceExportTaskError {
    fn from(err: CredentialsError) -> CreateInstanceExportTaskError {
        CreateInstanceExportTaskError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateInstanceExportTaskError {
    fn from(err: HttpDispatchError) -> CreateInstanceExportTaskError {
        CreateInstanceExportTaskError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateInstanceExportTaskError {
    fn from(err: io::Error) -> CreateInstanceExportTaskError {
        CreateInstanceExportTaskError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateInstanceExportTaskError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateInstanceExportTaskError {
    fn description(&self) -> &str {
        match *self {
            CreateInstanceExportTaskError::Validation(ref cause) => cause,
            CreateInstanceExportTaskError::Credentials(ref err) => err.description(),
            CreateInstanceExportTaskError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateInstanceExportTaskError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateInternetGateway
#[derive(Debug, PartialEq)]
pub enum CreateInternetGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateInternetGatewayError {
    pub fn from_body(body: &str) -> CreateInternetGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateInternetGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateInternetGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateInternetGatewayError {
    fn from(err: XmlParseError) -> CreateInternetGatewayError {
        let XmlParseError(message) = err;
        CreateInternetGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateInternetGatewayError {
    fn from(err: CredentialsError) -> CreateInternetGatewayError {
        CreateInternetGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateInternetGatewayError {
    fn from(err: HttpDispatchError) -> CreateInternetGatewayError {
        CreateInternetGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateInternetGatewayError {
    fn from(err: io::Error) -> CreateInternetGatewayError {
        CreateInternetGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateInternetGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateInternetGatewayError {
    fn description(&self) -> &str {
        match *self {
            CreateInternetGatewayError::Validation(ref cause) => cause,
            CreateInternetGatewayError::Credentials(ref err) => err.description(),
            CreateInternetGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateInternetGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateKeyPair
#[derive(Debug, PartialEq)]
pub enum CreateKeyPairError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateKeyPairError {
    pub fn from_body(body: &str) -> CreateKeyPairError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateKeyPairError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateKeyPairError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateKeyPairError {
    fn from(err: XmlParseError) -> CreateKeyPairError {
        let XmlParseError(message) = err;
        CreateKeyPairError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateKeyPairError {
    fn from(err: CredentialsError) -> CreateKeyPairError {
        CreateKeyPairError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateKeyPairError {
    fn from(err: HttpDispatchError) -> CreateKeyPairError {
        CreateKeyPairError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateKeyPairError {
    fn from(err: io::Error) -> CreateKeyPairError {
        CreateKeyPairError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateKeyPairError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateKeyPairError {
    fn description(&self) -> &str {
        match *self {
            CreateKeyPairError::Validation(ref cause) => cause,
            CreateKeyPairError::Credentials(ref err) => err.description(),
            CreateKeyPairError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateKeyPairError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateNatGateway
#[derive(Debug, PartialEq)]
pub enum CreateNatGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateNatGatewayError {
    pub fn from_body(body: &str) -> CreateNatGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateNatGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateNatGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateNatGatewayError {
    fn from(err: XmlParseError) -> CreateNatGatewayError {
        let XmlParseError(message) = err;
        CreateNatGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateNatGatewayError {
    fn from(err: CredentialsError) -> CreateNatGatewayError {
        CreateNatGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateNatGatewayError {
    fn from(err: HttpDispatchError) -> CreateNatGatewayError {
        CreateNatGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateNatGatewayError {
    fn from(err: io::Error) -> CreateNatGatewayError {
        CreateNatGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateNatGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateNatGatewayError {
    fn description(&self) -> &str {
        match *self {
            CreateNatGatewayError::Validation(ref cause) => cause,
            CreateNatGatewayError::Credentials(ref err) => err.description(),
            CreateNatGatewayError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateNatGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateNetworkAcl
#[derive(Debug, PartialEq)]
pub enum CreateNetworkAclError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateNetworkAclError {
    pub fn from_body(body: &str) -> CreateNetworkAclError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateNetworkAclError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateNetworkAclError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateNetworkAclError {
    fn from(err: XmlParseError) -> CreateNetworkAclError {
        let XmlParseError(message) = err;
        CreateNetworkAclError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateNetworkAclError {
    fn from(err: CredentialsError) -> CreateNetworkAclError {
        CreateNetworkAclError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateNetworkAclError {
    fn from(err: HttpDispatchError) -> CreateNetworkAclError {
        CreateNetworkAclError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateNetworkAclError {
    fn from(err: io::Error) -> CreateNetworkAclError {
        CreateNetworkAclError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateNetworkAclError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateNetworkAclError {
    fn description(&self) -> &str {
        match *self {
            CreateNetworkAclError::Validation(ref cause) => cause,
            CreateNetworkAclError::Credentials(ref err) => err.description(),
            CreateNetworkAclError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateNetworkAclError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateNetworkAclEntry
#[derive(Debug, PartialEq)]
pub enum CreateNetworkAclEntryError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateNetworkAclEntryError {
    pub fn from_body(body: &str) -> CreateNetworkAclEntryError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateNetworkAclEntryError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateNetworkAclEntryError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateNetworkAclEntryError {
    fn from(err: XmlParseError) -> CreateNetworkAclEntryError {
        let XmlParseError(message) = err;
        CreateNetworkAclEntryError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateNetworkAclEntryError {
    fn from(err: CredentialsError) -> CreateNetworkAclEntryError {
        CreateNetworkAclEntryError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateNetworkAclEntryError {
    fn from(err: HttpDispatchError) -> CreateNetworkAclEntryError {
        CreateNetworkAclEntryError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateNetworkAclEntryError {
    fn from(err: io::Error) -> CreateNetworkAclEntryError {
        CreateNetworkAclEntryError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateNetworkAclEntryError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateNetworkAclEntryError {
    fn description(&self) -> &str {
        match *self {
            CreateNetworkAclEntryError::Validation(ref cause) => cause,
            CreateNetworkAclEntryError::Credentials(ref err) => err.description(),
            CreateNetworkAclEntryError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateNetworkAclEntryError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateNetworkInterface
#[derive(Debug, PartialEq)]
pub enum CreateNetworkInterfaceError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateNetworkInterfaceError {
    pub fn from_body(body: &str) -> CreateNetworkInterfaceError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateNetworkInterfaceError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateNetworkInterfaceError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateNetworkInterfaceError {
    fn from(err: XmlParseError) -> CreateNetworkInterfaceError {
        let XmlParseError(message) = err;
        CreateNetworkInterfaceError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateNetworkInterfaceError {
    fn from(err: CredentialsError) -> CreateNetworkInterfaceError {
        CreateNetworkInterfaceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateNetworkInterfaceError {
    fn from(err: HttpDispatchError) -> CreateNetworkInterfaceError {
        CreateNetworkInterfaceError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateNetworkInterfaceError {
    fn from(err: io::Error) -> CreateNetworkInterfaceError {
        CreateNetworkInterfaceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateNetworkInterfaceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateNetworkInterfaceError {
    fn description(&self) -> &str {
        match *self {
            CreateNetworkInterfaceError::Validation(ref cause) => cause,
            CreateNetworkInterfaceError::Credentials(ref err) => err.description(),
            CreateNetworkInterfaceError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateNetworkInterfaceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateNetworkInterfacePermission
#[derive(Debug, PartialEq)]
pub enum CreateNetworkInterfacePermissionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateNetworkInterfacePermissionError {
    pub fn from_body(body: &str) -> CreateNetworkInterfacePermissionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateNetworkInterfacePermissionError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateNetworkInterfacePermissionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateNetworkInterfacePermissionError {
    fn from(err: XmlParseError) -> CreateNetworkInterfacePermissionError {
        let XmlParseError(message) = err;
        CreateNetworkInterfacePermissionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateNetworkInterfacePermissionError {
    fn from(err: CredentialsError) -> CreateNetworkInterfacePermissionError {
        CreateNetworkInterfacePermissionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateNetworkInterfacePermissionError {
    fn from(err: HttpDispatchError) -> CreateNetworkInterfacePermissionError {
        CreateNetworkInterfacePermissionError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateNetworkInterfacePermissionError {
    fn from(err: io::Error) -> CreateNetworkInterfacePermissionError {
        CreateNetworkInterfacePermissionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateNetworkInterfacePermissionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateNetworkInterfacePermissionError {
    fn description(&self) -> &str {
        match *self {
            CreateNetworkInterfacePermissionError::Validation(ref cause) => cause,
            CreateNetworkInterfacePermissionError::Credentials(ref err) => err.description(),
            CreateNetworkInterfacePermissionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateNetworkInterfacePermissionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreatePlacementGroup
#[derive(Debug, PartialEq)]
pub enum CreatePlacementGroupError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreatePlacementGroupError {
    pub fn from_body(body: &str) -> CreatePlacementGroupError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreatePlacementGroupError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreatePlacementGroupError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreatePlacementGroupError {
    fn from(err: XmlParseError) -> CreatePlacementGroupError {
        let XmlParseError(message) = err;
        CreatePlacementGroupError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreatePlacementGroupError {
    fn from(err: CredentialsError) -> CreatePlacementGroupError {
        CreatePlacementGroupError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreatePlacementGroupError {
    fn from(err: HttpDispatchError) -> CreatePlacementGroupError {
        CreatePlacementGroupError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreatePlacementGroupError {
    fn from(err: io::Error) -> CreatePlacementGroupError {
        CreatePlacementGroupError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreatePlacementGroupError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreatePlacementGroupError {
    fn description(&self) -> &str {
        match *self {
            CreatePlacementGroupError::Validation(ref cause) => cause,
            CreatePlacementGroupError::Credentials(ref err) => err.description(),
            CreatePlacementGroupError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreatePlacementGroupError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateReservedInstancesListing
#[derive(Debug, PartialEq)]
pub enum CreateReservedInstancesListingError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateReservedInstancesListingError {
    pub fn from_body(body: &str) -> CreateReservedInstancesListingError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateReservedInstancesListingError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateReservedInstancesListingError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateReservedInstancesListingError {
    fn from(err: XmlParseError) -> CreateReservedInstancesListingError {
        let XmlParseError(message) = err;
        CreateReservedInstancesListingError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateReservedInstancesListingError {
    fn from(err: CredentialsError) -> CreateReservedInstancesListingError {
        CreateReservedInstancesListingError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateReservedInstancesListingError {
    fn from(err: HttpDispatchError) -> CreateReservedInstancesListingError {
        CreateReservedInstancesListingError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateReservedInstancesListingError {
    fn from(err: io::Error) -> CreateReservedInstancesListingError {
        CreateReservedInstancesListingError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateReservedInstancesListingError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateReservedInstancesListingError {
    fn description(&self) -> &str {
        match *self {
            CreateReservedInstancesListingError::Validation(ref cause) => cause,
            CreateReservedInstancesListingError::Credentials(ref err) => err.description(),
            CreateReservedInstancesListingError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateReservedInstancesListingError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateRoute
#[derive(Debug, PartialEq)]
pub enum CreateRouteError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateRouteError {
    pub fn from_body(body: &str) -> CreateRouteError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateRouteError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateRouteError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateRouteError {
    fn from(err: XmlParseError) -> CreateRouteError {
        let XmlParseError(message) = err;
        CreateRouteError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateRouteError {
    fn from(err: CredentialsError) -> CreateRouteError {
        CreateRouteError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateRouteError {
    fn from(err: HttpDispatchError) -> CreateRouteError {
        CreateRouteError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateRouteError {
    fn from(err: io::Error) -> CreateRouteError {
        CreateRouteError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateRouteError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateRouteError {
    fn description(&self) -> &str {
        match *self {
            CreateRouteError::Validation(ref cause) => cause,
            CreateRouteError::Credentials(ref err) => err.description(),
            CreateRouteError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateRouteError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateRouteTable
#[derive(Debug, PartialEq)]
pub enum CreateRouteTableError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateRouteTableError {
    pub fn from_body(body: &str) -> CreateRouteTableError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateRouteTableError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateRouteTableError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateRouteTableError {
    fn from(err: XmlParseError) -> CreateRouteTableError {
        let XmlParseError(message) = err;
        CreateRouteTableError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateRouteTableError {
    fn from(err: CredentialsError) -> CreateRouteTableError {
        CreateRouteTableError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateRouteTableError {
    fn from(err: HttpDispatchError) -> CreateRouteTableError {
        CreateRouteTableError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateRouteTableError {
    fn from(err: io::Error) -> CreateRouteTableError {
        CreateRouteTableError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateRouteTableError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateRouteTableError {
    fn description(&self) -> &str {
        match *self {
            CreateRouteTableError::Validation(ref cause) => cause,
            CreateRouteTableError::Credentials(ref err) => err.description(),
            CreateRouteTableError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateRouteTableError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateSecurityGroup
#[derive(Debug, PartialEq)]
pub enum CreateSecurityGroupError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateSecurityGroupError {
    pub fn from_body(body: &str) -> CreateSecurityGroupError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateSecurityGroupError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateSecurityGroupError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateSecurityGroupError {
    fn from(err: XmlParseError) -> CreateSecurityGroupError {
        let XmlParseError(message) = err;
        CreateSecurityGroupError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateSecurityGroupError {
    fn from(err: CredentialsError) -> CreateSecurityGroupError {
        CreateSecurityGroupError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateSecurityGroupError {
    fn from(err: HttpDispatchError) -> CreateSecurityGroupError {
        CreateSecurityGroupError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateSecurityGroupError {
    fn from(err: io::Error) -> CreateSecurityGroupError {
        CreateSecurityGroupError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateSecurityGroupError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateSecurityGroupError {
    fn description(&self) -> &str {
        match *self {
            CreateSecurityGroupError::Validation(ref cause) => cause,
            CreateSecurityGroupError::Credentials(ref err) => err.description(),
            CreateSecurityGroupError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateSecurityGroupError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateSnapshot
#[derive(Debug, PartialEq)]
pub enum CreateSnapshotError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateSnapshotError {
    pub fn from_body(body: &str) -> CreateSnapshotError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateSnapshotError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateSnapshotError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateSnapshotError {
    fn from(err: XmlParseError) -> CreateSnapshotError {
        let XmlParseError(message) = err;
        CreateSnapshotError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateSnapshotError {
    fn from(err: CredentialsError) -> CreateSnapshotError {
        CreateSnapshotError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateSnapshotError {
    fn from(err: HttpDispatchError) -> CreateSnapshotError {
        CreateSnapshotError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateSnapshotError {
    fn from(err: io::Error) -> CreateSnapshotError {
        CreateSnapshotError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateSnapshotError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateSnapshotError {
    fn description(&self) -> &str {
        match *self {
            CreateSnapshotError::Validation(ref cause) => cause,
            CreateSnapshotError::Credentials(ref err) => err.description(),
            CreateSnapshotError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateSnapshotError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateSpotDatafeedSubscription
#[derive(Debug, PartialEq)]
pub enum CreateSpotDatafeedSubscriptionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateSpotDatafeedSubscriptionError {
    pub fn from_body(body: &str) -> CreateSpotDatafeedSubscriptionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateSpotDatafeedSubscriptionError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateSpotDatafeedSubscriptionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateSpotDatafeedSubscriptionError {
    fn from(err: XmlParseError) -> CreateSpotDatafeedSubscriptionError {
        let XmlParseError(message) = err;
        CreateSpotDatafeedSubscriptionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateSpotDatafeedSubscriptionError {
    fn from(err: CredentialsError) -> CreateSpotDatafeedSubscriptionError {
        CreateSpotDatafeedSubscriptionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateSpotDatafeedSubscriptionError {
    fn from(err: HttpDispatchError) -> CreateSpotDatafeedSubscriptionError {
        CreateSpotDatafeedSubscriptionError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateSpotDatafeedSubscriptionError {
    fn from(err: io::Error) -> CreateSpotDatafeedSubscriptionError {
        CreateSpotDatafeedSubscriptionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateSpotDatafeedSubscriptionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateSpotDatafeedSubscriptionError {
    fn description(&self) -> &str {
        match *self {
            CreateSpotDatafeedSubscriptionError::Validation(ref cause) => cause,
            CreateSpotDatafeedSubscriptionError::Credentials(ref err) => err.description(),
            CreateSpotDatafeedSubscriptionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateSpotDatafeedSubscriptionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateSubnet
#[derive(Debug, PartialEq)]
pub enum CreateSubnetError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateSubnetError {
    pub fn from_body(body: &str) -> CreateSubnetError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateSubnetError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateSubnetError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateSubnetError {
    fn from(err: XmlParseError) -> CreateSubnetError {
        let XmlParseError(message) = err;
        CreateSubnetError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateSubnetError {
    fn from(err: CredentialsError) -> CreateSubnetError {
        CreateSubnetError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateSubnetError {
    fn from(err: HttpDispatchError) -> CreateSubnetError {
        CreateSubnetError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateSubnetError {
    fn from(err: io::Error) -> CreateSubnetError {
        CreateSubnetError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateSubnetError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateSubnetError {
    fn description(&self) -> &str {
        match *self {
            CreateSubnetError::Validation(ref cause) => cause,
            CreateSubnetError::Credentials(ref err) => err.description(),
            CreateSubnetError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateSubnetError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateTags
#[derive(Debug, PartialEq)]
pub enum CreateTagsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateTagsError {
    pub fn from_body(body: &str) -> CreateTagsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateTagsError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateTagsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateTagsError {
    fn from(err: XmlParseError) -> CreateTagsError {
        let XmlParseError(message) = err;
        CreateTagsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateTagsError {
    fn from(err: CredentialsError) -> CreateTagsError {
        CreateTagsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateTagsError {
    fn from(err: HttpDispatchError) -> CreateTagsError {
        CreateTagsError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateTagsError {
    fn from(err: io::Error) -> CreateTagsError {
        CreateTagsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateTagsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateTagsError {
    fn description(&self) -> &str {
        match *self {
            CreateTagsError::Validation(ref cause) => cause,
            CreateTagsError::Credentials(ref err) => err.description(),
            CreateTagsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateTagsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateVolume
#[derive(Debug, PartialEq)]
pub enum CreateVolumeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateVolumeError {
    pub fn from_body(body: &str) -> CreateVolumeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateVolumeError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateVolumeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateVolumeError {
    fn from(err: XmlParseError) -> CreateVolumeError {
        let XmlParseError(message) = err;
        CreateVolumeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateVolumeError {
    fn from(err: CredentialsError) -> CreateVolumeError {
        CreateVolumeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateVolumeError {
    fn from(err: HttpDispatchError) -> CreateVolumeError {
        CreateVolumeError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateVolumeError {
    fn from(err: io::Error) -> CreateVolumeError {
        CreateVolumeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateVolumeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateVolumeError {
    fn description(&self) -> &str {
        match *self {
            CreateVolumeError::Validation(ref cause) => cause,
            CreateVolumeError::Credentials(ref err) => err.description(),
            CreateVolumeError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateVolumeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateVpc
#[derive(Debug, PartialEq)]
pub enum CreateVpcError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateVpcError {
    pub fn from_body(body: &str) -> CreateVpcError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateVpcError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateVpcError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateVpcError {
    fn from(err: XmlParseError) -> CreateVpcError {
        let XmlParseError(message) = err;
        CreateVpcError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateVpcError {
    fn from(err: CredentialsError) -> CreateVpcError {
        CreateVpcError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateVpcError {
    fn from(err: HttpDispatchError) -> CreateVpcError {
        CreateVpcError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateVpcError {
    fn from(err: io::Error) -> CreateVpcError {
        CreateVpcError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateVpcError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateVpcError {
    fn description(&self) -> &str {
        match *self {
            CreateVpcError::Validation(ref cause) => cause,
            CreateVpcError::Credentials(ref err) => err.description(),
            CreateVpcError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateVpcError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateVpcEndpoint
#[derive(Debug, PartialEq)]
pub enum CreateVpcEndpointError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateVpcEndpointError {
    pub fn from_body(body: &str) -> CreateVpcEndpointError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateVpcEndpointError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateVpcEndpointError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateVpcEndpointError {
    fn from(err: XmlParseError) -> CreateVpcEndpointError {
        let XmlParseError(message) = err;
        CreateVpcEndpointError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateVpcEndpointError {
    fn from(err: CredentialsError) -> CreateVpcEndpointError {
        CreateVpcEndpointError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateVpcEndpointError {
    fn from(err: HttpDispatchError) -> CreateVpcEndpointError {
        CreateVpcEndpointError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateVpcEndpointError {
    fn from(err: io::Error) -> CreateVpcEndpointError {
        CreateVpcEndpointError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateVpcEndpointError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateVpcEndpointError {
    fn description(&self) -> &str {
        match *self {
            CreateVpcEndpointError::Validation(ref cause) => cause,
            CreateVpcEndpointError::Credentials(ref err) => err.description(),
            CreateVpcEndpointError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateVpcEndpointError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateVpcPeeringConnection
#[derive(Debug, PartialEq)]
pub enum CreateVpcPeeringConnectionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateVpcPeeringConnectionError {
    pub fn from_body(body: &str) -> CreateVpcPeeringConnectionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateVpcPeeringConnectionError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateVpcPeeringConnectionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateVpcPeeringConnectionError {
    fn from(err: XmlParseError) -> CreateVpcPeeringConnectionError {
        let XmlParseError(message) = err;
        CreateVpcPeeringConnectionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateVpcPeeringConnectionError {
    fn from(err: CredentialsError) -> CreateVpcPeeringConnectionError {
        CreateVpcPeeringConnectionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateVpcPeeringConnectionError {
    fn from(err: HttpDispatchError) -> CreateVpcPeeringConnectionError {
        CreateVpcPeeringConnectionError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateVpcPeeringConnectionError {
    fn from(err: io::Error) -> CreateVpcPeeringConnectionError {
        CreateVpcPeeringConnectionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateVpcPeeringConnectionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateVpcPeeringConnectionError {
    fn description(&self) -> &str {
        match *self {
            CreateVpcPeeringConnectionError::Validation(ref cause) => cause,
            CreateVpcPeeringConnectionError::Credentials(ref err) => err.description(),
            CreateVpcPeeringConnectionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateVpcPeeringConnectionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateVpnConnection
#[derive(Debug, PartialEq)]
pub enum CreateVpnConnectionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateVpnConnectionError {
    pub fn from_body(body: &str) -> CreateVpnConnectionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateVpnConnectionError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateVpnConnectionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateVpnConnectionError {
    fn from(err: XmlParseError) -> CreateVpnConnectionError {
        let XmlParseError(message) = err;
        CreateVpnConnectionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateVpnConnectionError {
    fn from(err: CredentialsError) -> CreateVpnConnectionError {
        CreateVpnConnectionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateVpnConnectionError {
    fn from(err: HttpDispatchError) -> CreateVpnConnectionError {
        CreateVpnConnectionError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateVpnConnectionError {
    fn from(err: io::Error) -> CreateVpnConnectionError {
        CreateVpnConnectionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateVpnConnectionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateVpnConnectionError {
    fn description(&self) -> &str {
        match *self {
            CreateVpnConnectionError::Validation(ref cause) => cause,
            CreateVpnConnectionError::Credentials(ref err) => err.description(),
            CreateVpnConnectionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateVpnConnectionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateVpnConnectionRoute
#[derive(Debug, PartialEq)]
pub enum CreateVpnConnectionRouteError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateVpnConnectionRouteError {
    pub fn from_body(body: &str) -> CreateVpnConnectionRouteError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateVpnConnectionRouteError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateVpnConnectionRouteError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateVpnConnectionRouteError {
    fn from(err: XmlParseError) -> CreateVpnConnectionRouteError {
        let XmlParseError(message) = err;
        CreateVpnConnectionRouteError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateVpnConnectionRouteError {
    fn from(err: CredentialsError) -> CreateVpnConnectionRouteError {
        CreateVpnConnectionRouteError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateVpnConnectionRouteError {
    fn from(err: HttpDispatchError) -> CreateVpnConnectionRouteError {
        CreateVpnConnectionRouteError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateVpnConnectionRouteError {
    fn from(err: io::Error) -> CreateVpnConnectionRouteError {
        CreateVpnConnectionRouteError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateVpnConnectionRouteError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateVpnConnectionRouteError {
    fn description(&self) -> &str {
        match *self {
            CreateVpnConnectionRouteError::Validation(ref cause) => cause,
            CreateVpnConnectionRouteError::Credentials(ref err) => err.description(),
            CreateVpnConnectionRouteError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            CreateVpnConnectionRouteError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by CreateVpnGateway
#[derive(Debug, PartialEq)]
pub enum CreateVpnGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl CreateVpnGatewayError {
    pub fn from_body(body: &str) -> CreateVpnGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => CreateVpnGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => CreateVpnGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for CreateVpnGatewayError {
    fn from(err: XmlParseError) -> CreateVpnGatewayError {
        let XmlParseError(message) = err;
        CreateVpnGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for CreateVpnGatewayError {
    fn from(err: CredentialsError) -> CreateVpnGatewayError {
        CreateVpnGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for CreateVpnGatewayError {
    fn from(err: HttpDispatchError) -> CreateVpnGatewayError {
        CreateVpnGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for CreateVpnGatewayError {
    fn from(err: io::Error) -> CreateVpnGatewayError {
        CreateVpnGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for CreateVpnGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for CreateVpnGatewayError {
    fn description(&self) -> &str {
        match *self {
            CreateVpnGatewayError::Validation(ref cause) => cause,
            CreateVpnGatewayError::Credentials(ref err) => err.description(),
            CreateVpnGatewayError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            CreateVpnGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteCustomerGateway
#[derive(Debug, PartialEq)]
pub enum DeleteCustomerGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteCustomerGatewayError {
    pub fn from_body(body: &str) -> DeleteCustomerGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteCustomerGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteCustomerGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteCustomerGatewayError {
    fn from(err: XmlParseError) -> DeleteCustomerGatewayError {
        let XmlParseError(message) = err;
        DeleteCustomerGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteCustomerGatewayError {
    fn from(err: CredentialsError) -> DeleteCustomerGatewayError {
        DeleteCustomerGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteCustomerGatewayError {
    fn from(err: HttpDispatchError) -> DeleteCustomerGatewayError {
        DeleteCustomerGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteCustomerGatewayError {
    fn from(err: io::Error) -> DeleteCustomerGatewayError {
        DeleteCustomerGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteCustomerGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteCustomerGatewayError {
    fn description(&self) -> &str {
        match *self {
            DeleteCustomerGatewayError::Validation(ref cause) => cause,
            DeleteCustomerGatewayError::Credentials(ref err) => err.description(),
            DeleteCustomerGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteCustomerGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteDhcpOptions
#[derive(Debug, PartialEq)]
pub enum DeleteDhcpOptionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteDhcpOptionsError {
    pub fn from_body(body: &str) -> DeleteDhcpOptionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteDhcpOptionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteDhcpOptionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteDhcpOptionsError {
    fn from(err: XmlParseError) -> DeleteDhcpOptionsError {
        let XmlParseError(message) = err;
        DeleteDhcpOptionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteDhcpOptionsError {
    fn from(err: CredentialsError) -> DeleteDhcpOptionsError {
        DeleteDhcpOptionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteDhcpOptionsError {
    fn from(err: HttpDispatchError) -> DeleteDhcpOptionsError {
        DeleteDhcpOptionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteDhcpOptionsError {
    fn from(err: io::Error) -> DeleteDhcpOptionsError {
        DeleteDhcpOptionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteDhcpOptionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteDhcpOptionsError {
    fn description(&self) -> &str {
        match *self {
            DeleteDhcpOptionsError::Validation(ref cause) => cause,
            DeleteDhcpOptionsError::Credentials(ref err) => err.description(),
            DeleteDhcpOptionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteDhcpOptionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteEgressOnlyInternetGateway
#[derive(Debug, PartialEq)]
pub enum DeleteEgressOnlyInternetGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteEgressOnlyInternetGatewayError {
    pub fn from_body(body: &str) -> DeleteEgressOnlyInternetGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteEgressOnlyInternetGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteEgressOnlyInternetGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteEgressOnlyInternetGatewayError {
    fn from(err: XmlParseError) -> DeleteEgressOnlyInternetGatewayError {
        let XmlParseError(message) = err;
        DeleteEgressOnlyInternetGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteEgressOnlyInternetGatewayError {
    fn from(err: CredentialsError) -> DeleteEgressOnlyInternetGatewayError {
        DeleteEgressOnlyInternetGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteEgressOnlyInternetGatewayError {
    fn from(err: HttpDispatchError) -> DeleteEgressOnlyInternetGatewayError {
        DeleteEgressOnlyInternetGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteEgressOnlyInternetGatewayError {
    fn from(err: io::Error) -> DeleteEgressOnlyInternetGatewayError {
        DeleteEgressOnlyInternetGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteEgressOnlyInternetGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteEgressOnlyInternetGatewayError {
    fn description(&self) -> &str {
        match *self {
            DeleteEgressOnlyInternetGatewayError::Validation(ref cause) => cause,
            DeleteEgressOnlyInternetGatewayError::Credentials(ref err) => err.description(),
            DeleteEgressOnlyInternetGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteEgressOnlyInternetGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteFlowLogs
#[derive(Debug, PartialEq)]
pub enum DeleteFlowLogsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteFlowLogsError {
    pub fn from_body(body: &str) -> DeleteFlowLogsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteFlowLogsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteFlowLogsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteFlowLogsError {
    fn from(err: XmlParseError) -> DeleteFlowLogsError {
        let XmlParseError(message) = err;
        DeleteFlowLogsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteFlowLogsError {
    fn from(err: CredentialsError) -> DeleteFlowLogsError {
        DeleteFlowLogsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteFlowLogsError {
    fn from(err: HttpDispatchError) -> DeleteFlowLogsError {
        DeleteFlowLogsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteFlowLogsError {
    fn from(err: io::Error) -> DeleteFlowLogsError {
        DeleteFlowLogsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteFlowLogsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteFlowLogsError {
    fn description(&self) -> &str {
        match *self {
            DeleteFlowLogsError::Validation(ref cause) => cause,
            DeleteFlowLogsError::Credentials(ref err) => err.description(),
            DeleteFlowLogsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteFlowLogsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteInternetGateway
#[derive(Debug, PartialEq)]
pub enum DeleteInternetGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteInternetGatewayError {
    pub fn from_body(body: &str) -> DeleteInternetGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteInternetGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteInternetGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteInternetGatewayError {
    fn from(err: XmlParseError) -> DeleteInternetGatewayError {
        let XmlParseError(message) = err;
        DeleteInternetGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteInternetGatewayError {
    fn from(err: CredentialsError) -> DeleteInternetGatewayError {
        DeleteInternetGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteInternetGatewayError {
    fn from(err: HttpDispatchError) -> DeleteInternetGatewayError {
        DeleteInternetGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteInternetGatewayError {
    fn from(err: io::Error) -> DeleteInternetGatewayError {
        DeleteInternetGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteInternetGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteInternetGatewayError {
    fn description(&self) -> &str {
        match *self {
            DeleteInternetGatewayError::Validation(ref cause) => cause,
            DeleteInternetGatewayError::Credentials(ref err) => err.description(),
            DeleteInternetGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteInternetGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteKeyPair
#[derive(Debug, PartialEq)]
pub enum DeleteKeyPairError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteKeyPairError {
    pub fn from_body(body: &str) -> DeleteKeyPairError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteKeyPairError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteKeyPairError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteKeyPairError {
    fn from(err: XmlParseError) -> DeleteKeyPairError {
        let XmlParseError(message) = err;
        DeleteKeyPairError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteKeyPairError {
    fn from(err: CredentialsError) -> DeleteKeyPairError {
        DeleteKeyPairError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteKeyPairError {
    fn from(err: HttpDispatchError) -> DeleteKeyPairError {
        DeleteKeyPairError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteKeyPairError {
    fn from(err: io::Error) -> DeleteKeyPairError {
        DeleteKeyPairError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteKeyPairError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteKeyPairError {
    fn description(&self) -> &str {
        match *self {
            DeleteKeyPairError::Validation(ref cause) => cause,
            DeleteKeyPairError::Credentials(ref err) => err.description(),
            DeleteKeyPairError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteKeyPairError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteNatGateway
#[derive(Debug, PartialEq)]
pub enum DeleteNatGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteNatGatewayError {
    pub fn from_body(body: &str) -> DeleteNatGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteNatGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteNatGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteNatGatewayError {
    fn from(err: XmlParseError) -> DeleteNatGatewayError {
        let XmlParseError(message) = err;
        DeleteNatGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteNatGatewayError {
    fn from(err: CredentialsError) -> DeleteNatGatewayError {
        DeleteNatGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteNatGatewayError {
    fn from(err: HttpDispatchError) -> DeleteNatGatewayError {
        DeleteNatGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteNatGatewayError {
    fn from(err: io::Error) -> DeleteNatGatewayError {
        DeleteNatGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteNatGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteNatGatewayError {
    fn description(&self) -> &str {
        match *self {
            DeleteNatGatewayError::Validation(ref cause) => cause,
            DeleteNatGatewayError::Credentials(ref err) => err.description(),
            DeleteNatGatewayError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteNatGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteNetworkAcl
#[derive(Debug, PartialEq)]
pub enum DeleteNetworkAclError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteNetworkAclError {
    pub fn from_body(body: &str) -> DeleteNetworkAclError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteNetworkAclError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteNetworkAclError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteNetworkAclError {
    fn from(err: XmlParseError) -> DeleteNetworkAclError {
        let XmlParseError(message) = err;
        DeleteNetworkAclError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteNetworkAclError {
    fn from(err: CredentialsError) -> DeleteNetworkAclError {
        DeleteNetworkAclError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteNetworkAclError {
    fn from(err: HttpDispatchError) -> DeleteNetworkAclError {
        DeleteNetworkAclError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteNetworkAclError {
    fn from(err: io::Error) -> DeleteNetworkAclError {
        DeleteNetworkAclError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteNetworkAclError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteNetworkAclError {
    fn description(&self) -> &str {
        match *self {
            DeleteNetworkAclError::Validation(ref cause) => cause,
            DeleteNetworkAclError::Credentials(ref err) => err.description(),
            DeleteNetworkAclError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteNetworkAclError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteNetworkAclEntry
#[derive(Debug, PartialEq)]
pub enum DeleteNetworkAclEntryError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteNetworkAclEntryError {
    pub fn from_body(body: &str) -> DeleteNetworkAclEntryError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteNetworkAclEntryError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteNetworkAclEntryError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteNetworkAclEntryError {
    fn from(err: XmlParseError) -> DeleteNetworkAclEntryError {
        let XmlParseError(message) = err;
        DeleteNetworkAclEntryError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteNetworkAclEntryError {
    fn from(err: CredentialsError) -> DeleteNetworkAclEntryError {
        DeleteNetworkAclEntryError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteNetworkAclEntryError {
    fn from(err: HttpDispatchError) -> DeleteNetworkAclEntryError {
        DeleteNetworkAclEntryError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteNetworkAclEntryError {
    fn from(err: io::Error) -> DeleteNetworkAclEntryError {
        DeleteNetworkAclEntryError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteNetworkAclEntryError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteNetworkAclEntryError {
    fn description(&self) -> &str {
        match *self {
            DeleteNetworkAclEntryError::Validation(ref cause) => cause,
            DeleteNetworkAclEntryError::Credentials(ref err) => err.description(),
            DeleteNetworkAclEntryError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteNetworkAclEntryError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteNetworkInterface
#[derive(Debug, PartialEq)]
pub enum DeleteNetworkInterfaceError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteNetworkInterfaceError {
    pub fn from_body(body: &str) -> DeleteNetworkInterfaceError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteNetworkInterfaceError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteNetworkInterfaceError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteNetworkInterfaceError {
    fn from(err: XmlParseError) -> DeleteNetworkInterfaceError {
        let XmlParseError(message) = err;
        DeleteNetworkInterfaceError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteNetworkInterfaceError {
    fn from(err: CredentialsError) -> DeleteNetworkInterfaceError {
        DeleteNetworkInterfaceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteNetworkInterfaceError {
    fn from(err: HttpDispatchError) -> DeleteNetworkInterfaceError {
        DeleteNetworkInterfaceError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteNetworkInterfaceError {
    fn from(err: io::Error) -> DeleteNetworkInterfaceError {
        DeleteNetworkInterfaceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteNetworkInterfaceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteNetworkInterfaceError {
    fn description(&self) -> &str {
        match *self {
            DeleteNetworkInterfaceError::Validation(ref cause) => cause,
            DeleteNetworkInterfaceError::Credentials(ref err) => err.description(),
            DeleteNetworkInterfaceError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteNetworkInterfaceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteNetworkInterfacePermission
#[derive(Debug, PartialEq)]
pub enum DeleteNetworkInterfacePermissionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteNetworkInterfacePermissionError {
    pub fn from_body(body: &str) -> DeleteNetworkInterfacePermissionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteNetworkInterfacePermissionError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteNetworkInterfacePermissionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteNetworkInterfacePermissionError {
    fn from(err: XmlParseError) -> DeleteNetworkInterfacePermissionError {
        let XmlParseError(message) = err;
        DeleteNetworkInterfacePermissionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteNetworkInterfacePermissionError {
    fn from(err: CredentialsError) -> DeleteNetworkInterfacePermissionError {
        DeleteNetworkInterfacePermissionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteNetworkInterfacePermissionError {
    fn from(err: HttpDispatchError) -> DeleteNetworkInterfacePermissionError {
        DeleteNetworkInterfacePermissionError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteNetworkInterfacePermissionError {
    fn from(err: io::Error) -> DeleteNetworkInterfacePermissionError {
        DeleteNetworkInterfacePermissionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteNetworkInterfacePermissionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteNetworkInterfacePermissionError {
    fn description(&self) -> &str {
        match *self {
            DeleteNetworkInterfacePermissionError::Validation(ref cause) => cause,
            DeleteNetworkInterfacePermissionError::Credentials(ref err) => err.description(),
            DeleteNetworkInterfacePermissionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteNetworkInterfacePermissionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeletePlacementGroup
#[derive(Debug, PartialEq)]
pub enum DeletePlacementGroupError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeletePlacementGroupError {
    pub fn from_body(body: &str) -> DeletePlacementGroupError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeletePlacementGroupError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeletePlacementGroupError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeletePlacementGroupError {
    fn from(err: XmlParseError) -> DeletePlacementGroupError {
        let XmlParseError(message) = err;
        DeletePlacementGroupError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeletePlacementGroupError {
    fn from(err: CredentialsError) -> DeletePlacementGroupError {
        DeletePlacementGroupError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeletePlacementGroupError {
    fn from(err: HttpDispatchError) -> DeletePlacementGroupError {
        DeletePlacementGroupError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeletePlacementGroupError {
    fn from(err: io::Error) -> DeletePlacementGroupError {
        DeletePlacementGroupError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeletePlacementGroupError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeletePlacementGroupError {
    fn description(&self) -> &str {
        match *self {
            DeletePlacementGroupError::Validation(ref cause) => cause,
            DeletePlacementGroupError::Credentials(ref err) => err.description(),
            DeletePlacementGroupError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeletePlacementGroupError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteRoute
#[derive(Debug, PartialEq)]
pub enum DeleteRouteError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteRouteError {
    pub fn from_body(body: &str) -> DeleteRouteError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteRouteError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteRouteError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteRouteError {
    fn from(err: XmlParseError) -> DeleteRouteError {
        let XmlParseError(message) = err;
        DeleteRouteError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteRouteError {
    fn from(err: CredentialsError) -> DeleteRouteError {
        DeleteRouteError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteRouteError {
    fn from(err: HttpDispatchError) -> DeleteRouteError {
        DeleteRouteError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteRouteError {
    fn from(err: io::Error) -> DeleteRouteError {
        DeleteRouteError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteRouteError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteRouteError {
    fn description(&self) -> &str {
        match *self {
            DeleteRouteError::Validation(ref cause) => cause,
            DeleteRouteError::Credentials(ref err) => err.description(),
            DeleteRouteError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteRouteError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteRouteTable
#[derive(Debug, PartialEq)]
pub enum DeleteRouteTableError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteRouteTableError {
    pub fn from_body(body: &str) -> DeleteRouteTableError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteRouteTableError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteRouteTableError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteRouteTableError {
    fn from(err: XmlParseError) -> DeleteRouteTableError {
        let XmlParseError(message) = err;
        DeleteRouteTableError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteRouteTableError {
    fn from(err: CredentialsError) -> DeleteRouteTableError {
        DeleteRouteTableError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteRouteTableError {
    fn from(err: HttpDispatchError) -> DeleteRouteTableError {
        DeleteRouteTableError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteRouteTableError {
    fn from(err: io::Error) -> DeleteRouteTableError {
        DeleteRouteTableError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteRouteTableError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteRouteTableError {
    fn description(&self) -> &str {
        match *self {
            DeleteRouteTableError::Validation(ref cause) => cause,
            DeleteRouteTableError::Credentials(ref err) => err.description(),
            DeleteRouteTableError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteRouteTableError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteSecurityGroup
#[derive(Debug, PartialEq)]
pub enum DeleteSecurityGroupError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteSecurityGroupError {
    pub fn from_body(body: &str) -> DeleteSecurityGroupError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteSecurityGroupError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteSecurityGroupError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteSecurityGroupError {
    fn from(err: XmlParseError) -> DeleteSecurityGroupError {
        let XmlParseError(message) = err;
        DeleteSecurityGroupError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteSecurityGroupError {
    fn from(err: CredentialsError) -> DeleteSecurityGroupError {
        DeleteSecurityGroupError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteSecurityGroupError {
    fn from(err: HttpDispatchError) -> DeleteSecurityGroupError {
        DeleteSecurityGroupError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteSecurityGroupError {
    fn from(err: io::Error) -> DeleteSecurityGroupError {
        DeleteSecurityGroupError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteSecurityGroupError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteSecurityGroupError {
    fn description(&self) -> &str {
        match *self {
            DeleteSecurityGroupError::Validation(ref cause) => cause,
            DeleteSecurityGroupError::Credentials(ref err) => err.description(),
            DeleteSecurityGroupError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteSecurityGroupError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteSnapshot
#[derive(Debug, PartialEq)]
pub enum DeleteSnapshotError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteSnapshotError {
    pub fn from_body(body: &str) -> DeleteSnapshotError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteSnapshotError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteSnapshotError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteSnapshotError {
    fn from(err: XmlParseError) -> DeleteSnapshotError {
        let XmlParseError(message) = err;
        DeleteSnapshotError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteSnapshotError {
    fn from(err: CredentialsError) -> DeleteSnapshotError {
        DeleteSnapshotError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteSnapshotError {
    fn from(err: HttpDispatchError) -> DeleteSnapshotError {
        DeleteSnapshotError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteSnapshotError {
    fn from(err: io::Error) -> DeleteSnapshotError {
        DeleteSnapshotError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteSnapshotError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteSnapshotError {
    fn description(&self) -> &str {
        match *self {
            DeleteSnapshotError::Validation(ref cause) => cause,
            DeleteSnapshotError::Credentials(ref err) => err.description(),
            DeleteSnapshotError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteSnapshotError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteSpotDatafeedSubscription
#[derive(Debug, PartialEq)]
pub enum DeleteSpotDatafeedSubscriptionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteSpotDatafeedSubscriptionError {
    pub fn from_body(body: &str) -> DeleteSpotDatafeedSubscriptionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteSpotDatafeedSubscriptionError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteSpotDatafeedSubscriptionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteSpotDatafeedSubscriptionError {
    fn from(err: XmlParseError) -> DeleteSpotDatafeedSubscriptionError {
        let XmlParseError(message) = err;
        DeleteSpotDatafeedSubscriptionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteSpotDatafeedSubscriptionError {
    fn from(err: CredentialsError) -> DeleteSpotDatafeedSubscriptionError {
        DeleteSpotDatafeedSubscriptionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteSpotDatafeedSubscriptionError {
    fn from(err: HttpDispatchError) -> DeleteSpotDatafeedSubscriptionError {
        DeleteSpotDatafeedSubscriptionError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteSpotDatafeedSubscriptionError {
    fn from(err: io::Error) -> DeleteSpotDatafeedSubscriptionError {
        DeleteSpotDatafeedSubscriptionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteSpotDatafeedSubscriptionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteSpotDatafeedSubscriptionError {
    fn description(&self) -> &str {
        match *self {
            DeleteSpotDatafeedSubscriptionError::Validation(ref cause) => cause,
            DeleteSpotDatafeedSubscriptionError::Credentials(ref err) => err.description(),
            DeleteSpotDatafeedSubscriptionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteSpotDatafeedSubscriptionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteSubnet
#[derive(Debug, PartialEq)]
pub enum DeleteSubnetError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteSubnetError {
    pub fn from_body(body: &str) -> DeleteSubnetError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteSubnetError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteSubnetError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteSubnetError {
    fn from(err: XmlParseError) -> DeleteSubnetError {
        let XmlParseError(message) = err;
        DeleteSubnetError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteSubnetError {
    fn from(err: CredentialsError) -> DeleteSubnetError {
        DeleteSubnetError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteSubnetError {
    fn from(err: HttpDispatchError) -> DeleteSubnetError {
        DeleteSubnetError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteSubnetError {
    fn from(err: io::Error) -> DeleteSubnetError {
        DeleteSubnetError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteSubnetError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteSubnetError {
    fn description(&self) -> &str {
        match *self {
            DeleteSubnetError::Validation(ref cause) => cause,
            DeleteSubnetError::Credentials(ref err) => err.description(),
            DeleteSubnetError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteSubnetError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteTags
#[derive(Debug, PartialEq)]
pub enum DeleteTagsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteTagsError {
    pub fn from_body(body: &str) -> DeleteTagsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteTagsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteTagsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteTagsError {
    fn from(err: XmlParseError) -> DeleteTagsError {
        let XmlParseError(message) = err;
        DeleteTagsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteTagsError {
    fn from(err: CredentialsError) -> DeleteTagsError {
        DeleteTagsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteTagsError {
    fn from(err: HttpDispatchError) -> DeleteTagsError {
        DeleteTagsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteTagsError {
    fn from(err: io::Error) -> DeleteTagsError {
        DeleteTagsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteTagsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteTagsError {
    fn description(&self) -> &str {
        match *self {
            DeleteTagsError::Validation(ref cause) => cause,
            DeleteTagsError::Credentials(ref err) => err.description(),
            DeleteTagsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteTagsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteVolume
#[derive(Debug, PartialEq)]
pub enum DeleteVolumeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteVolumeError {
    pub fn from_body(body: &str) -> DeleteVolumeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteVolumeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteVolumeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteVolumeError {
    fn from(err: XmlParseError) -> DeleteVolumeError {
        let XmlParseError(message) = err;
        DeleteVolumeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteVolumeError {
    fn from(err: CredentialsError) -> DeleteVolumeError {
        DeleteVolumeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteVolumeError {
    fn from(err: HttpDispatchError) -> DeleteVolumeError {
        DeleteVolumeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteVolumeError {
    fn from(err: io::Error) -> DeleteVolumeError {
        DeleteVolumeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteVolumeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteVolumeError {
    fn description(&self) -> &str {
        match *self {
            DeleteVolumeError::Validation(ref cause) => cause,
            DeleteVolumeError::Credentials(ref err) => err.description(),
            DeleteVolumeError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteVolumeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteVpc
#[derive(Debug, PartialEq)]
pub enum DeleteVpcError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteVpcError {
    pub fn from_body(body: &str) -> DeleteVpcError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteVpcError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteVpcError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteVpcError {
    fn from(err: XmlParseError) -> DeleteVpcError {
        let XmlParseError(message) = err;
        DeleteVpcError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteVpcError {
    fn from(err: CredentialsError) -> DeleteVpcError {
        DeleteVpcError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteVpcError {
    fn from(err: HttpDispatchError) -> DeleteVpcError {
        DeleteVpcError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteVpcError {
    fn from(err: io::Error) -> DeleteVpcError {
        DeleteVpcError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteVpcError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteVpcError {
    fn description(&self) -> &str {
        match *self {
            DeleteVpcError::Validation(ref cause) => cause,
            DeleteVpcError::Credentials(ref err) => err.description(),
            DeleteVpcError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteVpcError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteVpcEndpoints
#[derive(Debug, PartialEq)]
pub enum DeleteVpcEndpointsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteVpcEndpointsError {
    pub fn from_body(body: &str) -> DeleteVpcEndpointsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteVpcEndpointsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteVpcEndpointsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteVpcEndpointsError {
    fn from(err: XmlParseError) -> DeleteVpcEndpointsError {
        let XmlParseError(message) = err;
        DeleteVpcEndpointsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteVpcEndpointsError {
    fn from(err: CredentialsError) -> DeleteVpcEndpointsError {
        DeleteVpcEndpointsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteVpcEndpointsError {
    fn from(err: HttpDispatchError) -> DeleteVpcEndpointsError {
        DeleteVpcEndpointsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteVpcEndpointsError {
    fn from(err: io::Error) -> DeleteVpcEndpointsError {
        DeleteVpcEndpointsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteVpcEndpointsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteVpcEndpointsError {
    fn description(&self) -> &str {
        match *self {
            DeleteVpcEndpointsError::Validation(ref cause) => cause,
            DeleteVpcEndpointsError::Credentials(ref err) => err.description(),
            DeleteVpcEndpointsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteVpcEndpointsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteVpcPeeringConnection
#[derive(Debug, PartialEq)]
pub enum DeleteVpcPeeringConnectionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteVpcPeeringConnectionError {
    pub fn from_body(body: &str) -> DeleteVpcPeeringConnectionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteVpcPeeringConnectionError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteVpcPeeringConnectionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteVpcPeeringConnectionError {
    fn from(err: XmlParseError) -> DeleteVpcPeeringConnectionError {
        let XmlParseError(message) = err;
        DeleteVpcPeeringConnectionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteVpcPeeringConnectionError {
    fn from(err: CredentialsError) -> DeleteVpcPeeringConnectionError {
        DeleteVpcPeeringConnectionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteVpcPeeringConnectionError {
    fn from(err: HttpDispatchError) -> DeleteVpcPeeringConnectionError {
        DeleteVpcPeeringConnectionError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteVpcPeeringConnectionError {
    fn from(err: io::Error) -> DeleteVpcPeeringConnectionError {
        DeleteVpcPeeringConnectionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteVpcPeeringConnectionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteVpcPeeringConnectionError {
    fn description(&self) -> &str {
        match *self {
            DeleteVpcPeeringConnectionError::Validation(ref cause) => cause,
            DeleteVpcPeeringConnectionError::Credentials(ref err) => err.description(),
            DeleteVpcPeeringConnectionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteVpcPeeringConnectionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteVpnConnection
#[derive(Debug, PartialEq)]
pub enum DeleteVpnConnectionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteVpnConnectionError {
    pub fn from_body(body: &str) -> DeleteVpnConnectionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteVpnConnectionError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteVpnConnectionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteVpnConnectionError {
    fn from(err: XmlParseError) -> DeleteVpnConnectionError {
        let XmlParseError(message) = err;
        DeleteVpnConnectionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteVpnConnectionError {
    fn from(err: CredentialsError) -> DeleteVpnConnectionError {
        DeleteVpnConnectionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteVpnConnectionError {
    fn from(err: HttpDispatchError) -> DeleteVpnConnectionError {
        DeleteVpnConnectionError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteVpnConnectionError {
    fn from(err: io::Error) -> DeleteVpnConnectionError {
        DeleteVpnConnectionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteVpnConnectionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteVpnConnectionError {
    fn description(&self) -> &str {
        match *self {
            DeleteVpnConnectionError::Validation(ref cause) => cause,
            DeleteVpnConnectionError::Credentials(ref err) => err.description(),
            DeleteVpnConnectionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteVpnConnectionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteVpnConnectionRoute
#[derive(Debug, PartialEq)]
pub enum DeleteVpnConnectionRouteError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteVpnConnectionRouteError {
    pub fn from_body(body: &str) -> DeleteVpnConnectionRouteError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteVpnConnectionRouteError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteVpnConnectionRouteError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteVpnConnectionRouteError {
    fn from(err: XmlParseError) -> DeleteVpnConnectionRouteError {
        let XmlParseError(message) = err;
        DeleteVpnConnectionRouteError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteVpnConnectionRouteError {
    fn from(err: CredentialsError) -> DeleteVpnConnectionRouteError {
        DeleteVpnConnectionRouteError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteVpnConnectionRouteError {
    fn from(err: HttpDispatchError) -> DeleteVpnConnectionRouteError {
        DeleteVpnConnectionRouteError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteVpnConnectionRouteError {
    fn from(err: io::Error) -> DeleteVpnConnectionRouteError {
        DeleteVpnConnectionRouteError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteVpnConnectionRouteError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteVpnConnectionRouteError {
    fn description(&self) -> &str {
        match *self {
            DeleteVpnConnectionRouteError::Validation(ref cause) => cause,
            DeleteVpnConnectionRouteError::Credentials(ref err) => err.description(),
            DeleteVpnConnectionRouteError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteVpnConnectionRouteError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteVpnGateway
#[derive(Debug, PartialEq)]
pub enum DeleteVpnGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteVpnGatewayError {
    pub fn from_body(body: &str) -> DeleteVpnGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeleteVpnGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteVpnGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeleteVpnGatewayError {
    fn from(err: XmlParseError) -> DeleteVpnGatewayError {
        let XmlParseError(message) = err;
        DeleteVpnGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeleteVpnGatewayError {
    fn from(err: CredentialsError) -> DeleteVpnGatewayError {
        DeleteVpnGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteVpnGatewayError {
    fn from(err: HttpDispatchError) -> DeleteVpnGatewayError {
        DeleteVpnGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteVpnGatewayError {
    fn from(err: io::Error) -> DeleteVpnGatewayError {
        DeleteVpnGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteVpnGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteVpnGatewayError {
    fn description(&self) -> &str {
        match *self {
            DeleteVpnGatewayError::Validation(ref cause) => cause,
            DeleteVpnGatewayError::Credentials(ref err) => err.description(),
            DeleteVpnGatewayError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteVpnGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeregisterImage
#[derive(Debug, PartialEq)]
pub enum DeregisterImageError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeregisterImageError {
    pub fn from_body(body: &str) -> DeregisterImageError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DeregisterImageError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeregisterImageError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DeregisterImageError {
    fn from(err: XmlParseError) -> DeregisterImageError {
        let XmlParseError(message) = err;
        DeregisterImageError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DeregisterImageError {
    fn from(err: CredentialsError) -> DeregisterImageError {
        DeregisterImageError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeregisterImageError {
    fn from(err: HttpDispatchError) -> DeregisterImageError {
        DeregisterImageError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeregisterImageError {
    fn from(err: io::Error) -> DeregisterImageError {
        DeregisterImageError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeregisterImageError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeregisterImageError {
    fn description(&self) -> &str {
        match *self {
            DeregisterImageError::Validation(ref cause) => cause,
            DeregisterImageError::Credentials(ref err) => err.description(),
            DeregisterImageError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeregisterImageError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeAccountAttributes
#[derive(Debug, PartialEq)]
pub enum DescribeAccountAttributesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeAccountAttributesError {
    pub fn from_body(body: &str) -> DescribeAccountAttributesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeAccountAttributesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeAccountAttributesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeAccountAttributesError {
    fn from(err: XmlParseError) -> DescribeAccountAttributesError {
        let XmlParseError(message) = err;
        DescribeAccountAttributesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeAccountAttributesError {
    fn from(err: CredentialsError) -> DescribeAccountAttributesError {
        DescribeAccountAttributesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeAccountAttributesError {
    fn from(err: HttpDispatchError) -> DescribeAccountAttributesError {
        DescribeAccountAttributesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeAccountAttributesError {
    fn from(err: io::Error) -> DescribeAccountAttributesError {
        DescribeAccountAttributesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeAccountAttributesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeAccountAttributesError {
    fn description(&self) -> &str {
        match *self {
            DescribeAccountAttributesError::Validation(ref cause) => cause,
            DescribeAccountAttributesError::Credentials(ref err) => err.description(),
            DescribeAccountAttributesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeAccountAttributesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeAddresses
#[derive(Debug, PartialEq)]
pub enum DescribeAddressesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeAddressesError {
    pub fn from_body(body: &str) -> DescribeAddressesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeAddressesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeAddressesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeAddressesError {
    fn from(err: XmlParseError) -> DescribeAddressesError {
        let XmlParseError(message) = err;
        DescribeAddressesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeAddressesError {
    fn from(err: CredentialsError) -> DescribeAddressesError {
        DescribeAddressesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeAddressesError {
    fn from(err: HttpDispatchError) -> DescribeAddressesError {
        DescribeAddressesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeAddressesError {
    fn from(err: io::Error) -> DescribeAddressesError {
        DescribeAddressesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeAddressesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeAddressesError {
    fn description(&self) -> &str {
        match *self {
            DescribeAddressesError::Validation(ref cause) => cause,
            DescribeAddressesError::Credentials(ref err) => err.description(),
            DescribeAddressesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeAddressesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeAvailabilityZones
#[derive(Debug, PartialEq)]
pub enum DescribeAvailabilityZonesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeAvailabilityZonesError {
    pub fn from_body(body: &str) -> DescribeAvailabilityZonesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeAvailabilityZonesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeAvailabilityZonesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeAvailabilityZonesError {
    fn from(err: XmlParseError) -> DescribeAvailabilityZonesError {
        let XmlParseError(message) = err;
        DescribeAvailabilityZonesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeAvailabilityZonesError {
    fn from(err: CredentialsError) -> DescribeAvailabilityZonesError {
        DescribeAvailabilityZonesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeAvailabilityZonesError {
    fn from(err: HttpDispatchError) -> DescribeAvailabilityZonesError {
        DescribeAvailabilityZonesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeAvailabilityZonesError {
    fn from(err: io::Error) -> DescribeAvailabilityZonesError {
        DescribeAvailabilityZonesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeAvailabilityZonesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeAvailabilityZonesError {
    fn description(&self) -> &str {
        match *self {
            DescribeAvailabilityZonesError::Validation(ref cause) => cause,
            DescribeAvailabilityZonesError::Credentials(ref err) => err.description(),
            DescribeAvailabilityZonesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeAvailabilityZonesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeBundleTasks
#[derive(Debug, PartialEq)]
pub enum DescribeBundleTasksError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeBundleTasksError {
    pub fn from_body(body: &str) -> DescribeBundleTasksError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeBundleTasksError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeBundleTasksError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeBundleTasksError {
    fn from(err: XmlParseError) -> DescribeBundleTasksError {
        let XmlParseError(message) = err;
        DescribeBundleTasksError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeBundleTasksError {
    fn from(err: CredentialsError) -> DescribeBundleTasksError {
        DescribeBundleTasksError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeBundleTasksError {
    fn from(err: HttpDispatchError) -> DescribeBundleTasksError {
        DescribeBundleTasksError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeBundleTasksError {
    fn from(err: io::Error) -> DescribeBundleTasksError {
        DescribeBundleTasksError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeBundleTasksError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeBundleTasksError {
    fn description(&self) -> &str {
        match *self {
            DescribeBundleTasksError::Validation(ref cause) => cause,
            DescribeBundleTasksError::Credentials(ref err) => err.description(),
            DescribeBundleTasksError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeBundleTasksError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeClassicLinkInstances
#[derive(Debug, PartialEq)]
pub enum DescribeClassicLinkInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeClassicLinkInstancesError {
    pub fn from_body(body: &str) -> DescribeClassicLinkInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeClassicLinkInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeClassicLinkInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeClassicLinkInstancesError {
    fn from(err: XmlParseError) -> DescribeClassicLinkInstancesError {
        let XmlParseError(message) = err;
        DescribeClassicLinkInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeClassicLinkInstancesError {
    fn from(err: CredentialsError) -> DescribeClassicLinkInstancesError {
        DescribeClassicLinkInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeClassicLinkInstancesError {
    fn from(err: HttpDispatchError) -> DescribeClassicLinkInstancesError {
        DescribeClassicLinkInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeClassicLinkInstancesError {
    fn from(err: io::Error) -> DescribeClassicLinkInstancesError {
        DescribeClassicLinkInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeClassicLinkInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeClassicLinkInstancesError {
    fn description(&self) -> &str {
        match *self {
            DescribeClassicLinkInstancesError::Validation(ref cause) => cause,
            DescribeClassicLinkInstancesError::Credentials(ref err) => err.description(),
            DescribeClassicLinkInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeClassicLinkInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeConversionTasks
#[derive(Debug, PartialEq)]
pub enum DescribeConversionTasksError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeConversionTasksError {
    pub fn from_body(body: &str) -> DescribeConversionTasksError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeConversionTasksError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeConversionTasksError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeConversionTasksError {
    fn from(err: XmlParseError) -> DescribeConversionTasksError {
        let XmlParseError(message) = err;
        DescribeConversionTasksError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeConversionTasksError {
    fn from(err: CredentialsError) -> DescribeConversionTasksError {
        DescribeConversionTasksError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeConversionTasksError {
    fn from(err: HttpDispatchError) -> DescribeConversionTasksError {
        DescribeConversionTasksError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeConversionTasksError {
    fn from(err: io::Error) -> DescribeConversionTasksError {
        DescribeConversionTasksError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeConversionTasksError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeConversionTasksError {
    fn description(&self) -> &str {
        match *self {
            DescribeConversionTasksError::Validation(ref cause) => cause,
            DescribeConversionTasksError::Credentials(ref err) => err.description(),
            DescribeConversionTasksError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeConversionTasksError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeCustomerGateways
#[derive(Debug, PartialEq)]
pub enum DescribeCustomerGatewaysError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeCustomerGatewaysError {
    pub fn from_body(body: &str) -> DescribeCustomerGatewaysError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeCustomerGatewaysError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeCustomerGatewaysError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeCustomerGatewaysError {
    fn from(err: XmlParseError) -> DescribeCustomerGatewaysError {
        let XmlParseError(message) = err;
        DescribeCustomerGatewaysError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeCustomerGatewaysError {
    fn from(err: CredentialsError) -> DescribeCustomerGatewaysError {
        DescribeCustomerGatewaysError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeCustomerGatewaysError {
    fn from(err: HttpDispatchError) -> DescribeCustomerGatewaysError {
        DescribeCustomerGatewaysError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeCustomerGatewaysError {
    fn from(err: io::Error) -> DescribeCustomerGatewaysError {
        DescribeCustomerGatewaysError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeCustomerGatewaysError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeCustomerGatewaysError {
    fn description(&self) -> &str {
        match *self {
            DescribeCustomerGatewaysError::Validation(ref cause) => cause,
            DescribeCustomerGatewaysError::Credentials(ref err) => err.description(),
            DescribeCustomerGatewaysError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeCustomerGatewaysError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeDhcpOptions
#[derive(Debug, PartialEq)]
pub enum DescribeDhcpOptionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeDhcpOptionsError {
    pub fn from_body(body: &str) -> DescribeDhcpOptionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeDhcpOptionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeDhcpOptionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeDhcpOptionsError {
    fn from(err: XmlParseError) -> DescribeDhcpOptionsError {
        let XmlParseError(message) = err;
        DescribeDhcpOptionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeDhcpOptionsError {
    fn from(err: CredentialsError) -> DescribeDhcpOptionsError {
        DescribeDhcpOptionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeDhcpOptionsError {
    fn from(err: HttpDispatchError) -> DescribeDhcpOptionsError {
        DescribeDhcpOptionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeDhcpOptionsError {
    fn from(err: io::Error) -> DescribeDhcpOptionsError {
        DescribeDhcpOptionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeDhcpOptionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeDhcpOptionsError {
    fn description(&self) -> &str {
        match *self {
            DescribeDhcpOptionsError::Validation(ref cause) => cause,
            DescribeDhcpOptionsError::Credentials(ref err) => err.description(),
            DescribeDhcpOptionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeDhcpOptionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeEgressOnlyInternetGateways
#[derive(Debug, PartialEq)]
pub enum DescribeEgressOnlyInternetGatewaysError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeEgressOnlyInternetGatewaysError {
    pub fn from_body(body: &str) -> DescribeEgressOnlyInternetGatewaysError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeEgressOnlyInternetGatewaysError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeEgressOnlyInternetGatewaysError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeEgressOnlyInternetGatewaysError {
    fn from(err: XmlParseError) -> DescribeEgressOnlyInternetGatewaysError {
        let XmlParseError(message) = err;
        DescribeEgressOnlyInternetGatewaysError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeEgressOnlyInternetGatewaysError {
    fn from(err: CredentialsError) -> DescribeEgressOnlyInternetGatewaysError {
        DescribeEgressOnlyInternetGatewaysError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeEgressOnlyInternetGatewaysError {
    fn from(err: HttpDispatchError) -> DescribeEgressOnlyInternetGatewaysError {
        DescribeEgressOnlyInternetGatewaysError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeEgressOnlyInternetGatewaysError {
    fn from(err: io::Error) -> DescribeEgressOnlyInternetGatewaysError {
        DescribeEgressOnlyInternetGatewaysError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeEgressOnlyInternetGatewaysError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeEgressOnlyInternetGatewaysError {
    fn description(&self) -> &str {
        match *self {
            DescribeEgressOnlyInternetGatewaysError::Validation(ref cause) => cause,
            DescribeEgressOnlyInternetGatewaysError::Credentials(ref err) => err.description(),
            DescribeEgressOnlyInternetGatewaysError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeEgressOnlyInternetGatewaysError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeElasticGpus
#[derive(Debug, PartialEq)]
pub enum DescribeElasticGpusError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeElasticGpusError {
    pub fn from_body(body: &str) -> DescribeElasticGpusError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeElasticGpusError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeElasticGpusError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeElasticGpusError {
    fn from(err: XmlParseError) -> DescribeElasticGpusError {
        let XmlParseError(message) = err;
        DescribeElasticGpusError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeElasticGpusError {
    fn from(err: CredentialsError) -> DescribeElasticGpusError {
        DescribeElasticGpusError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeElasticGpusError {
    fn from(err: HttpDispatchError) -> DescribeElasticGpusError {
        DescribeElasticGpusError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeElasticGpusError {
    fn from(err: io::Error) -> DescribeElasticGpusError {
        DescribeElasticGpusError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeElasticGpusError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeElasticGpusError {
    fn description(&self) -> &str {
        match *self {
            DescribeElasticGpusError::Validation(ref cause) => cause,
            DescribeElasticGpusError::Credentials(ref err) => err.description(),
            DescribeElasticGpusError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeElasticGpusError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeExportTasks
#[derive(Debug, PartialEq)]
pub enum DescribeExportTasksError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeExportTasksError {
    pub fn from_body(body: &str) -> DescribeExportTasksError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeExportTasksError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeExportTasksError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeExportTasksError {
    fn from(err: XmlParseError) -> DescribeExportTasksError {
        let XmlParseError(message) = err;
        DescribeExportTasksError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeExportTasksError {
    fn from(err: CredentialsError) -> DescribeExportTasksError {
        DescribeExportTasksError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeExportTasksError {
    fn from(err: HttpDispatchError) -> DescribeExportTasksError {
        DescribeExportTasksError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeExportTasksError {
    fn from(err: io::Error) -> DescribeExportTasksError {
        DescribeExportTasksError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeExportTasksError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeExportTasksError {
    fn description(&self) -> &str {
        match *self {
            DescribeExportTasksError::Validation(ref cause) => cause,
            DescribeExportTasksError::Credentials(ref err) => err.description(),
            DescribeExportTasksError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeExportTasksError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeFlowLogs
#[derive(Debug, PartialEq)]
pub enum DescribeFlowLogsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeFlowLogsError {
    pub fn from_body(body: &str) -> DescribeFlowLogsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeFlowLogsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeFlowLogsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeFlowLogsError {
    fn from(err: XmlParseError) -> DescribeFlowLogsError {
        let XmlParseError(message) = err;
        DescribeFlowLogsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeFlowLogsError {
    fn from(err: CredentialsError) -> DescribeFlowLogsError {
        DescribeFlowLogsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeFlowLogsError {
    fn from(err: HttpDispatchError) -> DescribeFlowLogsError {
        DescribeFlowLogsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeFlowLogsError {
    fn from(err: io::Error) -> DescribeFlowLogsError {
        DescribeFlowLogsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeFlowLogsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeFlowLogsError {
    fn description(&self) -> &str {
        match *self {
            DescribeFlowLogsError::Validation(ref cause) => cause,
            DescribeFlowLogsError::Credentials(ref err) => err.description(),
            DescribeFlowLogsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeFlowLogsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeFpgaImages
#[derive(Debug, PartialEq)]
pub enum DescribeFpgaImagesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeFpgaImagesError {
    pub fn from_body(body: &str) -> DescribeFpgaImagesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeFpgaImagesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeFpgaImagesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeFpgaImagesError {
    fn from(err: XmlParseError) -> DescribeFpgaImagesError {
        let XmlParseError(message) = err;
        DescribeFpgaImagesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeFpgaImagesError {
    fn from(err: CredentialsError) -> DescribeFpgaImagesError {
        DescribeFpgaImagesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeFpgaImagesError {
    fn from(err: HttpDispatchError) -> DescribeFpgaImagesError {
        DescribeFpgaImagesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeFpgaImagesError {
    fn from(err: io::Error) -> DescribeFpgaImagesError {
        DescribeFpgaImagesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeFpgaImagesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeFpgaImagesError {
    fn description(&self) -> &str {
        match *self {
            DescribeFpgaImagesError::Validation(ref cause) => cause,
            DescribeFpgaImagesError::Credentials(ref err) => err.description(),
            DescribeFpgaImagesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeFpgaImagesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeHostReservationOfferings
#[derive(Debug, PartialEq)]
pub enum DescribeHostReservationOfferingsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeHostReservationOfferingsError {
    pub fn from_body(body: &str) -> DescribeHostReservationOfferingsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeHostReservationOfferingsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeHostReservationOfferingsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeHostReservationOfferingsError {
    fn from(err: XmlParseError) -> DescribeHostReservationOfferingsError {
        let XmlParseError(message) = err;
        DescribeHostReservationOfferingsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeHostReservationOfferingsError {
    fn from(err: CredentialsError) -> DescribeHostReservationOfferingsError {
        DescribeHostReservationOfferingsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeHostReservationOfferingsError {
    fn from(err: HttpDispatchError) -> DescribeHostReservationOfferingsError {
        DescribeHostReservationOfferingsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeHostReservationOfferingsError {
    fn from(err: io::Error) -> DescribeHostReservationOfferingsError {
        DescribeHostReservationOfferingsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeHostReservationOfferingsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeHostReservationOfferingsError {
    fn description(&self) -> &str {
        match *self {
            DescribeHostReservationOfferingsError::Validation(ref cause) => cause,
            DescribeHostReservationOfferingsError::Credentials(ref err) => err.description(),
            DescribeHostReservationOfferingsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeHostReservationOfferingsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeHostReservations
#[derive(Debug, PartialEq)]
pub enum DescribeHostReservationsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeHostReservationsError {
    pub fn from_body(body: &str) -> DescribeHostReservationsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeHostReservationsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeHostReservationsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeHostReservationsError {
    fn from(err: XmlParseError) -> DescribeHostReservationsError {
        let XmlParseError(message) = err;
        DescribeHostReservationsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeHostReservationsError {
    fn from(err: CredentialsError) -> DescribeHostReservationsError {
        DescribeHostReservationsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeHostReservationsError {
    fn from(err: HttpDispatchError) -> DescribeHostReservationsError {
        DescribeHostReservationsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeHostReservationsError {
    fn from(err: io::Error) -> DescribeHostReservationsError {
        DescribeHostReservationsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeHostReservationsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeHostReservationsError {
    fn description(&self) -> &str {
        match *self {
            DescribeHostReservationsError::Validation(ref cause) => cause,
            DescribeHostReservationsError::Credentials(ref err) => err.description(),
            DescribeHostReservationsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeHostReservationsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeHosts
#[derive(Debug, PartialEq)]
pub enum DescribeHostsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeHostsError {
    pub fn from_body(body: &str) -> DescribeHostsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeHostsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeHostsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeHostsError {
    fn from(err: XmlParseError) -> DescribeHostsError {
        let XmlParseError(message) = err;
        DescribeHostsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeHostsError {
    fn from(err: CredentialsError) -> DescribeHostsError {
        DescribeHostsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeHostsError {
    fn from(err: HttpDispatchError) -> DescribeHostsError {
        DescribeHostsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeHostsError {
    fn from(err: io::Error) -> DescribeHostsError {
        DescribeHostsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeHostsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeHostsError {
    fn description(&self) -> &str {
        match *self {
            DescribeHostsError::Validation(ref cause) => cause,
            DescribeHostsError::Credentials(ref err) => err.description(),
            DescribeHostsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeHostsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeIamInstanceProfileAssociations
#[derive(Debug, PartialEq)]
pub enum DescribeIamInstanceProfileAssociationsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeIamInstanceProfileAssociationsError {
    pub fn from_body(body: &str) -> DescribeIamInstanceProfileAssociationsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeIamInstanceProfileAssociationsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeIamInstanceProfileAssociationsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeIamInstanceProfileAssociationsError {
    fn from(err: XmlParseError) -> DescribeIamInstanceProfileAssociationsError {
        let XmlParseError(message) = err;
        DescribeIamInstanceProfileAssociationsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeIamInstanceProfileAssociationsError {
    fn from(err: CredentialsError) -> DescribeIamInstanceProfileAssociationsError {
        DescribeIamInstanceProfileAssociationsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeIamInstanceProfileAssociationsError {
    fn from(err: HttpDispatchError) -> DescribeIamInstanceProfileAssociationsError {
        DescribeIamInstanceProfileAssociationsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeIamInstanceProfileAssociationsError {
    fn from(err: io::Error) -> DescribeIamInstanceProfileAssociationsError {
        DescribeIamInstanceProfileAssociationsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeIamInstanceProfileAssociationsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeIamInstanceProfileAssociationsError {
    fn description(&self) -> &str {
        match *self {
            DescribeIamInstanceProfileAssociationsError::Validation(ref cause) => cause,
            DescribeIamInstanceProfileAssociationsError::Credentials(ref err) => err.description(),
            DescribeIamInstanceProfileAssociationsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeIamInstanceProfileAssociationsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeIdFormat
#[derive(Debug, PartialEq)]
pub enum DescribeIdFormatError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeIdFormatError {
    pub fn from_body(body: &str) -> DescribeIdFormatError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeIdFormatError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeIdFormatError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeIdFormatError {
    fn from(err: XmlParseError) -> DescribeIdFormatError {
        let XmlParseError(message) = err;
        DescribeIdFormatError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeIdFormatError {
    fn from(err: CredentialsError) -> DescribeIdFormatError {
        DescribeIdFormatError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeIdFormatError {
    fn from(err: HttpDispatchError) -> DescribeIdFormatError {
        DescribeIdFormatError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeIdFormatError {
    fn from(err: io::Error) -> DescribeIdFormatError {
        DescribeIdFormatError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeIdFormatError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeIdFormatError {
    fn description(&self) -> &str {
        match *self {
            DescribeIdFormatError::Validation(ref cause) => cause,
            DescribeIdFormatError::Credentials(ref err) => err.description(),
            DescribeIdFormatError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeIdFormatError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeIdentityIdFormat
#[derive(Debug, PartialEq)]
pub enum DescribeIdentityIdFormatError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeIdentityIdFormatError {
    pub fn from_body(body: &str) -> DescribeIdentityIdFormatError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeIdentityIdFormatError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeIdentityIdFormatError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeIdentityIdFormatError {
    fn from(err: XmlParseError) -> DescribeIdentityIdFormatError {
        let XmlParseError(message) = err;
        DescribeIdentityIdFormatError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeIdentityIdFormatError {
    fn from(err: CredentialsError) -> DescribeIdentityIdFormatError {
        DescribeIdentityIdFormatError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeIdentityIdFormatError {
    fn from(err: HttpDispatchError) -> DescribeIdentityIdFormatError {
        DescribeIdentityIdFormatError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeIdentityIdFormatError {
    fn from(err: io::Error) -> DescribeIdentityIdFormatError {
        DescribeIdentityIdFormatError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeIdentityIdFormatError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeIdentityIdFormatError {
    fn description(&self) -> &str {
        match *self {
            DescribeIdentityIdFormatError::Validation(ref cause) => cause,
            DescribeIdentityIdFormatError::Credentials(ref err) => err.description(),
            DescribeIdentityIdFormatError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeIdentityIdFormatError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeImageAttribute
#[derive(Debug, PartialEq)]
pub enum DescribeImageAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeImageAttributeError {
    pub fn from_body(body: &str) -> DescribeImageAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeImageAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeImageAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeImageAttributeError {
    fn from(err: XmlParseError) -> DescribeImageAttributeError {
        let XmlParseError(message) = err;
        DescribeImageAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeImageAttributeError {
    fn from(err: CredentialsError) -> DescribeImageAttributeError {
        DescribeImageAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeImageAttributeError {
    fn from(err: HttpDispatchError) -> DescribeImageAttributeError {
        DescribeImageAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeImageAttributeError {
    fn from(err: io::Error) -> DescribeImageAttributeError {
        DescribeImageAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeImageAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeImageAttributeError {
    fn description(&self) -> &str {
        match *self {
            DescribeImageAttributeError::Validation(ref cause) => cause,
            DescribeImageAttributeError::Credentials(ref err) => err.description(),
            DescribeImageAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeImageAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeImages
#[derive(Debug, PartialEq)]
pub enum DescribeImagesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeImagesError {
    pub fn from_body(body: &str) -> DescribeImagesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeImagesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeImagesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeImagesError {
    fn from(err: XmlParseError) -> DescribeImagesError {
        let XmlParseError(message) = err;
        DescribeImagesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeImagesError {
    fn from(err: CredentialsError) -> DescribeImagesError {
        DescribeImagesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeImagesError {
    fn from(err: HttpDispatchError) -> DescribeImagesError {
        DescribeImagesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeImagesError {
    fn from(err: io::Error) -> DescribeImagesError {
        DescribeImagesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeImagesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeImagesError {
    fn description(&self) -> &str {
        match *self {
            DescribeImagesError::Validation(ref cause) => cause,
            DescribeImagesError::Credentials(ref err) => err.description(),
            DescribeImagesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeImagesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeImportImageTasks
#[derive(Debug, PartialEq)]
pub enum DescribeImportImageTasksError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeImportImageTasksError {
    pub fn from_body(body: &str) -> DescribeImportImageTasksError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeImportImageTasksError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeImportImageTasksError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeImportImageTasksError {
    fn from(err: XmlParseError) -> DescribeImportImageTasksError {
        let XmlParseError(message) = err;
        DescribeImportImageTasksError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeImportImageTasksError {
    fn from(err: CredentialsError) -> DescribeImportImageTasksError {
        DescribeImportImageTasksError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeImportImageTasksError {
    fn from(err: HttpDispatchError) -> DescribeImportImageTasksError {
        DescribeImportImageTasksError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeImportImageTasksError {
    fn from(err: io::Error) -> DescribeImportImageTasksError {
        DescribeImportImageTasksError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeImportImageTasksError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeImportImageTasksError {
    fn description(&self) -> &str {
        match *self {
            DescribeImportImageTasksError::Validation(ref cause) => cause,
            DescribeImportImageTasksError::Credentials(ref err) => err.description(),
            DescribeImportImageTasksError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeImportImageTasksError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeImportSnapshotTasks
#[derive(Debug, PartialEq)]
pub enum DescribeImportSnapshotTasksError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeImportSnapshotTasksError {
    pub fn from_body(body: &str) -> DescribeImportSnapshotTasksError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeImportSnapshotTasksError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeImportSnapshotTasksError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeImportSnapshotTasksError {
    fn from(err: XmlParseError) -> DescribeImportSnapshotTasksError {
        let XmlParseError(message) = err;
        DescribeImportSnapshotTasksError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeImportSnapshotTasksError {
    fn from(err: CredentialsError) -> DescribeImportSnapshotTasksError {
        DescribeImportSnapshotTasksError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeImportSnapshotTasksError {
    fn from(err: HttpDispatchError) -> DescribeImportSnapshotTasksError {
        DescribeImportSnapshotTasksError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeImportSnapshotTasksError {
    fn from(err: io::Error) -> DescribeImportSnapshotTasksError {
        DescribeImportSnapshotTasksError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeImportSnapshotTasksError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeImportSnapshotTasksError {
    fn description(&self) -> &str {
        match *self {
            DescribeImportSnapshotTasksError::Validation(ref cause) => cause,
            DescribeImportSnapshotTasksError::Credentials(ref err) => err.description(),
            DescribeImportSnapshotTasksError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeImportSnapshotTasksError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeInstanceAttribute
#[derive(Debug, PartialEq)]
pub enum DescribeInstanceAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeInstanceAttributeError {
    pub fn from_body(body: &str) -> DescribeInstanceAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeInstanceAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeInstanceAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeInstanceAttributeError {
    fn from(err: XmlParseError) -> DescribeInstanceAttributeError {
        let XmlParseError(message) = err;
        DescribeInstanceAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeInstanceAttributeError {
    fn from(err: CredentialsError) -> DescribeInstanceAttributeError {
        DescribeInstanceAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeInstanceAttributeError {
    fn from(err: HttpDispatchError) -> DescribeInstanceAttributeError {
        DescribeInstanceAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeInstanceAttributeError {
    fn from(err: io::Error) -> DescribeInstanceAttributeError {
        DescribeInstanceAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeInstanceAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeInstanceAttributeError {
    fn description(&self) -> &str {
        match *self {
            DescribeInstanceAttributeError::Validation(ref cause) => cause,
            DescribeInstanceAttributeError::Credentials(ref err) => err.description(),
            DescribeInstanceAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeInstanceAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeInstanceStatus
#[derive(Debug, PartialEq)]
pub enum DescribeInstanceStatusError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeInstanceStatusError {
    pub fn from_body(body: &str) -> DescribeInstanceStatusError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeInstanceStatusError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeInstanceStatusError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeInstanceStatusError {
    fn from(err: XmlParseError) -> DescribeInstanceStatusError {
        let XmlParseError(message) = err;
        DescribeInstanceStatusError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeInstanceStatusError {
    fn from(err: CredentialsError) -> DescribeInstanceStatusError {
        DescribeInstanceStatusError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeInstanceStatusError {
    fn from(err: HttpDispatchError) -> DescribeInstanceStatusError {
        DescribeInstanceStatusError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeInstanceStatusError {
    fn from(err: io::Error) -> DescribeInstanceStatusError {
        DescribeInstanceStatusError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeInstanceStatusError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeInstanceStatusError {
    fn description(&self) -> &str {
        match *self {
            DescribeInstanceStatusError::Validation(ref cause) => cause,
            DescribeInstanceStatusError::Credentials(ref err) => err.description(),
            DescribeInstanceStatusError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeInstanceStatusError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeInstances
#[derive(Debug, PartialEq)]
pub enum DescribeInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeInstancesError {
    pub fn from_body(body: &str) -> DescribeInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeInstancesError {
    fn from(err: XmlParseError) -> DescribeInstancesError {
        let XmlParseError(message) = err;
        DescribeInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeInstancesError {
    fn from(err: CredentialsError) -> DescribeInstancesError {
        DescribeInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeInstancesError {
    fn from(err: HttpDispatchError) -> DescribeInstancesError {
        DescribeInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeInstancesError {
    fn from(err: io::Error) -> DescribeInstancesError {
        DescribeInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeInstancesError {
    fn description(&self) -> &str {
        match *self {
            DescribeInstancesError::Validation(ref cause) => cause,
            DescribeInstancesError::Credentials(ref err) => err.description(),
            DescribeInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeInternetGateways
#[derive(Debug, PartialEq)]
pub enum DescribeInternetGatewaysError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeInternetGatewaysError {
    pub fn from_body(body: &str) -> DescribeInternetGatewaysError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeInternetGatewaysError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeInternetGatewaysError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeInternetGatewaysError {
    fn from(err: XmlParseError) -> DescribeInternetGatewaysError {
        let XmlParseError(message) = err;
        DescribeInternetGatewaysError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeInternetGatewaysError {
    fn from(err: CredentialsError) -> DescribeInternetGatewaysError {
        DescribeInternetGatewaysError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeInternetGatewaysError {
    fn from(err: HttpDispatchError) -> DescribeInternetGatewaysError {
        DescribeInternetGatewaysError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeInternetGatewaysError {
    fn from(err: io::Error) -> DescribeInternetGatewaysError {
        DescribeInternetGatewaysError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeInternetGatewaysError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeInternetGatewaysError {
    fn description(&self) -> &str {
        match *self {
            DescribeInternetGatewaysError::Validation(ref cause) => cause,
            DescribeInternetGatewaysError::Credentials(ref err) => err.description(),
            DescribeInternetGatewaysError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeInternetGatewaysError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeKeyPairs
#[derive(Debug, PartialEq)]
pub enum DescribeKeyPairsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeKeyPairsError {
    pub fn from_body(body: &str) -> DescribeKeyPairsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeKeyPairsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeKeyPairsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeKeyPairsError {
    fn from(err: XmlParseError) -> DescribeKeyPairsError {
        let XmlParseError(message) = err;
        DescribeKeyPairsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeKeyPairsError {
    fn from(err: CredentialsError) -> DescribeKeyPairsError {
        DescribeKeyPairsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeKeyPairsError {
    fn from(err: HttpDispatchError) -> DescribeKeyPairsError {
        DescribeKeyPairsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeKeyPairsError {
    fn from(err: io::Error) -> DescribeKeyPairsError {
        DescribeKeyPairsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeKeyPairsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeKeyPairsError {
    fn description(&self) -> &str {
        match *self {
            DescribeKeyPairsError::Validation(ref cause) => cause,
            DescribeKeyPairsError::Credentials(ref err) => err.description(),
            DescribeKeyPairsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeKeyPairsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeMovingAddresses
#[derive(Debug, PartialEq)]
pub enum DescribeMovingAddressesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeMovingAddressesError {
    pub fn from_body(body: &str) -> DescribeMovingAddressesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeMovingAddressesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeMovingAddressesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeMovingAddressesError {
    fn from(err: XmlParseError) -> DescribeMovingAddressesError {
        let XmlParseError(message) = err;
        DescribeMovingAddressesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeMovingAddressesError {
    fn from(err: CredentialsError) -> DescribeMovingAddressesError {
        DescribeMovingAddressesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeMovingAddressesError {
    fn from(err: HttpDispatchError) -> DescribeMovingAddressesError {
        DescribeMovingAddressesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeMovingAddressesError {
    fn from(err: io::Error) -> DescribeMovingAddressesError {
        DescribeMovingAddressesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeMovingAddressesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeMovingAddressesError {
    fn description(&self) -> &str {
        match *self {
            DescribeMovingAddressesError::Validation(ref cause) => cause,
            DescribeMovingAddressesError::Credentials(ref err) => err.description(),
            DescribeMovingAddressesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeMovingAddressesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeNatGateways
#[derive(Debug, PartialEq)]
pub enum DescribeNatGatewaysError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeNatGatewaysError {
    pub fn from_body(body: &str) -> DescribeNatGatewaysError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeNatGatewaysError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeNatGatewaysError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeNatGatewaysError {
    fn from(err: XmlParseError) -> DescribeNatGatewaysError {
        let XmlParseError(message) = err;
        DescribeNatGatewaysError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeNatGatewaysError {
    fn from(err: CredentialsError) -> DescribeNatGatewaysError {
        DescribeNatGatewaysError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeNatGatewaysError {
    fn from(err: HttpDispatchError) -> DescribeNatGatewaysError {
        DescribeNatGatewaysError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeNatGatewaysError {
    fn from(err: io::Error) -> DescribeNatGatewaysError {
        DescribeNatGatewaysError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeNatGatewaysError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeNatGatewaysError {
    fn description(&self) -> &str {
        match *self {
            DescribeNatGatewaysError::Validation(ref cause) => cause,
            DescribeNatGatewaysError::Credentials(ref err) => err.description(),
            DescribeNatGatewaysError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeNatGatewaysError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeNetworkAcls
#[derive(Debug, PartialEq)]
pub enum DescribeNetworkAclsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeNetworkAclsError {
    pub fn from_body(body: &str) -> DescribeNetworkAclsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeNetworkAclsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeNetworkAclsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeNetworkAclsError {
    fn from(err: XmlParseError) -> DescribeNetworkAclsError {
        let XmlParseError(message) = err;
        DescribeNetworkAclsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeNetworkAclsError {
    fn from(err: CredentialsError) -> DescribeNetworkAclsError {
        DescribeNetworkAclsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeNetworkAclsError {
    fn from(err: HttpDispatchError) -> DescribeNetworkAclsError {
        DescribeNetworkAclsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeNetworkAclsError {
    fn from(err: io::Error) -> DescribeNetworkAclsError {
        DescribeNetworkAclsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeNetworkAclsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeNetworkAclsError {
    fn description(&self) -> &str {
        match *self {
            DescribeNetworkAclsError::Validation(ref cause) => cause,
            DescribeNetworkAclsError::Credentials(ref err) => err.description(),
            DescribeNetworkAclsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeNetworkAclsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeNetworkInterfaceAttribute
#[derive(Debug, PartialEq)]
pub enum DescribeNetworkInterfaceAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeNetworkInterfaceAttributeError {
    pub fn from_body(body: &str) -> DescribeNetworkInterfaceAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeNetworkInterfaceAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeNetworkInterfaceAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeNetworkInterfaceAttributeError {
    fn from(err: XmlParseError) -> DescribeNetworkInterfaceAttributeError {
        let XmlParseError(message) = err;
        DescribeNetworkInterfaceAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeNetworkInterfaceAttributeError {
    fn from(err: CredentialsError) -> DescribeNetworkInterfaceAttributeError {
        DescribeNetworkInterfaceAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeNetworkInterfaceAttributeError {
    fn from(err: HttpDispatchError) -> DescribeNetworkInterfaceAttributeError {
        DescribeNetworkInterfaceAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeNetworkInterfaceAttributeError {
    fn from(err: io::Error) -> DescribeNetworkInterfaceAttributeError {
        DescribeNetworkInterfaceAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeNetworkInterfaceAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeNetworkInterfaceAttributeError {
    fn description(&self) -> &str {
        match *self {
            DescribeNetworkInterfaceAttributeError::Validation(ref cause) => cause,
            DescribeNetworkInterfaceAttributeError::Credentials(ref err) => err.description(),
            DescribeNetworkInterfaceAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeNetworkInterfaceAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeNetworkInterfacePermissions
#[derive(Debug, PartialEq)]
pub enum DescribeNetworkInterfacePermissionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeNetworkInterfacePermissionsError {
    pub fn from_body(body: &str) -> DescribeNetworkInterfacePermissionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeNetworkInterfacePermissionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeNetworkInterfacePermissionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeNetworkInterfacePermissionsError {
    fn from(err: XmlParseError) -> DescribeNetworkInterfacePermissionsError {
        let XmlParseError(message) = err;
        DescribeNetworkInterfacePermissionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeNetworkInterfacePermissionsError {
    fn from(err: CredentialsError) -> DescribeNetworkInterfacePermissionsError {
        DescribeNetworkInterfacePermissionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeNetworkInterfacePermissionsError {
    fn from(err: HttpDispatchError) -> DescribeNetworkInterfacePermissionsError {
        DescribeNetworkInterfacePermissionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeNetworkInterfacePermissionsError {
    fn from(err: io::Error) -> DescribeNetworkInterfacePermissionsError {
        DescribeNetworkInterfacePermissionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeNetworkInterfacePermissionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeNetworkInterfacePermissionsError {
    fn description(&self) -> &str {
        match *self {
            DescribeNetworkInterfacePermissionsError::Validation(ref cause) => cause,
            DescribeNetworkInterfacePermissionsError::Credentials(ref err) => err.description(),
            DescribeNetworkInterfacePermissionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeNetworkInterfacePermissionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeNetworkInterfaces
#[derive(Debug, PartialEq)]
pub enum DescribeNetworkInterfacesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeNetworkInterfacesError {
    pub fn from_body(body: &str) -> DescribeNetworkInterfacesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeNetworkInterfacesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeNetworkInterfacesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeNetworkInterfacesError {
    fn from(err: XmlParseError) -> DescribeNetworkInterfacesError {
        let XmlParseError(message) = err;
        DescribeNetworkInterfacesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeNetworkInterfacesError {
    fn from(err: CredentialsError) -> DescribeNetworkInterfacesError {
        DescribeNetworkInterfacesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeNetworkInterfacesError {
    fn from(err: HttpDispatchError) -> DescribeNetworkInterfacesError {
        DescribeNetworkInterfacesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeNetworkInterfacesError {
    fn from(err: io::Error) -> DescribeNetworkInterfacesError {
        DescribeNetworkInterfacesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeNetworkInterfacesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeNetworkInterfacesError {
    fn description(&self) -> &str {
        match *self {
            DescribeNetworkInterfacesError::Validation(ref cause) => cause,
            DescribeNetworkInterfacesError::Credentials(ref err) => err.description(),
            DescribeNetworkInterfacesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeNetworkInterfacesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribePlacementGroups
#[derive(Debug, PartialEq)]
pub enum DescribePlacementGroupsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribePlacementGroupsError {
    pub fn from_body(body: &str) -> DescribePlacementGroupsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribePlacementGroupsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribePlacementGroupsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribePlacementGroupsError {
    fn from(err: XmlParseError) -> DescribePlacementGroupsError {
        let XmlParseError(message) = err;
        DescribePlacementGroupsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribePlacementGroupsError {
    fn from(err: CredentialsError) -> DescribePlacementGroupsError {
        DescribePlacementGroupsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribePlacementGroupsError {
    fn from(err: HttpDispatchError) -> DescribePlacementGroupsError {
        DescribePlacementGroupsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribePlacementGroupsError {
    fn from(err: io::Error) -> DescribePlacementGroupsError {
        DescribePlacementGroupsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribePlacementGroupsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribePlacementGroupsError {
    fn description(&self) -> &str {
        match *self {
            DescribePlacementGroupsError::Validation(ref cause) => cause,
            DescribePlacementGroupsError::Credentials(ref err) => err.description(),
            DescribePlacementGroupsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribePlacementGroupsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribePrefixLists
#[derive(Debug, PartialEq)]
pub enum DescribePrefixListsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribePrefixListsError {
    pub fn from_body(body: &str) -> DescribePrefixListsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribePrefixListsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribePrefixListsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribePrefixListsError {
    fn from(err: XmlParseError) -> DescribePrefixListsError {
        let XmlParseError(message) = err;
        DescribePrefixListsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribePrefixListsError {
    fn from(err: CredentialsError) -> DescribePrefixListsError {
        DescribePrefixListsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribePrefixListsError {
    fn from(err: HttpDispatchError) -> DescribePrefixListsError {
        DescribePrefixListsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribePrefixListsError {
    fn from(err: io::Error) -> DescribePrefixListsError {
        DescribePrefixListsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribePrefixListsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribePrefixListsError {
    fn description(&self) -> &str {
        match *self {
            DescribePrefixListsError::Validation(ref cause) => cause,
            DescribePrefixListsError::Credentials(ref err) => err.description(),
            DescribePrefixListsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribePrefixListsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeRegions
#[derive(Debug, PartialEq)]
pub enum DescribeRegionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeRegionsError {
    pub fn from_body(body: &str) -> DescribeRegionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeRegionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeRegionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeRegionsError {
    fn from(err: XmlParseError) -> DescribeRegionsError {
        let XmlParseError(message) = err;
        DescribeRegionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeRegionsError {
    fn from(err: CredentialsError) -> DescribeRegionsError {
        DescribeRegionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeRegionsError {
    fn from(err: HttpDispatchError) -> DescribeRegionsError {
        DescribeRegionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeRegionsError {
    fn from(err: io::Error) -> DescribeRegionsError {
        DescribeRegionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeRegionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeRegionsError {
    fn description(&self) -> &str {
        match *self {
            DescribeRegionsError::Validation(ref cause) => cause,
            DescribeRegionsError::Credentials(ref err) => err.description(),
            DescribeRegionsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeRegionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeReservedInstances
#[derive(Debug, PartialEq)]
pub enum DescribeReservedInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeReservedInstancesError {
    pub fn from_body(body: &str) -> DescribeReservedInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeReservedInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeReservedInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeReservedInstancesError {
    fn from(err: XmlParseError) -> DescribeReservedInstancesError {
        let XmlParseError(message) = err;
        DescribeReservedInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeReservedInstancesError {
    fn from(err: CredentialsError) -> DescribeReservedInstancesError {
        DescribeReservedInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeReservedInstancesError {
    fn from(err: HttpDispatchError) -> DescribeReservedInstancesError {
        DescribeReservedInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeReservedInstancesError {
    fn from(err: io::Error) -> DescribeReservedInstancesError {
        DescribeReservedInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeReservedInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeReservedInstancesError {
    fn description(&self) -> &str {
        match *self {
            DescribeReservedInstancesError::Validation(ref cause) => cause,
            DescribeReservedInstancesError::Credentials(ref err) => err.description(),
            DescribeReservedInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeReservedInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeReservedInstancesListings
#[derive(Debug, PartialEq)]
pub enum DescribeReservedInstancesListingsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeReservedInstancesListingsError {
    pub fn from_body(body: &str) -> DescribeReservedInstancesListingsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeReservedInstancesListingsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeReservedInstancesListingsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeReservedInstancesListingsError {
    fn from(err: XmlParseError) -> DescribeReservedInstancesListingsError {
        let XmlParseError(message) = err;
        DescribeReservedInstancesListingsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeReservedInstancesListingsError {
    fn from(err: CredentialsError) -> DescribeReservedInstancesListingsError {
        DescribeReservedInstancesListingsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeReservedInstancesListingsError {
    fn from(err: HttpDispatchError) -> DescribeReservedInstancesListingsError {
        DescribeReservedInstancesListingsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeReservedInstancesListingsError {
    fn from(err: io::Error) -> DescribeReservedInstancesListingsError {
        DescribeReservedInstancesListingsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeReservedInstancesListingsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeReservedInstancesListingsError {
    fn description(&self) -> &str {
        match *self {
            DescribeReservedInstancesListingsError::Validation(ref cause) => cause,
            DescribeReservedInstancesListingsError::Credentials(ref err) => err.description(),
            DescribeReservedInstancesListingsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeReservedInstancesListingsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeReservedInstancesModifications
#[derive(Debug, PartialEq)]
pub enum DescribeReservedInstancesModificationsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeReservedInstancesModificationsError {
    pub fn from_body(body: &str) -> DescribeReservedInstancesModificationsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeReservedInstancesModificationsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeReservedInstancesModificationsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeReservedInstancesModificationsError {
    fn from(err: XmlParseError) -> DescribeReservedInstancesModificationsError {
        let XmlParseError(message) = err;
        DescribeReservedInstancesModificationsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeReservedInstancesModificationsError {
    fn from(err: CredentialsError) -> DescribeReservedInstancesModificationsError {
        DescribeReservedInstancesModificationsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeReservedInstancesModificationsError {
    fn from(err: HttpDispatchError) -> DescribeReservedInstancesModificationsError {
        DescribeReservedInstancesModificationsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeReservedInstancesModificationsError {
    fn from(err: io::Error) -> DescribeReservedInstancesModificationsError {
        DescribeReservedInstancesModificationsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeReservedInstancesModificationsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeReservedInstancesModificationsError {
    fn description(&self) -> &str {
        match *self {
            DescribeReservedInstancesModificationsError::Validation(ref cause) => cause,
            DescribeReservedInstancesModificationsError::Credentials(ref err) => err.description(),
            DescribeReservedInstancesModificationsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeReservedInstancesModificationsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeReservedInstancesOfferings
#[derive(Debug, PartialEq)]
pub enum DescribeReservedInstancesOfferingsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeReservedInstancesOfferingsError {
    pub fn from_body(body: &str) -> DescribeReservedInstancesOfferingsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeReservedInstancesOfferingsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeReservedInstancesOfferingsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeReservedInstancesOfferingsError {
    fn from(err: XmlParseError) -> DescribeReservedInstancesOfferingsError {
        let XmlParseError(message) = err;
        DescribeReservedInstancesOfferingsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeReservedInstancesOfferingsError {
    fn from(err: CredentialsError) -> DescribeReservedInstancesOfferingsError {
        DescribeReservedInstancesOfferingsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeReservedInstancesOfferingsError {
    fn from(err: HttpDispatchError) -> DescribeReservedInstancesOfferingsError {
        DescribeReservedInstancesOfferingsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeReservedInstancesOfferingsError {
    fn from(err: io::Error) -> DescribeReservedInstancesOfferingsError {
        DescribeReservedInstancesOfferingsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeReservedInstancesOfferingsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeReservedInstancesOfferingsError {
    fn description(&self) -> &str {
        match *self {
            DescribeReservedInstancesOfferingsError::Validation(ref cause) => cause,
            DescribeReservedInstancesOfferingsError::Credentials(ref err) => err.description(),
            DescribeReservedInstancesOfferingsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeReservedInstancesOfferingsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeRouteTables
#[derive(Debug, PartialEq)]
pub enum DescribeRouteTablesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeRouteTablesError {
    pub fn from_body(body: &str) -> DescribeRouteTablesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeRouteTablesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeRouteTablesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeRouteTablesError {
    fn from(err: XmlParseError) -> DescribeRouteTablesError {
        let XmlParseError(message) = err;
        DescribeRouteTablesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeRouteTablesError {
    fn from(err: CredentialsError) -> DescribeRouteTablesError {
        DescribeRouteTablesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeRouteTablesError {
    fn from(err: HttpDispatchError) -> DescribeRouteTablesError {
        DescribeRouteTablesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeRouteTablesError {
    fn from(err: io::Error) -> DescribeRouteTablesError {
        DescribeRouteTablesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeRouteTablesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeRouteTablesError {
    fn description(&self) -> &str {
        match *self {
            DescribeRouteTablesError::Validation(ref cause) => cause,
            DescribeRouteTablesError::Credentials(ref err) => err.description(),
            DescribeRouteTablesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeRouteTablesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeScheduledInstanceAvailability
#[derive(Debug, PartialEq)]
pub enum DescribeScheduledInstanceAvailabilityError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeScheduledInstanceAvailabilityError {
    pub fn from_body(body: &str) -> DescribeScheduledInstanceAvailabilityError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeScheduledInstanceAvailabilityError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeScheduledInstanceAvailabilityError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeScheduledInstanceAvailabilityError {
    fn from(err: XmlParseError) -> DescribeScheduledInstanceAvailabilityError {
        let XmlParseError(message) = err;
        DescribeScheduledInstanceAvailabilityError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeScheduledInstanceAvailabilityError {
    fn from(err: CredentialsError) -> DescribeScheduledInstanceAvailabilityError {
        DescribeScheduledInstanceAvailabilityError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeScheduledInstanceAvailabilityError {
    fn from(err: HttpDispatchError) -> DescribeScheduledInstanceAvailabilityError {
        DescribeScheduledInstanceAvailabilityError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeScheduledInstanceAvailabilityError {
    fn from(err: io::Error) -> DescribeScheduledInstanceAvailabilityError {
        DescribeScheduledInstanceAvailabilityError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeScheduledInstanceAvailabilityError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeScheduledInstanceAvailabilityError {
    fn description(&self) -> &str {
        match *self {
            DescribeScheduledInstanceAvailabilityError::Validation(ref cause) => cause,
            DescribeScheduledInstanceAvailabilityError::Credentials(ref err) => err.description(),
            DescribeScheduledInstanceAvailabilityError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeScheduledInstanceAvailabilityError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeScheduledInstances
#[derive(Debug, PartialEq)]
pub enum DescribeScheduledInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeScheduledInstancesError {
    pub fn from_body(body: &str) -> DescribeScheduledInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeScheduledInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeScheduledInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeScheduledInstancesError {
    fn from(err: XmlParseError) -> DescribeScheduledInstancesError {
        let XmlParseError(message) = err;
        DescribeScheduledInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeScheduledInstancesError {
    fn from(err: CredentialsError) -> DescribeScheduledInstancesError {
        DescribeScheduledInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeScheduledInstancesError {
    fn from(err: HttpDispatchError) -> DescribeScheduledInstancesError {
        DescribeScheduledInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeScheduledInstancesError {
    fn from(err: io::Error) -> DescribeScheduledInstancesError {
        DescribeScheduledInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeScheduledInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeScheduledInstancesError {
    fn description(&self) -> &str {
        match *self {
            DescribeScheduledInstancesError::Validation(ref cause) => cause,
            DescribeScheduledInstancesError::Credentials(ref err) => err.description(),
            DescribeScheduledInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeScheduledInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSecurityGroupReferences
#[derive(Debug, PartialEq)]
pub enum DescribeSecurityGroupReferencesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSecurityGroupReferencesError {
    pub fn from_body(body: &str) -> DescribeSecurityGroupReferencesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSecurityGroupReferencesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSecurityGroupReferencesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSecurityGroupReferencesError {
    fn from(err: XmlParseError) -> DescribeSecurityGroupReferencesError {
        let XmlParseError(message) = err;
        DescribeSecurityGroupReferencesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSecurityGroupReferencesError {
    fn from(err: CredentialsError) -> DescribeSecurityGroupReferencesError {
        DescribeSecurityGroupReferencesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSecurityGroupReferencesError {
    fn from(err: HttpDispatchError) -> DescribeSecurityGroupReferencesError {
        DescribeSecurityGroupReferencesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSecurityGroupReferencesError {
    fn from(err: io::Error) -> DescribeSecurityGroupReferencesError {
        DescribeSecurityGroupReferencesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSecurityGroupReferencesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSecurityGroupReferencesError {
    fn description(&self) -> &str {
        match *self {
            DescribeSecurityGroupReferencesError::Validation(ref cause) => cause,
            DescribeSecurityGroupReferencesError::Credentials(ref err) => err.description(),
            DescribeSecurityGroupReferencesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSecurityGroupReferencesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSecurityGroups
#[derive(Debug, PartialEq)]
pub enum DescribeSecurityGroupsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSecurityGroupsError {
    pub fn from_body(body: &str) -> DescribeSecurityGroupsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSecurityGroupsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSecurityGroupsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSecurityGroupsError {
    fn from(err: XmlParseError) -> DescribeSecurityGroupsError {
        let XmlParseError(message) = err;
        DescribeSecurityGroupsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSecurityGroupsError {
    fn from(err: CredentialsError) -> DescribeSecurityGroupsError {
        DescribeSecurityGroupsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSecurityGroupsError {
    fn from(err: HttpDispatchError) -> DescribeSecurityGroupsError {
        DescribeSecurityGroupsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSecurityGroupsError {
    fn from(err: io::Error) -> DescribeSecurityGroupsError {
        DescribeSecurityGroupsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSecurityGroupsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSecurityGroupsError {
    fn description(&self) -> &str {
        match *self {
            DescribeSecurityGroupsError::Validation(ref cause) => cause,
            DescribeSecurityGroupsError::Credentials(ref err) => err.description(),
            DescribeSecurityGroupsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSecurityGroupsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSnapshotAttribute
#[derive(Debug, PartialEq)]
pub enum DescribeSnapshotAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSnapshotAttributeError {
    pub fn from_body(body: &str) -> DescribeSnapshotAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSnapshotAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSnapshotAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSnapshotAttributeError {
    fn from(err: XmlParseError) -> DescribeSnapshotAttributeError {
        let XmlParseError(message) = err;
        DescribeSnapshotAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSnapshotAttributeError {
    fn from(err: CredentialsError) -> DescribeSnapshotAttributeError {
        DescribeSnapshotAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSnapshotAttributeError {
    fn from(err: HttpDispatchError) -> DescribeSnapshotAttributeError {
        DescribeSnapshotAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSnapshotAttributeError {
    fn from(err: io::Error) -> DescribeSnapshotAttributeError {
        DescribeSnapshotAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSnapshotAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSnapshotAttributeError {
    fn description(&self) -> &str {
        match *self {
            DescribeSnapshotAttributeError::Validation(ref cause) => cause,
            DescribeSnapshotAttributeError::Credentials(ref err) => err.description(),
            DescribeSnapshotAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSnapshotAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSnapshots
#[derive(Debug, PartialEq)]
pub enum DescribeSnapshotsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSnapshotsError {
    pub fn from_body(body: &str) -> DescribeSnapshotsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSnapshotsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSnapshotsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSnapshotsError {
    fn from(err: XmlParseError) -> DescribeSnapshotsError {
        let XmlParseError(message) = err;
        DescribeSnapshotsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSnapshotsError {
    fn from(err: CredentialsError) -> DescribeSnapshotsError {
        DescribeSnapshotsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSnapshotsError {
    fn from(err: HttpDispatchError) -> DescribeSnapshotsError {
        DescribeSnapshotsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSnapshotsError {
    fn from(err: io::Error) -> DescribeSnapshotsError {
        DescribeSnapshotsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSnapshotsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSnapshotsError {
    fn description(&self) -> &str {
        match *self {
            DescribeSnapshotsError::Validation(ref cause) => cause,
            DescribeSnapshotsError::Credentials(ref err) => err.description(),
            DescribeSnapshotsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSnapshotsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSpotDatafeedSubscription
#[derive(Debug, PartialEq)]
pub enum DescribeSpotDatafeedSubscriptionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSpotDatafeedSubscriptionError {
    pub fn from_body(body: &str) -> DescribeSpotDatafeedSubscriptionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSpotDatafeedSubscriptionError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSpotDatafeedSubscriptionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSpotDatafeedSubscriptionError {
    fn from(err: XmlParseError) -> DescribeSpotDatafeedSubscriptionError {
        let XmlParseError(message) = err;
        DescribeSpotDatafeedSubscriptionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSpotDatafeedSubscriptionError {
    fn from(err: CredentialsError) -> DescribeSpotDatafeedSubscriptionError {
        DescribeSpotDatafeedSubscriptionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSpotDatafeedSubscriptionError {
    fn from(err: HttpDispatchError) -> DescribeSpotDatafeedSubscriptionError {
        DescribeSpotDatafeedSubscriptionError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSpotDatafeedSubscriptionError {
    fn from(err: io::Error) -> DescribeSpotDatafeedSubscriptionError {
        DescribeSpotDatafeedSubscriptionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSpotDatafeedSubscriptionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSpotDatafeedSubscriptionError {
    fn description(&self) -> &str {
        match *self {
            DescribeSpotDatafeedSubscriptionError::Validation(ref cause) => cause,
            DescribeSpotDatafeedSubscriptionError::Credentials(ref err) => err.description(),
            DescribeSpotDatafeedSubscriptionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSpotDatafeedSubscriptionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSpotFleetInstances
#[derive(Debug, PartialEq)]
pub enum DescribeSpotFleetInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSpotFleetInstancesError {
    pub fn from_body(body: &str) -> DescribeSpotFleetInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSpotFleetInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSpotFleetInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSpotFleetInstancesError {
    fn from(err: XmlParseError) -> DescribeSpotFleetInstancesError {
        let XmlParseError(message) = err;
        DescribeSpotFleetInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSpotFleetInstancesError {
    fn from(err: CredentialsError) -> DescribeSpotFleetInstancesError {
        DescribeSpotFleetInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSpotFleetInstancesError {
    fn from(err: HttpDispatchError) -> DescribeSpotFleetInstancesError {
        DescribeSpotFleetInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSpotFleetInstancesError {
    fn from(err: io::Error) -> DescribeSpotFleetInstancesError {
        DescribeSpotFleetInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSpotFleetInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSpotFleetInstancesError {
    fn description(&self) -> &str {
        match *self {
            DescribeSpotFleetInstancesError::Validation(ref cause) => cause,
            DescribeSpotFleetInstancesError::Credentials(ref err) => err.description(),
            DescribeSpotFleetInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSpotFleetInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSpotFleetRequestHistory
#[derive(Debug, PartialEq)]
pub enum DescribeSpotFleetRequestHistoryError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSpotFleetRequestHistoryError {
    pub fn from_body(body: &str) -> DescribeSpotFleetRequestHistoryError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSpotFleetRequestHistoryError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSpotFleetRequestHistoryError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSpotFleetRequestHistoryError {
    fn from(err: XmlParseError) -> DescribeSpotFleetRequestHistoryError {
        let XmlParseError(message) = err;
        DescribeSpotFleetRequestHistoryError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSpotFleetRequestHistoryError {
    fn from(err: CredentialsError) -> DescribeSpotFleetRequestHistoryError {
        DescribeSpotFleetRequestHistoryError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSpotFleetRequestHistoryError {
    fn from(err: HttpDispatchError) -> DescribeSpotFleetRequestHistoryError {
        DescribeSpotFleetRequestHistoryError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSpotFleetRequestHistoryError {
    fn from(err: io::Error) -> DescribeSpotFleetRequestHistoryError {
        DescribeSpotFleetRequestHistoryError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSpotFleetRequestHistoryError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSpotFleetRequestHistoryError {
    fn description(&self) -> &str {
        match *self {
            DescribeSpotFleetRequestHistoryError::Validation(ref cause) => cause,
            DescribeSpotFleetRequestHistoryError::Credentials(ref err) => err.description(),
            DescribeSpotFleetRequestHistoryError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSpotFleetRequestHistoryError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSpotFleetRequests
#[derive(Debug, PartialEq)]
pub enum DescribeSpotFleetRequestsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSpotFleetRequestsError {
    pub fn from_body(body: &str) -> DescribeSpotFleetRequestsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSpotFleetRequestsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSpotFleetRequestsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSpotFleetRequestsError {
    fn from(err: XmlParseError) -> DescribeSpotFleetRequestsError {
        let XmlParseError(message) = err;
        DescribeSpotFleetRequestsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSpotFleetRequestsError {
    fn from(err: CredentialsError) -> DescribeSpotFleetRequestsError {
        DescribeSpotFleetRequestsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSpotFleetRequestsError {
    fn from(err: HttpDispatchError) -> DescribeSpotFleetRequestsError {
        DescribeSpotFleetRequestsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSpotFleetRequestsError {
    fn from(err: io::Error) -> DescribeSpotFleetRequestsError {
        DescribeSpotFleetRequestsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSpotFleetRequestsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSpotFleetRequestsError {
    fn description(&self) -> &str {
        match *self {
            DescribeSpotFleetRequestsError::Validation(ref cause) => cause,
            DescribeSpotFleetRequestsError::Credentials(ref err) => err.description(),
            DescribeSpotFleetRequestsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSpotFleetRequestsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSpotInstanceRequests
#[derive(Debug, PartialEq)]
pub enum DescribeSpotInstanceRequestsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSpotInstanceRequestsError {
    pub fn from_body(body: &str) -> DescribeSpotInstanceRequestsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSpotInstanceRequestsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSpotInstanceRequestsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSpotInstanceRequestsError {
    fn from(err: XmlParseError) -> DescribeSpotInstanceRequestsError {
        let XmlParseError(message) = err;
        DescribeSpotInstanceRequestsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSpotInstanceRequestsError {
    fn from(err: CredentialsError) -> DescribeSpotInstanceRequestsError {
        DescribeSpotInstanceRequestsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSpotInstanceRequestsError {
    fn from(err: HttpDispatchError) -> DescribeSpotInstanceRequestsError {
        DescribeSpotInstanceRequestsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSpotInstanceRequestsError {
    fn from(err: io::Error) -> DescribeSpotInstanceRequestsError {
        DescribeSpotInstanceRequestsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSpotInstanceRequestsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSpotInstanceRequestsError {
    fn description(&self) -> &str {
        match *self {
            DescribeSpotInstanceRequestsError::Validation(ref cause) => cause,
            DescribeSpotInstanceRequestsError::Credentials(ref err) => err.description(),
            DescribeSpotInstanceRequestsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSpotInstanceRequestsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSpotPriceHistory
#[derive(Debug, PartialEq)]
pub enum DescribeSpotPriceHistoryError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSpotPriceHistoryError {
    pub fn from_body(body: &str) -> DescribeSpotPriceHistoryError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSpotPriceHistoryError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSpotPriceHistoryError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSpotPriceHistoryError {
    fn from(err: XmlParseError) -> DescribeSpotPriceHistoryError {
        let XmlParseError(message) = err;
        DescribeSpotPriceHistoryError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSpotPriceHistoryError {
    fn from(err: CredentialsError) -> DescribeSpotPriceHistoryError {
        DescribeSpotPriceHistoryError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSpotPriceHistoryError {
    fn from(err: HttpDispatchError) -> DescribeSpotPriceHistoryError {
        DescribeSpotPriceHistoryError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSpotPriceHistoryError {
    fn from(err: io::Error) -> DescribeSpotPriceHistoryError {
        DescribeSpotPriceHistoryError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSpotPriceHistoryError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSpotPriceHistoryError {
    fn description(&self) -> &str {
        match *self {
            DescribeSpotPriceHistoryError::Validation(ref cause) => cause,
            DescribeSpotPriceHistoryError::Credentials(ref err) => err.description(),
            DescribeSpotPriceHistoryError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeSpotPriceHistoryError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeStaleSecurityGroups
#[derive(Debug, PartialEq)]
pub enum DescribeStaleSecurityGroupsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeStaleSecurityGroupsError {
    pub fn from_body(body: &str) -> DescribeStaleSecurityGroupsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeStaleSecurityGroupsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeStaleSecurityGroupsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeStaleSecurityGroupsError {
    fn from(err: XmlParseError) -> DescribeStaleSecurityGroupsError {
        let XmlParseError(message) = err;
        DescribeStaleSecurityGroupsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeStaleSecurityGroupsError {
    fn from(err: CredentialsError) -> DescribeStaleSecurityGroupsError {
        DescribeStaleSecurityGroupsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeStaleSecurityGroupsError {
    fn from(err: HttpDispatchError) -> DescribeStaleSecurityGroupsError {
        DescribeStaleSecurityGroupsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeStaleSecurityGroupsError {
    fn from(err: io::Error) -> DescribeStaleSecurityGroupsError {
        DescribeStaleSecurityGroupsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeStaleSecurityGroupsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeStaleSecurityGroupsError {
    fn description(&self) -> &str {
        match *self {
            DescribeStaleSecurityGroupsError::Validation(ref cause) => cause,
            DescribeStaleSecurityGroupsError::Credentials(ref err) => err.description(),
            DescribeStaleSecurityGroupsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeStaleSecurityGroupsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeSubnets
#[derive(Debug, PartialEq)]
pub enum DescribeSubnetsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeSubnetsError {
    pub fn from_body(body: &str) -> DescribeSubnetsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeSubnetsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeSubnetsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeSubnetsError {
    fn from(err: XmlParseError) -> DescribeSubnetsError {
        let XmlParseError(message) = err;
        DescribeSubnetsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeSubnetsError {
    fn from(err: CredentialsError) -> DescribeSubnetsError {
        DescribeSubnetsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeSubnetsError {
    fn from(err: HttpDispatchError) -> DescribeSubnetsError {
        DescribeSubnetsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeSubnetsError {
    fn from(err: io::Error) -> DescribeSubnetsError {
        DescribeSubnetsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeSubnetsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeSubnetsError {
    fn description(&self) -> &str {
        match *self {
            DescribeSubnetsError::Validation(ref cause) => cause,
            DescribeSubnetsError::Credentials(ref err) => err.description(),
            DescribeSubnetsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeSubnetsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeTags
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeTagsError {
    pub fn from_body(body: &str) -> DescribeTagsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeTagsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeTagsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeTagsError {
    fn from(err: XmlParseError) -> DescribeTagsError {
        let XmlParseError(message) = err;
        DescribeTagsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeTagsError {
    fn from(err: CredentialsError) -> DescribeTagsError {
        DescribeTagsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeTagsError {
    fn from(err: HttpDispatchError) -> DescribeTagsError {
        DescribeTagsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeTagsError {
    fn from(err: io::Error) -> DescribeTagsError {
        DescribeTagsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeTagsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeTagsError {
    fn description(&self) -> &str {
        match *self {
            DescribeTagsError::Validation(ref cause) => cause,
            DescribeTagsError::Credentials(ref err) => err.description(),
            DescribeTagsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeTagsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVolumeAttribute
#[derive(Debug, PartialEq)]
pub enum DescribeVolumeAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVolumeAttributeError {
    pub fn from_body(body: &str) -> DescribeVolumeAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVolumeAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVolumeAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVolumeAttributeError {
    fn from(err: XmlParseError) -> DescribeVolumeAttributeError {
        let XmlParseError(message) = err;
        DescribeVolumeAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVolumeAttributeError {
    fn from(err: CredentialsError) -> DescribeVolumeAttributeError {
        DescribeVolumeAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVolumeAttributeError {
    fn from(err: HttpDispatchError) -> DescribeVolumeAttributeError {
        DescribeVolumeAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVolumeAttributeError {
    fn from(err: io::Error) -> DescribeVolumeAttributeError {
        DescribeVolumeAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVolumeAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVolumeAttributeError {
    fn description(&self) -> &str {
        match *self {
            DescribeVolumeAttributeError::Validation(ref cause) => cause,
            DescribeVolumeAttributeError::Credentials(ref err) => err.description(),
            DescribeVolumeAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVolumeAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVolumeStatus
#[derive(Debug, PartialEq)]
pub enum DescribeVolumeStatusError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVolumeStatusError {
    pub fn from_body(body: &str) -> DescribeVolumeStatusError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVolumeStatusError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVolumeStatusError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVolumeStatusError {
    fn from(err: XmlParseError) -> DescribeVolumeStatusError {
        let XmlParseError(message) = err;
        DescribeVolumeStatusError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVolumeStatusError {
    fn from(err: CredentialsError) -> DescribeVolumeStatusError {
        DescribeVolumeStatusError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVolumeStatusError {
    fn from(err: HttpDispatchError) -> DescribeVolumeStatusError {
        DescribeVolumeStatusError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVolumeStatusError {
    fn from(err: io::Error) -> DescribeVolumeStatusError {
        DescribeVolumeStatusError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVolumeStatusError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVolumeStatusError {
    fn description(&self) -> &str {
        match *self {
            DescribeVolumeStatusError::Validation(ref cause) => cause,
            DescribeVolumeStatusError::Credentials(ref err) => err.description(),
            DescribeVolumeStatusError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVolumeStatusError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVolumes
#[derive(Debug, PartialEq)]
pub enum DescribeVolumesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVolumesError {
    pub fn from_body(body: &str) -> DescribeVolumesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVolumesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVolumesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVolumesError {
    fn from(err: XmlParseError) -> DescribeVolumesError {
        let XmlParseError(message) = err;
        DescribeVolumesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVolumesError {
    fn from(err: CredentialsError) -> DescribeVolumesError {
        DescribeVolumesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVolumesError {
    fn from(err: HttpDispatchError) -> DescribeVolumesError {
        DescribeVolumesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVolumesError {
    fn from(err: io::Error) -> DescribeVolumesError {
        DescribeVolumesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVolumesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVolumesError {
    fn description(&self) -> &str {
        match *self {
            DescribeVolumesError::Validation(ref cause) => cause,
            DescribeVolumesError::Credentials(ref err) => err.description(),
            DescribeVolumesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeVolumesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVolumesModifications
#[derive(Debug, PartialEq)]
pub enum DescribeVolumesModificationsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVolumesModificationsError {
    pub fn from_body(body: &str) -> DescribeVolumesModificationsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVolumesModificationsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVolumesModificationsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVolumesModificationsError {
    fn from(err: XmlParseError) -> DescribeVolumesModificationsError {
        let XmlParseError(message) = err;
        DescribeVolumesModificationsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVolumesModificationsError {
    fn from(err: CredentialsError) -> DescribeVolumesModificationsError {
        DescribeVolumesModificationsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVolumesModificationsError {
    fn from(err: HttpDispatchError) -> DescribeVolumesModificationsError {
        DescribeVolumesModificationsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVolumesModificationsError {
    fn from(err: io::Error) -> DescribeVolumesModificationsError {
        DescribeVolumesModificationsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVolumesModificationsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVolumesModificationsError {
    fn description(&self) -> &str {
        match *self {
            DescribeVolumesModificationsError::Validation(ref cause) => cause,
            DescribeVolumesModificationsError::Credentials(ref err) => err.description(),
            DescribeVolumesModificationsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVolumesModificationsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpcAttribute
#[derive(Debug, PartialEq)]
pub enum DescribeVpcAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpcAttributeError {
    pub fn from_body(body: &str) -> DescribeVpcAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpcAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpcAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpcAttributeError {
    fn from(err: XmlParseError) -> DescribeVpcAttributeError {
        let XmlParseError(message) = err;
        DescribeVpcAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpcAttributeError {
    fn from(err: CredentialsError) -> DescribeVpcAttributeError {
        DescribeVpcAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpcAttributeError {
    fn from(err: HttpDispatchError) -> DescribeVpcAttributeError {
        DescribeVpcAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpcAttributeError {
    fn from(err: io::Error) -> DescribeVpcAttributeError {
        DescribeVpcAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpcAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpcAttributeError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpcAttributeError::Validation(ref cause) => cause,
            DescribeVpcAttributeError::Credentials(ref err) => err.description(),
            DescribeVpcAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpcAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpcClassicLink
#[derive(Debug, PartialEq)]
pub enum DescribeVpcClassicLinkError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpcClassicLinkError {
    pub fn from_body(body: &str) -> DescribeVpcClassicLinkError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpcClassicLinkError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpcClassicLinkError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpcClassicLinkError {
    fn from(err: XmlParseError) -> DescribeVpcClassicLinkError {
        let XmlParseError(message) = err;
        DescribeVpcClassicLinkError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpcClassicLinkError {
    fn from(err: CredentialsError) -> DescribeVpcClassicLinkError {
        DescribeVpcClassicLinkError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpcClassicLinkError {
    fn from(err: HttpDispatchError) -> DescribeVpcClassicLinkError {
        DescribeVpcClassicLinkError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpcClassicLinkError {
    fn from(err: io::Error) -> DescribeVpcClassicLinkError {
        DescribeVpcClassicLinkError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpcClassicLinkError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpcClassicLinkError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpcClassicLinkError::Validation(ref cause) => cause,
            DescribeVpcClassicLinkError::Credentials(ref err) => err.description(),
            DescribeVpcClassicLinkError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpcClassicLinkError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpcClassicLinkDnsSupport
#[derive(Debug, PartialEq)]
pub enum DescribeVpcClassicLinkDnsSupportError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpcClassicLinkDnsSupportError {
    pub fn from_body(body: &str) -> DescribeVpcClassicLinkDnsSupportError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpcClassicLinkDnsSupportError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpcClassicLinkDnsSupportError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpcClassicLinkDnsSupportError {
    fn from(err: XmlParseError) -> DescribeVpcClassicLinkDnsSupportError {
        let XmlParseError(message) = err;
        DescribeVpcClassicLinkDnsSupportError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpcClassicLinkDnsSupportError {
    fn from(err: CredentialsError) -> DescribeVpcClassicLinkDnsSupportError {
        DescribeVpcClassicLinkDnsSupportError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpcClassicLinkDnsSupportError {
    fn from(err: HttpDispatchError) -> DescribeVpcClassicLinkDnsSupportError {
        DescribeVpcClassicLinkDnsSupportError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpcClassicLinkDnsSupportError {
    fn from(err: io::Error) -> DescribeVpcClassicLinkDnsSupportError {
        DescribeVpcClassicLinkDnsSupportError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpcClassicLinkDnsSupportError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpcClassicLinkDnsSupportError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpcClassicLinkDnsSupportError::Validation(ref cause) => cause,
            DescribeVpcClassicLinkDnsSupportError::Credentials(ref err) => err.description(),
            DescribeVpcClassicLinkDnsSupportError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpcClassicLinkDnsSupportError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpcEndpointServices
#[derive(Debug, PartialEq)]
pub enum DescribeVpcEndpointServicesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpcEndpointServicesError {
    pub fn from_body(body: &str) -> DescribeVpcEndpointServicesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpcEndpointServicesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpcEndpointServicesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpcEndpointServicesError {
    fn from(err: XmlParseError) -> DescribeVpcEndpointServicesError {
        let XmlParseError(message) = err;
        DescribeVpcEndpointServicesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpcEndpointServicesError {
    fn from(err: CredentialsError) -> DescribeVpcEndpointServicesError {
        DescribeVpcEndpointServicesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpcEndpointServicesError {
    fn from(err: HttpDispatchError) -> DescribeVpcEndpointServicesError {
        DescribeVpcEndpointServicesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpcEndpointServicesError {
    fn from(err: io::Error) -> DescribeVpcEndpointServicesError {
        DescribeVpcEndpointServicesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpcEndpointServicesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpcEndpointServicesError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpcEndpointServicesError::Validation(ref cause) => cause,
            DescribeVpcEndpointServicesError::Credentials(ref err) => err.description(),
            DescribeVpcEndpointServicesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpcEndpointServicesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpcEndpoints
#[derive(Debug, PartialEq)]
pub enum DescribeVpcEndpointsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpcEndpointsError {
    pub fn from_body(body: &str) -> DescribeVpcEndpointsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpcEndpointsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpcEndpointsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpcEndpointsError {
    fn from(err: XmlParseError) -> DescribeVpcEndpointsError {
        let XmlParseError(message) = err;
        DescribeVpcEndpointsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpcEndpointsError {
    fn from(err: CredentialsError) -> DescribeVpcEndpointsError {
        DescribeVpcEndpointsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpcEndpointsError {
    fn from(err: HttpDispatchError) -> DescribeVpcEndpointsError {
        DescribeVpcEndpointsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpcEndpointsError {
    fn from(err: io::Error) -> DescribeVpcEndpointsError {
        DescribeVpcEndpointsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpcEndpointsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpcEndpointsError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpcEndpointsError::Validation(ref cause) => cause,
            DescribeVpcEndpointsError::Credentials(ref err) => err.description(),
            DescribeVpcEndpointsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpcEndpointsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpcPeeringConnections
#[derive(Debug, PartialEq)]
pub enum DescribeVpcPeeringConnectionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpcPeeringConnectionsError {
    pub fn from_body(body: &str) -> DescribeVpcPeeringConnectionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpcPeeringConnectionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpcPeeringConnectionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpcPeeringConnectionsError {
    fn from(err: XmlParseError) -> DescribeVpcPeeringConnectionsError {
        let XmlParseError(message) = err;
        DescribeVpcPeeringConnectionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpcPeeringConnectionsError {
    fn from(err: CredentialsError) -> DescribeVpcPeeringConnectionsError {
        DescribeVpcPeeringConnectionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpcPeeringConnectionsError {
    fn from(err: HttpDispatchError) -> DescribeVpcPeeringConnectionsError {
        DescribeVpcPeeringConnectionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpcPeeringConnectionsError {
    fn from(err: io::Error) -> DescribeVpcPeeringConnectionsError {
        DescribeVpcPeeringConnectionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpcPeeringConnectionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpcPeeringConnectionsError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpcPeeringConnectionsError::Validation(ref cause) => cause,
            DescribeVpcPeeringConnectionsError::Credentials(ref err) => err.description(),
            DescribeVpcPeeringConnectionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpcPeeringConnectionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpcs
#[derive(Debug, PartialEq)]
pub enum DescribeVpcsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpcsError {
    pub fn from_body(body: &str) -> DescribeVpcsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpcsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpcsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpcsError {
    fn from(err: XmlParseError) -> DescribeVpcsError {
        let XmlParseError(message) = err;
        DescribeVpcsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpcsError {
    fn from(err: CredentialsError) -> DescribeVpcsError {
        DescribeVpcsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpcsError {
    fn from(err: HttpDispatchError) -> DescribeVpcsError {
        DescribeVpcsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpcsError {
    fn from(err: io::Error) -> DescribeVpcsError {
        DescribeVpcsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpcsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpcsError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpcsError::Validation(ref cause) => cause,
            DescribeVpcsError::Credentials(ref err) => err.description(),
            DescribeVpcsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DescribeVpcsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpnConnections
#[derive(Debug, PartialEq)]
pub enum DescribeVpnConnectionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpnConnectionsError {
    pub fn from_body(body: &str) -> DescribeVpnConnectionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpnConnectionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpnConnectionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpnConnectionsError {
    fn from(err: XmlParseError) -> DescribeVpnConnectionsError {
        let XmlParseError(message) = err;
        DescribeVpnConnectionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpnConnectionsError {
    fn from(err: CredentialsError) -> DescribeVpnConnectionsError {
        DescribeVpnConnectionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpnConnectionsError {
    fn from(err: HttpDispatchError) -> DescribeVpnConnectionsError {
        DescribeVpnConnectionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpnConnectionsError {
    fn from(err: io::Error) -> DescribeVpnConnectionsError {
        DescribeVpnConnectionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpnConnectionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpnConnectionsError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpnConnectionsError::Validation(ref cause) => cause,
            DescribeVpnConnectionsError::Credentials(ref err) => err.description(),
            DescribeVpnConnectionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpnConnectionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeVpnGateways
#[derive(Debug, PartialEq)]
pub enum DescribeVpnGatewaysError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeVpnGatewaysError {
    pub fn from_body(body: &str) -> DescribeVpnGatewaysError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DescribeVpnGatewaysError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeVpnGatewaysError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DescribeVpnGatewaysError {
    fn from(err: XmlParseError) -> DescribeVpnGatewaysError {
        let XmlParseError(message) = err;
        DescribeVpnGatewaysError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DescribeVpnGatewaysError {
    fn from(err: CredentialsError) -> DescribeVpnGatewaysError {
        DescribeVpnGatewaysError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeVpnGatewaysError {
    fn from(err: HttpDispatchError) -> DescribeVpnGatewaysError {
        DescribeVpnGatewaysError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeVpnGatewaysError {
    fn from(err: io::Error) -> DescribeVpnGatewaysError {
        DescribeVpnGatewaysError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeVpnGatewaysError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeVpnGatewaysError {
    fn description(&self) -> &str {
        match *self {
            DescribeVpnGatewaysError::Validation(ref cause) => cause,
            DescribeVpnGatewaysError::Credentials(ref err) => err.description(),
            DescribeVpnGatewaysError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeVpnGatewaysError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DetachClassicLinkVpc
#[derive(Debug, PartialEq)]
pub enum DetachClassicLinkVpcError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DetachClassicLinkVpcError {
    pub fn from_body(body: &str) -> DetachClassicLinkVpcError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DetachClassicLinkVpcError::Unknown(String::from(body)),
                }
            }
            Err(_) => DetachClassicLinkVpcError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DetachClassicLinkVpcError {
    fn from(err: XmlParseError) -> DetachClassicLinkVpcError {
        let XmlParseError(message) = err;
        DetachClassicLinkVpcError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DetachClassicLinkVpcError {
    fn from(err: CredentialsError) -> DetachClassicLinkVpcError {
        DetachClassicLinkVpcError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DetachClassicLinkVpcError {
    fn from(err: HttpDispatchError) -> DetachClassicLinkVpcError {
        DetachClassicLinkVpcError::HttpDispatch(err)
    }
}
impl From<io::Error> for DetachClassicLinkVpcError {
    fn from(err: io::Error) -> DetachClassicLinkVpcError {
        DetachClassicLinkVpcError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DetachClassicLinkVpcError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DetachClassicLinkVpcError {
    fn description(&self) -> &str {
        match *self {
            DetachClassicLinkVpcError::Validation(ref cause) => cause,
            DetachClassicLinkVpcError::Credentials(ref err) => err.description(),
            DetachClassicLinkVpcError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DetachClassicLinkVpcError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DetachInternetGateway
#[derive(Debug, PartialEq)]
pub enum DetachInternetGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DetachInternetGatewayError {
    pub fn from_body(body: &str) -> DetachInternetGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DetachInternetGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => DetachInternetGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DetachInternetGatewayError {
    fn from(err: XmlParseError) -> DetachInternetGatewayError {
        let XmlParseError(message) = err;
        DetachInternetGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DetachInternetGatewayError {
    fn from(err: CredentialsError) -> DetachInternetGatewayError {
        DetachInternetGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DetachInternetGatewayError {
    fn from(err: HttpDispatchError) -> DetachInternetGatewayError {
        DetachInternetGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for DetachInternetGatewayError {
    fn from(err: io::Error) -> DetachInternetGatewayError {
        DetachInternetGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DetachInternetGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DetachInternetGatewayError {
    fn description(&self) -> &str {
        match *self {
            DetachInternetGatewayError::Validation(ref cause) => cause,
            DetachInternetGatewayError::Credentials(ref err) => err.description(),
            DetachInternetGatewayError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DetachInternetGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DetachNetworkInterface
#[derive(Debug, PartialEq)]
pub enum DetachNetworkInterfaceError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DetachNetworkInterfaceError {
    pub fn from_body(body: &str) -> DetachNetworkInterfaceError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DetachNetworkInterfaceError::Unknown(String::from(body)),
                }
            }
            Err(_) => DetachNetworkInterfaceError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DetachNetworkInterfaceError {
    fn from(err: XmlParseError) -> DetachNetworkInterfaceError {
        let XmlParseError(message) = err;
        DetachNetworkInterfaceError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DetachNetworkInterfaceError {
    fn from(err: CredentialsError) -> DetachNetworkInterfaceError {
        DetachNetworkInterfaceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DetachNetworkInterfaceError {
    fn from(err: HttpDispatchError) -> DetachNetworkInterfaceError {
        DetachNetworkInterfaceError::HttpDispatch(err)
    }
}
impl From<io::Error> for DetachNetworkInterfaceError {
    fn from(err: io::Error) -> DetachNetworkInterfaceError {
        DetachNetworkInterfaceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DetachNetworkInterfaceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DetachNetworkInterfaceError {
    fn description(&self) -> &str {
        match *self {
            DetachNetworkInterfaceError::Validation(ref cause) => cause,
            DetachNetworkInterfaceError::Credentials(ref err) => err.description(),
            DetachNetworkInterfaceError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DetachNetworkInterfaceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DetachVolume
#[derive(Debug, PartialEq)]
pub enum DetachVolumeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DetachVolumeError {
    pub fn from_body(body: &str) -> DetachVolumeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DetachVolumeError::Unknown(String::from(body)),
                }
            }
            Err(_) => DetachVolumeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DetachVolumeError {
    fn from(err: XmlParseError) -> DetachVolumeError {
        let XmlParseError(message) = err;
        DetachVolumeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DetachVolumeError {
    fn from(err: CredentialsError) -> DetachVolumeError {
        DetachVolumeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DetachVolumeError {
    fn from(err: HttpDispatchError) -> DetachVolumeError {
        DetachVolumeError::HttpDispatch(err)
    }
}
impl From<io::Error> for DetachVolumeError {
    fn from(err: io::Error) -> DetachVolumeError {
        DetachVolumeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DetachVolumeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DetachVolumeError {
    fn description(&self) -> &str {
        match *self {
            DetachVolumeError::Validation(ref cause) => cause,
            DetachVolumeError::Credentials(ref err) => err.description(),
            DetachVolumeError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DetachVolumeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DetachVpnGateway
#[derive(Debug, PartialEq)]
pub enum DetachVpnGatewayError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DetachVpnGatewayError {
    pub fn from_body(body: &str) -> DetachVpnGatewayError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DetachVpnGatewayError::Unknown(String::from(body)),
                }
            }
            Err(_) => DetachVpnGatewayError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DetachVpnGatewayError {
    fn from(err: XmlParseError) -> DetachVpnGatewayError {
        let XmlParseError(message) = err;
        DetachVpnGatewayError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DetachVpnGatewayError {
    fn from(err: CredentialsError) -> DetachVpnGatewayError {
        DetachVpnGatewayError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DetachVpnGatewayError {
    fn from(err: HttpDispatchError) -> DetachVpnGatewayError {
        DetachVpnGatewayError::HttpDispatch(err)
    }
}
impl From<io::Error> for DetachVpnGatewayError {
    fn from(err: io::Error) -> DetachVpnGatewayError {
        DetachVpnGatewayError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DetachVpnGatewayError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DetachVpnGatewayError {
    fn description(&self) -> &str {
        match *self {
            DetachVpnGatewayError::Validation(ref cause) => cause,
            DetachVpnGatewayError::Credentials(ref err) => err.description(),
            DetachVpnGatewayError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DetachVpnGatewayError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisableVgwRoutePropagation
#[derive(Debug, PartialEq)]
pub enum DisableVgwRoutePropagationError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisableVgwRoutePropagationError {
    pub fn from_body(body: &str) -> DisableVgwRoutePropagationError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisableVgwRoutePropagationError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisableVgwRoutePropagationError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisableVgwRoutePropagationError {
    fn from(err: XmlParseError) -> DisableVgwRoutePropagationError {
        let XmlParseError(message) = err;
        DisableVgwRoutePropagationError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisableVgwRoutePropagationError {
    fn from(err: CredentialsError) -> DisableVgwRoutePropagationError {
        DisableVgwRoutePropagationError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisableVgwRoutePropagationError {
    fn from(err: HttpDispatchError) -> DisableVgwRoutePropagationError {
        DisableVgwRoutePropagationError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisableVgwRoutePropagationError {
    fn from(err: io::Error) -> DisableVgwRoutePropagationError {
        DisableVgwRoutePropagationError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisableVgwRoutePropagationError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisableVgwRoutePropagationError {
    fn description(&self) -> &str {
        match *self {
            DisableVgwRoutePropagationError::Validation(ref cause) => cause,
            DisableVgwRoutePropagationError::Credentials(ref err) => err.description(),
            DisableVgwRoutePropagationError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisableVgwRoutePropagationError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisableVpcClassicLink
#[derive(Debug, PartialEq)]
pub enum DisableVpcClassicLinkError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisableVpcClassicLinkError {
    pub fn from_body(body: &str) -> DisableVpcClassicLinkError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisableVpcClassicLinkError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisableVpcClassicLinkError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisableVpcClassicLinkError {
    fn from(err: XmlParseError) -> DisableVpcClassicLinkError {
        let XmlParseError(message) = err;
        DisableVpcClassicLinkError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisableVpcClassicLinkError {
    fn from(err: CredentialsError) -> DisableVpcClassicLinkError {
        DisableVpcClassicLinkError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisableVpcClassicLinkError {
    fn from(err: HttpDispatchError) -> DisableVpcClassicLinkError {
        DisableVpcClassicLinkError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisableVpcClassicLinkError {
    fn from(err: io::Error) -> DisableVpcClassicLinkError {
        DisableVpcClassicLinkError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisableVpcClassicLinkError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisableVpcClassicLinkError {
    fn description(&self) -> &str {
        match *self {
            DisableVpcClassicLinkError::Validation(ref cause) => cause,
            DisableVpcClassicLinkError::Credentials(ref err) => err.description(),
            DisableVpcClassicLinkError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisableVpcClassicLinkError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisableVpcClassicLinkDnsSupport
#[derive(Debug, PartialEq)]
pub enum DisableVpcClassicLinkDnsSupportError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisableVpcClassicLinkDnsSupportError {
    pub fn from_body(body: &str) -> DisableVpcClassicLinkDnsSupportError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisableVpcClassicLinkDnsSupportError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisableVpcClassicLinkDnsSupportError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisableVpcClassicLinkDnsSupportError {
    fn from(err: XmlParseError) -> DisableVpcClassicLinkDnsSupportError {
        let XmlParseError(message) = err;
        DisableVpcClassicLinkDnsSupportError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisableVpcClassicLinkDnsSupportError {
    fn from(err: CredentialsError) -> DisableVpcClassicLinkDnsSupportError {
        DisableVpcClassicLinkDnsSupportError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisableVpcClassicLinkDnsSupportError {
    fn from(err: HttpDispatchError) -> DisableVpcClassicLinkDnsSupportError {
        DisableVpcClassicLinkDnsSupportError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisableVpcClassicLinkDnsSupportError {
    fn from(err: io::Error) -> DisableVpcClassicLinkDnsSupportError {
        DisableVpcClassicLinkDnsSupportError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisableVpcClassicLinkDnsSupportError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisableVpcClassicLinkDnsSupportError {
    fn description(&self) -> &str {
        match *self {
            DisableVpcClassicLinkDnsSupportError::Validation(ref cause) => cause,
            DisableVpcClassicLinkDnsSupportError::Credentials(ref err) => err.description(),
            DisableVpcClassicLinkDnsSupportError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisableVpcClassicLinkDnsSupportError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisassociateAddress
#[derive(Debug, PartialEq)]
pub enum DisassociateAddressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisassociateAddressError {
    pub fn from_body(body: &str) -> DisassociateAddressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisassociateAddressError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisassociateAddressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisassociateAddressError {
    fn from(err: XmlParseError) -> DisassociateAddressError {
        let XmlParseError(message) = err;
        DisassociateAddressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisassociateAddressError {
    fn from(err: CredentialsError) -> DisassociateAddressError {
        DisassociateAddressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisassociateAddressError {
    fn from(err: HttpDispatchError) -> DisassociateAddressError {
        DisassociateAddressError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisassociateAddressError {
    fn from(err: io::Error) -> DisassociateAddressError {
        DisassociateAddressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisassociateAddressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisassociateAddressError {
    fn description(&self) -> &str {
        match *self {
            DisassociateAddressError::Validation(ref cause) => cause,
            DisassociateAddressError::Credentials(ref err) => err.description(),
            DisassociateAddressError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisassociateAddressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisassociateIamInstanceProfile
#[derive(Debug, PartialEq)]
pub enum DisassociateIamInstanceProfileError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisassociateIamInstanceProfileError {
    pub fn from_body(body: &str) -> DisassociateIamInstanceProfileError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisassociateIamInstanceProfileError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisassociateIamInstanceProfileError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisassociateIamInstanceProfileError {
    fn from(err: XmlParseError) -> DisassociateIamInstanceProfileError {
        let XmlParseError(message) = err;
        DisassociateIamInstanceProfileError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisassociateIamInstanceProfileError {
    fn from(err: CredentialsError) -> DisassociateIamInstanceProfileError {
        DisassociateIamInstanceProfileError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisassociateIamInstanceProfileError {
    fn from(err: HttpDispatchError) -> DisassociateIamInstanceProfileError {
        DisassociateIamInstanceProfileError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisassociateIamInstanceProfileError {
    fn from(err: io::Error) -> DisassociateIamInstanceProfileError {
        DisassociateIamInstanceProfileError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisassociateIamInstanceProfileError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisassociateIamInstanceProfileError {
    fn description(&self) -> &str {
        match *self {
            DisassociateIamInstanceProfileError::Validation(ref cause) => cause,
            DisassociateIamInstanceProfileError::Credentials(ref err) => err.description(),
            DisassociateIamInstanceProfileError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisassociateIamInstanceProfileError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisassociateRouteTable
#[derive(Debug, PartialEq)]
pub enum DisassociateRouteTableError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisassociateRouteTableError {
    pub fn from_body(body: &str) -> DisassociateRouteTableError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisassociateRouteTableError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisassociateRouteTableError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisassociateRouteTableError {
    fn from(err: XmlParseError) -> DisassociateRouteTableError {
        let XmlParseError(message) = err;
        DisassociateRouteTableError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisassociateRouteTableError {
    fn from(err: CredentialsError) -> DisassociateRouteTableError {
        DisassociateRouteTableError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisassociateRouteTableError {
    fn from(err: HttpDispatchError) -> DisassociateRouteTableError {
        DisassociateRouteTableError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisassociateRouteTableError {
    fn from(err: io::Error) -> DisassociateRouteTableError {
        DisassociateRouteTableError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisassociateRouteTableError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisassociateRouteTableError {
    fn description(&self) -> &str {
        match *self {
            DisassociateRouteTableError::Validation(ref cause) => cause,
            DisassociateRouteTableError::Credentials(ref err) => err.description(),
            DisassociateRouteTableError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisassociateRouteTableError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisassociateSubnetCidrBlock
#[derive(Debug, PartialEq)]
pub enum DisassociateSubnetCidrBlockError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisassociateSubnetCidrBlockError {
    pub fn from_body(body: &str) -> DisassociateSubnetCidrBlockError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisassociateSubnetCidrBlockError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisassociateSubnetCidrBlockError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisassociateSubnetCidrBlockError {
    fn from(err: XmlParseError) -> DisassociateSubnetCidrBlockError {
        let XmlParseError(message) = err;
        DisassociateSubnetCidrBlockError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisassociateSubnetCidrBlockError {
    fn from(err: CredentialsError) -> DisassociateSubnetCidrBlockError {
        DisassociateSubnetCidrBlockError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisassociateSubnetCidrBlockError {
    fn from(err: HttpDispatchError) -> DisassociateSubnetCidrBlockError {
        DisassociateSubnetCidrBlockError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisassociateSubnetCidrBlockError {
    fn from(err: io::Error) -> DisassociateSubnetCidrBlockError {
        DisassociateSubnetCidrBlockError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisassociateSubnetCidrBlockError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisassociateSubnetCidrBlockError {
    fn description(&self) -> &str {
        match *self {
            DisassociateSubnetCidrBlockError::Validation(ref cause) => cause,
            DisassociateSubnetCidrBlockError::Credentials(ref err) => err.description(),
            DisassociateSubnetCidrBlockError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisassociateSubnetCidrBlockError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DisassociateVpcCidrBlock
#[derive(Debug, PartialEq)]
pub enum DisassociateVpcCidrBlockError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DisassociateVpcCidrBlockError {
    pub fn from_body(body: &str) -> DisassociateVpcCidrBlockError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => DisassociateVpcCidrBlockError::Unknown(String::from(body)),
                }
            }
            Err(_) => DisassociateVpcCidrBlockError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for DisassociateVpcCidrBlockError {
    fn from(err: XmlParseError) -> DisassociateVpcCidrBlockError {
        let XmlParseError(message) = err;
        DisassociateVpcCidrBlockError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for DisassociateVpcCidrBlockError {
    fn from(err: CredentialsError) -> DisassociateVpcCidrBlockError {
        DisassociateVpcCidrBlockError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DisassociateVpcCidrBlockError {
    fn from(err: HttpDispatchError) -> DisassociateVpcCidrBlockError {
        DisassociateVpcCidrBlockError::HttpDispatch(err)
    }
}
impl From<io::Error> for DisassociateVpcCidrBlockError {
    fn from(err: io::Error) -> DisassociateVpcCidrBlockError {
        DisassociateVpcCidrBlockError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DisassociateVpcCidrBlockError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DisassociateVpcCidrBlockError {
    fn description(&self) -> &str {
        match *self {
            DisassociateVpcCidrBlockError::Validation(ref cause) => cause,
            DisassociateVpcCidrBlockError::Credentials(ref err) => err.description(),
            DisassociateVpcCidrBlockError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DisassociateVpcCidrBlockError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by EnableVgwRoutePropagation
#[derive(Debug, PartialEq)]
pub enum EnableVgwRoutePropagationError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl EnableVgwRoutePropagationError {
    pub fn from_body(body: &str) -> EnableVgwRoutePropagationError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => EnableVgwRoutePropagationError::Unknown(String::from(body)),
                }
            }
            Err(_) => EnableVgwRoutePropagationError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for EnableVgwRoutePropagationError {
    fn from(err: XmlParseError) -> EnableVgwRoutePropagationError {
        let XmlParseError(message) = err;
        EnableVgwRoutePropagationError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for EnableVgwRoutePropagationError {
    fn from(err: CredentialsError) -> EnableVgwRoutePropagationError {
        EnableVgwRoutePropagationError::Credentials(err)
    }
}
impl From<HttpDispatchError> for EnableVgwRoutePropagationError {
    fn from(err: HttpDispatchError) -> EnableVgwRoutePropagationError {
        EnableVgwRoutePropagationError::HttpDispatch(err)
    }
}
impl From<io::Error> for EnableVgwRoutePropagationError {
    fn from(err: io::Error) -> EnableVgwRoutePropagationError {
        EnableVgwRoutePropagationError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for EnableVgwRoutePropagationError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for EnableVgwRoutePropagationError {
    fn description(&self) -> &str {
        match *self {
            EnableVgwRoutePropagationError::Validation(ref cause) => cause,
            EnableVgwRoutePropagationError::Credentials(ref err) => err.description(),
            EnableVgwRoutePropagationError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            EnableVgwRoutePropagationError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by EnableVolumeIO
#[derive(Debug, PartialEq)]
pub enum EnableVolumeIOError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl EnableVolumeIOError {
    pub fn from_body(body: &str) -> EnableVolumeIOError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => EnableVolumeIOError::Unknown(String::from(body)),
                }
            }
            Err(_) => EnableVolumeIOError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for EnableVolumeIOError {
    fn from(err: XmlParseError) -> EnableVolumeIOError {
        let XmlParseError(message) = err;
        EnableVolumeIOError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for EnableVolumeIOError {
    fn from(err: CredentialsError) -> EnableVolumeIOError {
        EnableVolumeIOError::Credentials(err)
    }
}
impl From<HttpDispatchError> for EnableVolumeIOError {
    fn from(err: HttpDispatchError) -> EnableVolumeIOError {
        EnableVolumeIOError::HttpDispatch(err)
    }
}
impl From<io::Error> for EnableVolumeIOError {
    fn from(err: io::Error) -> EnableVolumeIOError {
        EnableVolumeIOError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for EnableVolumeIOError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for EnableVolumeIOError {
    fn description(&self) -> &str {
        match *self {
            EnableVolumeIOError::Validation(ref cause) => cause,
            EnableVolumeIOError::Credentials(ref err) => err.description(),
            EnableVolumeIOError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            EnableVolumeIOError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by EnableVpcClassicLink
#[derive(Debug, PartialEq)]
pub enum EnableVpcClassicLinkError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl EnableVpcClassicLinkError {
    pub fn from_body(body: &str) -> EnableVpcClassicLinkError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => EnableVpcClassicLinkError::Unknown(String::from(body)),
                }
            }
            Err(_) => EnableVpcClassicLinkError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for EnableVpcClassicLinkError {
    fn from(err: XmlParseError) -> EnableVpcClassicLinkError {
        let XmlParseError(message) = err;
        EnableVpcClassicLinkError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for EnableVpcClassicLinkError {
    fn from(err: CredentialsError) -> EnableVpcClassicLinkError {
        EnableVpcClassicLinkError::Credentials(err)
    }
}
impl From<HttpDispatchError> for EnableVpcClassicLinkError {
    fn from(err: HttpDispatchError) -> EnableVpcClassicLinkError {
        EnableVpcClassicLinkError::HttpDispatch(err)
    }
}
impl From<io::Error> for EnableVpcClassicLinkError {
    fn from(err: io::Error) -> EnableVpcClassicLinkError {
        EnableVpcClassicLinkError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for EnableVpcClassicLinkError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for EnableVpcClassicLinkError {
    fn description(&self) -> &str {
        match *self {
            EnableVpcClassicLinkError::Validation(ref cause) => cause,
            EnableVpcClassicLinkError::Credentials(ref err) => err.description(),
            EnableVpcClassicLinkError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            EnableVpcClassicLinkError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by EnableVpcClassicLinkDnsSupport
#[derive(Debug, PartialEq)]
pub enum EnableVpcClassicLinkDnsSupportError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl EnableVpcClassicLinkDnsSupportError {
    pub fn from_body(body: &str) -> EnableVpcClassicLinkDnsSupportError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => EnableVpcClassicLinkDnsSupportError::Unknown(String::from(body)),
                }
            }
            Err(_) => EnableVpcClassicLinkDnsSupportError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for EnableVpcClassicLinkDnsSupportError {
    fn from(err: XmlParseError) -> EnableVpcClassicLinkDnsSupportError {
        let XmlParseError(message) = err;
        EnableVpcClassicLinkDnsSupportError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for EnableVpcClassicLinkDnsSupportError {
    fn from(err: CredentialsError) -> EnableVpcClassicLinkDnsSupportError {
        EnableVpcClassicLinkDnsSupportError::Credentials(err)
    }
}
impl From<HttpDispatchError> for EnableVpcClassicLinkDnsSupportError {
    fn from(err: HttpDispatchError) -> EnableVpcClassicLinkDnsSupportError {
        EnableVpcClassicLinkDnsSupportError::HttpDispatch(err)
    }
}
impl From<io::Error> for EnableVpcClassicLinkDnsSupportError {
    fn from(err: io::Error) -> EnableVpcClassicLinkDnsSupportError {
        EnableVpcClassicLinkDnsSupportError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for EnableVpcClassicLinkDnsSupportError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for EnableVpcClassicLinkDnsSupportError {
    fn description(&self) -> &str {
        match *self {
            EnableVpcClassicLinkDnsSupportError::Validation(ref cause) => cause,
            EnableVpcClassicLinkDnsSupportError::Credentials(ref err) => err.description(),
            EnableVpcClassicLinkDnsSupportError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            EnableVpcClassicLinkDnsSupportError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetConsoleOutput
#[derive(Debug, PartialEq)]
pub enum GetConsoleOutputError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetConsoleOutputError {
    pub fn from_body(body: &str) -> GetConsoleOutputError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => GetConsoleOutputError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetConsoleOutputError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for GetConsoleOutputError {
    fn from(err: XmlParseError) -> GetConsoleOutputError {
        let XmlParseError(message) = err;
        GetConsoleOutputError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for GetConsoleOutputError {
    fn from(err: CredentialsError) -> GetConsoleOutputError {
        GetConsoleOutputError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetConsoleOutputError {
    fn from(err: HttpDispatchError) -> GetConsoleOutputError {
        GetConsoleOutputError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetConsoleOutputError {
    fn from(err: io::Error) -> GetConsoleOutputError {
        GetConsoleOutputError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetConsoleOutputError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetConsoleOutputError {
    fn description(&self) -> &str {
        match *self {
            GetConsoleOutputError::Validation(ref cause) => cause,
            GetConsoleOutputError::Credentials(ref err) => err.description(),
            GetConsoleOutputError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            GetConsoleOutputError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetConsoleScreenshot
#[derive(Debug, PartialEq)]
pub enum GetConsoleScreenshotError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetConsoleScreenshotError {
    pub fn from_body(body: &str) -> GetConsoleScreenshotError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => GetConsoleScreenshotError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetConsoleScreenshotError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for GetConsoleScreenshotError {
    fn from(err: XmlParseError) -> GetConsoleScreenshotError {
        let XmlParseError(message) = err;
        GetConsoleScreenshotError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for GetConsoleScreenshotError {
    fn from(err: CredentialsError) -> GetConsoleScreenshotError {
        GetConsoleScreenshotError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetConsoleScreenshotError {
    fn from(err: HttpDispatchError) -> GetConsoleScreenshotError {
        GetConsoleScreenshotError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetConsoleScreenshotError {
    fn from(err: io::Error) -> GetConsoleScreenshotError {
        GetConsoleScreenshotError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetConsoleScreenshotError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetConsoleScreenshotError {
    fn description(&self) -> &str {
        match *self {
            GetConsoleScreenshotError::Validation(ref cause) => cause,
            GetConsoleScreenshotError::Credentials(ref err) => err.description(),
            GetConsoleScreenshotError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetConsoleScreenshotError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetHostReservationPurchasePreview
#[derive(Debug, PartialEq)]
pub enum GetHostReservationPurchasePreviewError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetHostReservationPurchasePreviewError {
    pub fn from_body(body: &str) -> GetHostReservationPurchasePreviewError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => GetHostReservationPurchasePreviewError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetHostReservationPurchasePreviewError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for GetHostReservationPurchasePreviewError {
    fn from(err: XmlParseError) -> GetHostReservationPurchasePreviewError {
        let XmlParseError(message) = err;
        GetHostReservationPurchasePreviewError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for GetHostReservationPurchasePreviewError {
    fn from(err: CredentialsError) -> GetHostReservationPurchasePreviewError {
        GetHostReservationPurchasePreviewError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetHostReservationPurchasePreviewError {
    fn from(err: HttpDispatchError) -> GetHostReservationPurchasePreviewError {
        GetHostReservationPurchasePreviewError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetHostReservationPurchasePreviewError {
    fn from(err: io::Error) -> GetHostReservationPurchasePreviewError {
        GetHostReservationPurchasePreviewError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetHostReservationPurchasePreviewError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetHostReservationPurchasePreviewError {
    fn description(&self) -> &str {
        match *self {
            GetHostReservationPurchasePreviewError::Validation(ref cause) => cause,
            GetHostReservationPurchasePreviewError::Credentials(ref err) => err.description(),
            GetHostReservationPurchasePreviewError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetHostReservationPurchasePreviewError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetPasswordData
#[derive(Debug, PartialEq)]
pub enum GetPasswordDataError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetPasswordDataError {
    pub fn from_body(body: &str) -> GetPasswordDataError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => GetPasswordDataError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetPasswordDataError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for GetPasswordDataError {
    fn from(err: XmlParseError) -> GetPasswordDataError {
        let XmlParseError(message) = err;
        GetPasswordDataError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for GetPasswordDataError {
    fn from(err: CredentialsError) -> GetPasswordDataError {
        GetPasswordDataError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetPasswordDataError {
    fn from(err: HttpDispatchError) -> GetPasswordDataError {
        GetPasswordDataError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetPasswordDataError {
    fn from(err: io::Error) -> GetPasswordDataError {
        GetPasswordDataError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetPasswordDataError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetPasswordDataError {
    fn description(&self) -> &str {
        match *self {
            GetPasswordDataError::Validation(ref cause) => cause,
            GetPasswordDataError::Credentials(ref err) => err.description(),
            GetPasswordDataError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            GetPasswordDataError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetReservedInstancesExchangeQuote
#[derive(Debug, PartialEq)]
pub enum GetReservedInstancesExchangeQuoteError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetReservedInstancesExchangeQuoteError {
    pub fn from_body(body: &str) -> GetReservedInstancesExchangeQuoteError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => GetReservedInstancesExchangeQuoteError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetReservedInstancesExchangeQuoteError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for GetReservedInstancesExchangeQuoteError {
    fn from(err: XmlParseError) -> GetReservedInstancesExchangeQuoteError {
        let XmlParseError(message) = err;
        GetReservedInstancesExchangeQuoteError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for GetReservedInstancesExchangeQuoteError {
    fn from(err: CredentialsError) -> GetReservedInstancesExchangeQuoteError {
        GetReservedInstancesExchangeQuoteError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetReservedInstancesExchangeQuoteError {
    fn from(err: HttpDispatchError) -> GetReservedInstancesExchangeQuoteError {
        GetReservedInstancesExchangeQuoteError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetReservedInstancesExchangeQuoteError {
    fn from(err: io::Error) -> GetReservedInstancesExchangeQuoteError {
        GetReservedInstancesExchangeQuoteError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetReservedInstancesExchangeQuoteError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetReservedInstancesExchangeQuoteError {
    fn description(&self) -> &str {
        match *self {
            GetReservedInstancesExchangeQuoteError::Validation(ref cause) => cause,
            GetReservedInstancesExchangeQuoteError::Credentials(ref err) => err.description(),
            GetReservedInstancesExchangeQuoteError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetReservedInstancesExchangeQuoteError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ImportImage
#[derive(Debug, PartialEq)]
pub enum ImportImageError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ImportImageError {
    pub fn from_body(body: &str) -> ImportImageError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ImportImageError::Unknown(String::from(body)),
                }
            }
            Err(_) => ImportImageError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ImportImageError {
    fn from(err: XmlParseError) -> ImportImageError {
        let XmlParseError(message) = err;
        ImportImageError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ImportImageError {
    fn from(err: CredentialsError) -> ImportImageError {
        ImportImageError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ImportImageError {
    fn from(err: HttpDispatchError) -> ImportImageError {
        ImportImageError::HttpDispatch(err)
    }
}
impl From<io::Error> for ImportImageError {
    fn from(err: io::Error) -> ImportImageError {
        ImportImageError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ImportImageError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ImportImageError {
    fn description(&self) -> &str {
        match *self {
            ImportImageError::Validation(ref cause) => cause,
            ImportImageError::Credentials(ref err) => err.description(),
            ImportImageError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ImportImageError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ImportInstance
#[derive(Debug, PartialEq)]
pub enum ImportInstanceError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ImportInstanceError {
    pub fn from_body(body: &str) -> ImportInstanceError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ImportInstanceError::Unknown(String::from(body)),
                }
            }
            Err(_) => ImportInstanceError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ImportInstanceError {
    fn from(err: XmlParseError) -> ImportInstanceError {
        let XmlParseError(message) = err;
        ImportInstanceError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ImportInstanceError {
    fn from(err: CredentialsError) -> ImportInstanceError {
        ImportInstanceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ImportInstanceError {
    fn from(err: HttpDispatchError) -> ImportInstanceError {
        ImportInstanceError::HttpDispatch(err)
    }
}
impl From<io::Error> for ImportInstanceError {
    fn from(err: io::Error) -> ImportInstanceError {
        ImportInstanceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ImportInstanceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ImportInstanceError {
    fn description(&self) -> &str {
        match *self {
            ImportInstanceError::Validation(ref cause) => cause,
            ImportInstanceError::Credentials(ref err) => err.description(),
            ImportInstanceError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ImportInstanceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ImportKeyPair
#[derive(Debug, PartialEq)]
pub enum ImportKeyPairError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ImportKeyPairError {
    pub fn from_body(body: &str) -> ImportKeyPairError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ImportKeyPairError::Unknown(String::from(body)),
                }
            }
            Err(_) => ImportKeyPairError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ImportKeyPairError {
    fn from(err: XmlParseError) -> ImportKeyPairError {
        let XmlParseError(message) = err;
        ImportKeyPairError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ImportKeyPairError {
    fn from(err: CredentialsError) -> ImportKeyPairError {
        ImportKeyPairError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ImportKeyPairError {
    fn from(err: HttpDispatchError) -> ImportKeyPairError {
        ImportKeyPairError::HttpDispatch(err)
    }
}
impl From<io::Error> for ImportKeyPairError {
    fn from(err: io::Error) -> ImportKeyPairError {
        ImportKeyPairError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ImportKeyPairError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ImportKeyPairError {
    fn description(&self) -> &str {
        match *self {
            ImportKeyPairError::Validation(ref cause) => cause,
            ImportKeyPairError::Credentials(ref err) => err.description(),
            ImportKeyPairError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ImportKeyPairError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ImportSnapshot
#[derive(Debug, PartialEq)]
pub enum ImportSnapshotError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ImportSnapshotError {
    pub fn from_body(body: &str) -> ImportSnapshotError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ImportSnapshotError::Unknown(String::from(body)),
                }
            }
            Err(_) => ImportSnapshotError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ImportSnapshotError {
    fn from(err: XmlParseError) -> ImportSnapshotError {
        let XmlParseError(message) = err;
        ImportSnapshotError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ImportSnapshotError {
    fn from(err: CredentialsError) -> ImportSnapshotError {
        ImportSnapshotError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ImportSnapshotError {
    fn from(err: HttpDispatchError) -> ImportSnapshotError {
        ImportSnapshotError::HttpDispatch(err)
    }
}
impl From<io::Error> for ImportSnapshotError {
    fn from(err: io::Error) -> ImportSnapshotError {
        ImportSnapshotError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ImportSnapshotError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ImportSnapshotError {
    fn description(&self) -> &str {
        match *self {
            ImportSnapshotError::Validation(ref cause) => cause,
            ImportSnapshotError::Credentials(ref err) => err.description(),
            ImportSnapshotError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ImportSnapshotError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ImportVolume
#[derive(Debug, PartialEq)]
pub enum ImportVolumeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ImportVolumeError {
    pub fn from_body(body: &str) -> ImportVolumeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ImportVolumeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ImportVolumeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ImportVolumeError {
    fn from(err: XmlParseError) -> ImportVolumeError {
        let XmlParseError(message) = err;
        ImportVolumeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ImportVolumeError {
    fn from(err: CredentialsError) -> ImportVolumeError {
        ImportVolumeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ImportVolumeError {
    fn from(err: HttpDispatchError) -> ImportVolumeError {
        ImportVolumeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ImportVolumeError {
    fn from(err: io::Error) -> ImportVolumeError {
        ImportVolumeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ImportVolumeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ImportVolumeError {
    fn description(&self) -> &str {
        match *self {
            ImportVolumeError::Validation(ref cause) => cause,
            ImportVolumeError::Credentials(ref err) => err.description(),
            ImportVolumeError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ImportVolumeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyHosts
#[derive(Debug, PartialEq)]
pub enum ModifyHostsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyHostsError {
    pub fn from_body(body: &str) -> ModifyHostsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyHostsError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyHostsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyHostsError {
    fn from(err: XmlParseError) -> ModifyHostsError {
        let XmlParseError(message) = err;
        ModifyHostsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyHostsError {
    fn from(err: CredentialsError) -> ModifyHostsError {
        ModifyHostsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyHostsError {
    fn from(err: HttpDispatchError) -> ModifyHostsError {
        ModifyHostsError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyHostsError {
    fn from(err: io::Error) -> ModifyHostsError {
        ModifyHostsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyHostsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyHostsError {
    fn description(&self) -> &str {
        match *self {
            ModifyHostsError::Validation(ref cause) => cause,
            ModifyHostsError::Credentials(ref err) => err.description(),
            ModifyHostsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ModifyHostsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyIdFormat
#[derive(Debug, PartialEq)]
pub enum ModifyIdFormatError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyIdFormatError {
    pub fn from_body(body: &str) -> ModifyIdFormatError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyIdFormatError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyIdFormatError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyIdFormatError {
    fn from(err: XmlParseError) -> ModifyIdFormatError {
        let XmlParseError(message) = err;
        ModifyIdFormatError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyIdFormatError {
    fn from(err: CredentialsError) -> ModifyIdFormatError {
        ModifyIdFormatError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyIdFormatError {
    fn from(err: HttpDispatchError) -> ModifyIdFormatError {
        ModifyIdFormatError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyIdFormatError {
    fn from(err: io::Error) -> ModifyIdFormatError {
        ModifyIdFormatError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyIdFormatError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyIdFormatError {
    fn description(&self) -> &str {
        match *self {
            ModifyIdFormatError::Validation(ref cause) => cause,
            ModifyIdFormatError::Credentials(ref err) => err.description(),
            ModifyIdFormatError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ModifyIdFormatError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyIdentityIdFormat
#[derive(Debug, PartialEq)]
pub enum ModifyIdentityIdFormatError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyIdentityIdFormatError {
    pub fn from_body(body: &str) -> ModifyIdentityIdFormatError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyIdentityIdFormatError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyIdentityIdFormatError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyIdentityIdFormatError {
    fn from(err: XmlParseError) -> ModifyIdentityIdFormatError {
        let XmlParseError(message) = err;
        ModifyIdentityIdFormatError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyIdentityIdFormatError {
    fn from(err: CredentialsError) -> ModifyIdentityIdFormatError {
        ModifyIdentityIdFormatError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyIdentityIdFormatError {
    fn from(err: HttpDispatchError) -> ModifyIdentityIdFormatError {
        ModifyIdentityIdFormatError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyIdentityIdFormatError {
    fn from(err: io::Error) -> ModifyIdentityIdFormatError {
        ModifyIdentityIdFormatError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyIdentityIdFormatError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyIdentityIdFormatError {
    fn description(&self) -> &str {
        match *self {
            ModifyIdentityIdFormatError::Validation(ref cause) => cause,
            ModifyIdentityIdFormatError::Credentials(ref err) => err.description(),
            ModifyIdentityIdFormatError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyIdentityIdFormatError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyImageAttribute
#[derive(Debug, PartialEq)]
pub enum ModifyImageAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyImageAttributeError {
    pub fn from_body(body: &str) -> ModifyImageAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyImageAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyImageAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyImageAttributeError {
    fn from(err: XmlParseError) -> ModifyImageAttributeError {
        let XmlParseError(message) = err;
        ModifyImageAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyImageAttributeError {
    fn from(err: CredentialsError) -> ModifyImageAttributeError {
        ModifyImageAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyImageAttributeError {
    fn from(err: HttpDispatchError) -> ModifyImageAttributeError {
        ModifyImageAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyImageAttributeError {
    fn from(err: io::Error) -> ModifyImageAttributeError {
        ModifyImageAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyImageAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyImageAttributeError {
    fn description(&self) -> &str {
        match *self {
            ModifyImageAttributeError::Validation(ref cause) => cause,
            ModifyImageAttributeError::Credentials(ref err) => err.description(),
            ModifyImageAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyImageAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyInstanceAttribute
#[derive(Debug, PartialEq)]
pub enum ModifyInstanceAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyInstanceAttributeError {
    pub fn from_body(body: &str) -> ModifyInstanceAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyInstanceAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyInstanceAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyInstanceAttributeError {
    fn from(err: XmlParseError) -> ModifyInstanceAttributeError {
        let XmlParseError(message) = err;
        ModifyInstanceAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyInstanceAttributeError {
    fn from(err: CredentialsError) -> ModifyInstanceAttributeError {
        ModifyInstanceAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyInstanceAttributeError {
    fn from(err: HttpDispatchError) -> ModifyInstanceAttributeError {
        ModifyInstanceAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyInstanceAttributeError {
    fn from(err: io::Error) -> ModifyInstanceAttributeError {
        ModifyInstanceAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyInstanceAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyInstanceAttributeError {
    fn description(&self) -> &str {
        match *self {
            ModifyInstanceAttributeError::Validation(ref cause) => cause,
            ModifyInstanceAttributeError::Credentials(ref err) => err.description(),
            ModifyInstanceAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyInstanceAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyInstancePlacement
#[derive(Debug, PartialEq)]
pub enum ModifyInstancePlacementError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyInstancePlacementError {
    pub fn from_body(body: &str) -> ModifyInstancePlacementError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyInstancePlacementError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyInstancePlacementError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyInstancePlacementError {
    fn from(err: XmlParseError) -> ModifyInstancePlacementError {
        let XmlParseError(message) = err;
        ModifyInstancePlacementError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyInstancePlacementError {
    fn from(err: CredentialsError) -> ModifyInstancePlacementError {
        ModifyInstancePlacementError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyInstancePlacementError {
    fn from(err: HttpDispatchError) -> ModifyInstancePlacementError {
        ModifyInstancePlacementError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyInstancePlacementError {
    fn from(err: io::Error) -> ModifyInstancePlacementError {
        ModifyInstancePlacementError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyInstancePlacementError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyInstancePlacementError {
    fn description(&self) -> &str {
        match *self {
            ModifyInstancePlacementError::Validation(ref cause) => cause,
            ModifyInstancePlacementError::Credentials(ref err) => err.description(),
            ModifyInstancePlacementError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyInstancePlacementError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyNetworkInterfaceAttribute
#[derive(Debug, PartialEq)]
pub enum ModifyNetworkInterfaceAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyNetworkInterfaceAttributeError {
    pub fn from_body(body: &str) -> ModifyNetworkInterfaceAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyNetworkInterfaceAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyNetworkInterfaceAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyNetworkInterfaceAttributeError {
    fn from(err: XmlParseError) -> ModifyNetworkInterfaceAttributeError {
        let XmlParseError(message) = err;
        ModifyNetworkInterfaceAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyNetworkInterfaceAttributeError {
    fn from(err: CredentialsError) -> ModifyNetworkInterfaceAttributeError {
        ModifyNetworkInterfaceAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyNetworkInterfaceAttributeError {
    fn from(err: HttpDispatchError) -> ModifyNetworkInterfaceAttributeError {
        ModifyNetworkInterfaceAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyNetworkInterfaceAttributeError {
    fn from(err: io::Error) -> ModifyNetworkInterfaceAttributeError {
        ModifyNetworkInterfaceAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyNetworkInterfaceAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyNetworkInterfaceAttributeError {
    fn description(&self) -> &str {
        match *self {
            ModifyNetworkInterfaceAttributeError::Validation(ref cause) => cause,
            ModifyNetworkInterfaceAttributeError::Credentials(ref err) => err.description(),
            ModifyNetworkInterfaceAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyNetworkInterfaceAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyReservedInstances
#[derive(Debug, PartialEq)]
pub enum ModifyReservedInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyReservedInstancesError {
    pub fn from_body(body: &str) -> ModifyReservedInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyReservedInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyReservedInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyReservedInstancesError {
    fn from(err: XmlParseError) -> ModifyReservedInstancesError {
        let XmlParseError(message) = err;
        ModifyReservedInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyReservedInstancesError {
    fn from(err: CredentialsError) -> ModifyReservedInstancesError {
        ModifyReservedInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyReservedInstancesError {
    fn from(err: HttpDispatchError) -> ModifyReservedInstancesError {
        ModifyReservedInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyReservedInstancesError {
    fn from(err: io::Error) -> ModifyReservedInstancesError {
        ModifyReservedInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyReservedInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyReservedInstancesError {
    fn description(&self) -> &str {
        match *self {
            ModifyReservedInstancesError::Validation(ref cause) => cause,
            ModifyReservedInstancesError::Credentials(ref err) => err.description(),
            ModifyReservedInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyReservedInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifySnapshotAttribute
#[derive(Debug, PartialEq)]
pub enum ModifySnapshotAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifySnapshotAttributeError {
    pub fn from_body(body: &str) -> ModifySnapshotAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifySnapshotAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifySnapshotAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifySnapshotAttributeError {
    fn from(err: XmlParseError) -> ModifySnapshotAttributeError {
        let XmlParseError(message) = err;
        ModifySnapshotAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifySnapshotAttributeError {
    fn from(err: CredentialsError) -> ModifySnapshotAttributeError {
        ModifySnapshotAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifySnapshotAttributeError {
    fn from(err: HttpDispatchError) -> ModifySnapshotAttributeError {
        ModifySnapshotAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifySnapshotAttributeError {
    fn from(err: io::Error) -> ModifySnapshotAttributeError {
        ModifySnapshotAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifySnapshotAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifySnapshotAttributeError {
    fn description(&self) -> &str {
        match *self {
            ModifySnapshotAttributeError::Validation(ref cause) => cause,
            ModifySnapshotAttributeError::Credentials(ref err) => err.description(),
            ModifySnapshotAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifySnapshotAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifySpotFleetRequest
#[derive(Debug, PartialEq)]
pub enum ModifySpotFleetRequestError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifySpotFleetRequestError {
    pub fn from_body(body: &str) -> ModifySpotFleetRequestError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifySpotFleetRequestError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifySpotFleetRequestError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifySpotFleetRequestError {
    fn from(err: XmlParseError) -> ModifySpotFleetRequestError {
        let XmlParseError(message) = err;
        ModifySpotFleetRequestError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifySpotFleetRequestError {
    fn from(err: CredentialsError) -> ModifySpotFleetRequestError {
        ModifySpotFleetRequestError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifySpotFleetRequestError {
    fn from(err: HttpDispatchError) -> ModifySpotFleetRequestError {
        ModifySpotFleetRequestError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifySpotFleetRequestError {
    fn from(err: io::Error) -> ModifySpotFleetRequestError {
        ModifySpotFleetRequestError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifySpotFleetRequestError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifySpotFleetRequestError {
    fn description(&self) -> &str {
        match *self {
            ModifySpotFleetRequestError::Validation(ref cause) => cause,
            ModifySpotFleetRequestError::Credentials(ref err) => err.description(),
            ModifySpotFleetRequestError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifySpotFleetRequestError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifySubnetAttribute
#[derive(Debug, PartialEq)]
pub enum ModifySubnetAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifySubnetAttributeError {
    pub fn from_body(body: &str) -> ModifySubnetAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifySubnetAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifySubnetAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifySubnetAttributeError {
    fn from(err: XmlParseError) -> ModifySubnetAttributeError {
        let XmlParseError(message) = err;
        ModifySubnetAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifySubnetAttributeError {
    fn from(err: CredentialsError) -> ModifySubnetAttributeError {
        ModifySubnetAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifySubnetAttributeError {
    fn from(err: HttpDispatchError) -> ModifySubnetAttributeError {
        ModifySubnetAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifySubnetAttributeError {
    fn from(err: io::Error) -> ModifySubnetAttributeError {
        ModifySubnetAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifySubnetAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifySubnetAttributeError {
    fn description(&self) -> &str {
        match *self {
            ModifySubnetAttributeError::Validation(ref cause) => cause,
            ModifySubnetAttributeError::Credentials(ref err) => err.description(),
            ModifySubnetAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifySubnetAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyVolume
#[derive(Debug, PartialEq)]
pub enum ModifyVolumeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyVolumeError {
    pub fn from_body(body: &str) -> ModifyVolumeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyVolumeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyVolumeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyVolumeError {
    fn from(err: XmlParseError) -> ModifyVolumeError {
        let XmlParseError(message) = err;
        ModifyVolumeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyVolumeError {
    fn from(err: CredentialsError) -> ModifyVolumeError {
        ModifyVolumeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyVolumeError {
    fn from(err: HttpDispatchError) -> ModifyVolumeError {
        ModifyVolumeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyVolumeError {
    fn from(err: io::Error) -> ModifyVolumeError {
        ModifyVolumeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyVolumeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyVolumeError {
    fn description(&self) -> &str {
        match *self {
            ModifyVolumeError::Validation(ref cause) => cause,
            ModifyVolumeError::Credentials(ref err) => err.description(),
            ModifyVolumeError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ModifyVolumeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyVolumeAttribute
#[derive(Debug, PartialEq)]
pub enum ModifyVolumeAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyVolumeAttributeError {
    pub fn from_body(body: &str) -> ModifyVolumeAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyVolumeAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyVolumeAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyVolumeAttributeError {
    fn from(err: XmlParseError) -> ModifyVolumeAttributeError {
        let XmlParseError(message) = err;
        ModifyVolumeAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyVolumeAttributeError {
    fn from(err: CredentialsError) -> ModifyVolumeAttributeError {
        ModifyVolumeAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyVolumeAttributeError {
    fn from(err: HttpDispatchError) -> ModifyVolumeAttributeError {
        ModifyVolumeAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyVolumeAttributeError {
    fn from(err: io::Error) -> ModifyVolumeAttributeError {
        ModifyVolumeAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyVolumeAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyVolumeAttributeError {
    fn description(&self) -> &str {
        match *self {
            ModifyVolumeAttributeError::Validation(ref cause) => cause,
            ModifyVolumeAttributeError::Credentials(ref err) => err.description(),
            ModifyVolumeAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyVolumeAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyVpcAttribute
#[derive(Debug, PartialEq)]
pub enum ModifyVpcAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyVpcAttributeError {
    pub fn from_body(body: &str) -> ModifyVpcAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyVpcAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyVpcAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyVpcAttributeError {
    fn from(err: XmlParseError) -> ModifyVpcAttributeError {
        let XmlParseError(message) = err;
        ModifyVpcAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyVpcAttributeError {
    fn from(err: CredentialsError) -> ModifyVpcAttributeError {
        ModifyVpcAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyVpcAttributeError {
    fn from(err: HttpDispatchError) -> ModifyVpcAttributeError {
        ModifyVpcAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyVpcAttributeError {
    fn from(err: io::Error) -> ModifyVpcAttributeError {
        ModifyVpcAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyVpcAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyVpcAttributeError {
    fn description(&self) -> &str {
        match *self {
            ModifyVpcAttributeError::Validation(ref cause) => cause,
            ModifyVpcAttributeError::Credentials(ref err) => err.description(),
            ModifyVpcAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyVpcAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyVpcEndpoint
#[derive(Debug, PartialEq)]
pub enum ModifyVpcEndpointError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyVpcEndpointError {
    pub fn from_body(body: &str) -> ModifyVpcEndpointError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyVpcEndpointError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyVpcEndpointError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyVpcEndpointError {
    fn from(err: XmlParseError) -> ModifyVpcEndpointError {
        let XmlParseError(message) = err;
        ModifyVpcEndpointError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyVpcEndpointError {
    fn from(err: CredentialsError) -> ModifyVpcEndpointError {
        ModifyVpcEndpointError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyVpcEndpointError {
    fn from(err: HttpDispatchError) -> ModifyVpcEndpointError {
        ModifyVpcEndpointError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyVpcEndpointError {
    fn from(err: io::Error) -> ModifyVpcEndpointError {
        ModifyVpcEndpointError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyVpcEndpointError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyVpcEndpointError {
    fn description(&self) -> &str {
        match *self {
            ModifyVpcEndpointError::Validation(ref cause) => cause,
            ModifyVpcEndpointError::Credentials(ref err) => err.description(),
            ModifyVpcEndpointError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyVpcEndpointError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ModifyVpcPeeringConnectionOptions
#[derive(Debug, PartialEq)]
pub enum ModifyVpcPeeringConnectionOptionsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ModifyVpcPeeringConnectionOptionsError {
    pub fn from_body(body: &str) -> ModifyVpcPeeringConnectionOptionsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ModifyVpcPeeringConnectionOptionsError::Unknown(String::from(body)),
                }
            }
            Err(_) => ModifyVpcPeeringConnectionOptionsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ModifyVpcPeeringConnectionOptionsError {
    fn from(err: XmlParseError) -> ModifyVpcPeeringConnectionOptionsError {
        let XmlParseError(message) = err;
        ModifyVpcPeeringConnectionOptionsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ModifyVpcPeeringConnectionOptionsError {
    fn from(err: CredentialsError) -> ModifyVpcPeeringConnectionOptionsError {
        ModifyVpcPeeringConnectionOptionsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ModifyVpcPeeringConnectionOptionsError {
    fn from(err: HttpDispatchError) -> ModifyVpcPeeringConnectionOptionsError {
        ModifyVpcPeeringConnectionOptionsError::HttpDispatch(err)
    }
}
impl From<io::Error> for ModifyVpcPeeringConnectionOptionsError {
    fn from(err: io::Error) -> ModifyVpcPeeringConnectionOptionsError {
        ModifyVpcPeeringConnectionOptionsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ModifyVpcPeeringConnectionOptionsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ModifyVpcPeeringConnectionOptionsError {
    fn description(&self) -> &str {
        match *self {
            ModifyVpcPeeringConnectionOptionsError::Validation(ref cause) => cause,
            ModifyVpcPeeringConnectionOptionsError::Credentials(ref err) => err.description(),
            ModifyVpcPeeringConnectionOptionsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ModifyVpcPeeringConnectionOptionsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by MonitorInstances
#[derive(Debug, PartialEq)]
pub enum MonitorInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl MonitorInstancesError {
    pub fn from_body(body: &str) -> MonitorInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => MonitorInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => MonitorInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for MonitorInstancesError {
    fn from(err: XmlParseError) -> MonitorInstancesError {
        let XmlParseError(message) = err;
        MonitorInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for MonitorInstancesError {
    fn from(err: CredentialsError) -> MonitorInstancesError {
        MonitorInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for MonitorInstancesError {
    fn from(err: HttpDispatchError) -> MonitorInstancesError {
        MonitorInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for MonitorInstancesError {
    fn from(err: io::Error) -> MonitorInstancesError {
        MonitorInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for MonitorInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for MonitorInstancesError {
    fn description(&self) -> &str {
        match *self {
            MonitorInstancesError::Validation(ref cause) => cause,
            MonitorInstancesError::Credentials(ref err) => err.description(),
            MonitorInstancesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            MonitorInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by MoveAddressToVpc
#[derive(Debug, PartialEq)]
pub enum MoveAddressToVpcError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl MoveAddressToVpcError {
    pub fn from_body(body: &str) -> MoveAddressToVpcError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => MoveAddressToVpcError::Unknown(String::from(body)),
                }
            }
            Err(_) => MoveAddressToVpcError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for MoveAddressToVpcError {
    fn from(err: XmlParseError) -> MoveAddressToVpcError {
        let XmlParseError(message) = err;
        MoveAddressToVpcError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for MoveAddressToVpcError {
    fn from(err: CredentialsError) -> MoveAddressToVpcError {
        MoveAddressToVpcError::Credentials(err)
    }
}
impl From<HttpDispatchError> for MoveAddressToVpcError {
    fn from(err: HttpDispatchError) -> MoveAddressToVpcError {
        MoveAddressToVpcError::HttpDispatch(err)
    }
}
impl From<io::Error> for MoveAddressToVpcError {
    fn from(err: io::Error) -> MoveAddressToVpcError {
        MoveAddressToVpcError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for MoveAddressToVpcError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for MoveAddressToVpcError {
    fn description(&self) -> &str {
        match *self {
            MoveAddressToVpcError::Validation(ref cause) => cause,
            MoveAddressToVpcError::Credentials(ref err) => err.description(),
            MoveAddressToVpcError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            MoveAddressToVpcError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by PurchaseHostReservation
#[derive(Debug, PartialEq)]
pub enum PurchaseHostReservationError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl PurchaseHostReservationError {
    pub fn from_body(body: &str) -> PurchaseHostReservationError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => PurchaseHostReservationError::Unknown(String::from(body)),
                }
            }
            Err(_) => PurchaseHostReservationError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for PurchaseHostReservationError {
    fn from(err: XmlParseError) -> PurchaseHostReservationError {
        let XmlParseError(message) = err;
        PurchaseHostReservationError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for PurchaseHostReservationError {
    fn from(err: CredentialsError) -> PurchaseHostReservationError {
        PurchaseHostReservationError::Credentials(err)
    }
}
impl From<HttpDispatchError> for PurchaseHostReservationError {
    fn from(err: HttpDispatchError) -> PurchaseHostReservationError {
        PurchaseHostReservationError::HttpDispatch(err)
    }
}
impl From<io::Error> for PurchaseHostReservationError {
    fn from(err: io::Error) -> PurchaseHostReservationError {
        PurchaseHostReservationError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for PurchaseHostReservationError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for PurchaseHostReservationError {
    fn description(&self) -> &str {
        match *self {
            PurchaseHostReservationError::Validation(ref cause) => cause,
            PurchaseHostReservationError::Credentials(ref err) => err.description(),
            PurchaseHostReservationError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            PurchaseHostReservationError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by PurchaseReservedInstancesOffering
#[derive(Debug, PartialEq)]
pub enum PurchaseReservedInstancesOfferingError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl PurchaseReservedInstancesOfferingError {
    pub fn from_body(body: &str) -> PurchaseReservedInstancesOfferingError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => PurchaseReservedInstancesOfferingError::Unknown(String::from(body)),
                }
            }
            Err(_) => PurchaseReservedInstancesOfferingError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for PurchaseReservedInstancesOfferingError {
    fn from(err: XmlParseError) -> PurchaseReservedInstancesOfferingError {
        let XmlParseError(message) = err;
        PurchaseReservedInstancesOfferingError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for PurchaseReservedInstancesOfferingError {
    fn from(err: CredentialsError) -> PurchaseReservedInstancesOfferingError {
        PurchaseReservedInstancesOfferingError::Credentials(err)
    }
}
impl From<HttpDispatchError> for PurchaseReservedInstancesOfferingError {
    fn from(err: HttpDispatchError) -> PurchaseReservedInstancesOfferingError {
        PurchaseReservedInstancesOfferingError::HttpDispatch(err)
    }
}
impl From<io::Error> for PurchaseReservedInstancesOfferingError {
    fn from(err: io::Error) -> PurchaseReservedInstancesOfferingError {
        PurchaseReservedInstancesOfferingError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for PurchaseReservedInstancesOfferingError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for PurchaseReservedInstancesOfferingError {
    fn description(&self) -> &str {
        match *self {
            PurchaseReservedInstancesOfferingError::Validation(ref cause) => cause,
            PurchaseReservedInstancesOfferingError::Credentials(ref err) => err.description(),
            PurchaseReservedInstancesOfferingError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            PurchaseReservedInstancesOfferingError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by PurchaseScheduledInstances
#[derive(Debug, PartialEq)]
pub enum PurchaseScheduledInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl PurchaseScheduledInstancesError {
    pub fn from_body(body: &str) -> PurchaseScheduledInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => PurchaseScheduledInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => PurchaseScheduledInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for PurchaseScheduledInstancesError {
    fn from(err: XmlParseError) -> PurchaseScheduledInstancesError {
        let XmlParseError(message) = err;
        PurchaseScheduledInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for PurchaseScheduledInstancesError {
    fn from(err: CredentialsError) -> PurchaseScheduledInstancesError {
        PurchaseScheduledInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for PurchaseScheduledInstancesError {
    fn from(err: HttpDispatchError) -> PurchaseScheduledInstancesError {
        PurchaseScheduledInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for PurchaseScheduledInstancesError {
    fn from(err: io::Error) -> PurchaseScheduledInstancesError {
        PurchaseScheduledInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for PurchaseScheduledInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for PurchaseScheduledInstancesError {
    fn description(&self) -> &str {
        match *self {
            PurchaseScheduledInstancesError::Validation(ref cause) => cause,
            PurchaseScheduledInstancesError::Credentials(ref err) => err.description(),
            PurchaseScheduledInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            PurchaseScheduledInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RebootInstances
#[derive(Debug, PartialEq)]
pub enum RebootInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RebootInstancesError {
    pub fn from_body(body: &str) -> RebootInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RebootInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => RebootInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RebootInstancesError {
    fn from(err: XmlParseError) -> RebootInstancesError {
        let XmlParseError(message) = err;
        RebootInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RebootInstancesError {
    fn from(err: CredentialsError) -> RebootInstancesError {
        RebootInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RebootInstancesError {
    fn from(err: HttpDispatchError) -> RebootInstancesError {
        RebootInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for RebootInstancesError {
    fn from(err: io::Error) -> RebootInstancesError {
        RebootInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RebootInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RebootInstancesError {
    fn description(&self) -> &str {
        match *self {
            RebootInstancesError::Validation(ref cause) => cause,
            RebootInstancesError::Credentials(ref err) => err.description(),
            RebootInstancesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            RebootInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RegisterImage
#[derive(Debug, PartialEq)]
pub enum RegisterImageError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RegisterImageError {
    pub fn from_body(body: &str) -> RegisterImageError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RegisterImageError::Unknown(String::from(body)),
                }
            }
            Err(_) => RegisterImageError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RegisterImageError {
    fn from(err: XmlParseError) -> RegisterImageError {
        let XmlParseError(message) = err;
        RegisterImageError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RegisterImageError {
    fn from(err: CredentialsError) -> RegisterImageError {
        RegisterImageError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RegisterImageError {
    fn from(err: HttpDispatchError) -> RegisterImageError {
        RegisterImageError::HttpDispatch(err)
    }
}
impl From<io::Error> for RegisterImageError {
    fn from(err: io::Error) -> RegisterImageError {
        RegisterImageError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RegisterImageError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RegisterImageError {
    fn description(&self) -> &str {
        match *self {
            RegisterImageError::Validation(ref cause) => cause,
            RegisterImageError::Credentials(ref err) => err.description(),
            RegisterImageError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            RegisterImageError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RejectVpcPeeringConnection
#[derive(Debug, PartialEq)]
pub enum RejectVpcPeeringConnectionError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RejectVpcPeeringConnectionError {
    pub fn from_body(body: &str) -> RejectVpcPeeringConnectionError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RejectVpcPeeringConnectionError::Unknown(String::from(body)),
                }
            }
            Err(_) => RejectVpcPeeringConnectionError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RejectVpcPeeringConnectionError {
    fn from(err: XmlParseError) -> RejectVpcPeeringConnectionError {
        let XmlParseError(message) = err;
        RejectVpcPeeringConnectionError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RejectVpcPeeringConnectionError {
    fn from(err: CredentialsError) -> RejectVpcPeeringConnectionError {
        RejectVpcPeeringConnectionError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RejectVpcPeeringConnectionError {
    fn from(err: HttpDispatchError) -> RejectVpcPeeringConnectionError {
        RejectVpcPeeringConnectionError::HttpDispatch(err)
    }
}
impl From<io::Error> for RejectVpcPeeringConnectionError {
    fn from(err: io::Error) -> RejectVpcPeeringConnectionError {
        RejectVpcPeeringConnectionError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RejectVpcPeeringConnectionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RejectVpcPeeringConnectionError {
    fn description(&self) -> &str {
        match *self {
            RejectVpcPeeringConnectionError::Validation(ref cause) => cause,
            RejectVpcPeeringConnectionError::Credentials(ref err) => err.description(),
            RejectVpcPeeringConnectionError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            RejectVpcPeeringConnectionError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReleaseAddress
#[derive(Debug, PartialEq)]
pub enum ReleaseAddressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReleaseAddressError {
    pub fn from_body(body: &str) -> ReleaseAddressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReleaseAddressError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReleaseAddressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReleaseAddressError {
    fn from(err: XmlParseError) -> ReleaseAddressError {
        let XmlParseError(message) = err;
        ReleaseAddressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReleaseAddressError {
    fn from(err: CredentialsError) -> ReleaseAddressError {
        ReleaseAddressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReleaseAddressError {
    fn from(err: HttpDispatchError) -> ReleaseAddressError {
        ReleaseAddressError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReleaseAddressError {
    fn from(err: io::Error) -> ReleaseAddressError {
        ReleaseAddressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReleaseAddressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReleaseAddressError {
    fn description(&self) -> &str {
        match *self {
            ReleaseAddressError::Validation(ref cause) => cause,
            ReleaseAddressError::Credentials(ref err) => err.description(),
            ReleaseAddressError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ReleaseAddressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReleaseHosts
#[derive(Debug, PartialEq)]
pub enum ReleaseHostsError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReleaseHostsError {
    pub fn from_body(body: &str) -> ReleaseHostsError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReleaseHostsError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReleaseHostsError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReleaseHostsError {
    fn from(err: XmlParseError) -> ReleaseHostsError {
        let XmlParseError(message) = err;
        ReleaseHostsError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReleaseHostsError {
    fn from(err: CredentialsError) -> ReleaseHostsError {
        ReleaseHostsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReleaseHostsError {
    fn from(err: HttpDispatchError) -> ReleaseHostsError {
        ReleaseHostsError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReleaseHostsError {
    fn from(err: io::Error) -> ReleaseHostsError {
        ReleaseHostsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReleaseHostsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReleaseHostsError {
    fn description(&self) -> &str {
        match *self {
            ReleaseHostsError::Validation(ref cause) => cause,
            ReleaseHostsError::Credentials(ref err) => err.description(),
            ReleaseHostsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ReleaseHostsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReplaceIamInstanceProfileAssociation
#[derive(Debug, PartialEq)]
pub enum ReplaceIamInstanceProfileAssociationError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReplaceIamInstanceProfileAssociationError {
    pub fn from_body(body: &str) -> ReplaceIamInstanceProfileAssociationError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReplaceIamInstanceProfileAssociationError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReplaceIamInstanceProfileAssociationError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReplaceIamInstanceProfileAssociationError {
    fn from(err: XmlParseError) -> ReplaceIamInstanceProfileAssociationError {
        let XmlParseError(message) = err;
        ReplaceIamInstanceProfileAssociationError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReplaceIamInstanceProfileAssociationError {
    fn from(err: CredentialsError) -> ReplaceIamInstanceProfileAssociationError {
        ReplaceIamInstanceProfileAssociationError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReplaceIamInstanceProfileAssociationError {
    fn from(err: HttpDispatchError) -> ReplaceIamInstanceProfileAssociationError {
        ReplaceIamInstanceProfileAssociationError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReplaceIamInstanceProfileAssociationError {
    fn from(err: io::Error) -> ReplaceIamInstanceProfileAssociationError {
        ReplaceIamInstanceProfileAssociationError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReplaceIamInstanceProfileAssociationError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReplaceIamInstanceProfileAssociationError {
    fn description(&self) -> &str {
        match *self {
            ReplaceIamInstanceProfileAssociationError::Validation(ref cause) => cause,
            ReplaceIamInstanceProfileAssociationError::Credentials(ref err) => err.description(),
            ReplaceIamInstanceProfileAssociationError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ReplaceIamInstanceProfileAssociationError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReplaceNetworkAclAssociation
#[derive(Debug, PartialEq)]
pub enum ReplaceNetworkAclAssociationError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReplaceNetworkAclAssociationError {
    pub fn from_body(body: &str) -> ReplaceNetworkAclAssociationError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReplaceNetworkAclAssociationError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReplaceNetworkAclAssociationError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReplaceNetworkAclAssociationError {
    fn from(err: XmlParseError) -> ReplaceNetworkAclAssociationError {
        let XmlParseError(message) = err;
        ReplaceNetworkAclAssociationError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReplaceNetworkAclAssociationError {
    fn from(err: CredentialsError) -> ReplaceNetworkAclAssociationError {
        ReplaceNetworkAclAssociationError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReplaceNetworkAclAssociationError {
    fn from(err: HttpDispatchError) -> ReplaceNetworkAclAssociationError {
        ReplaceNetworkAclAssociationError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReplaceNetworkAclAssociationError {
    fn from(err: io::Error) -> ReplaceNetworkAclAssociationError {
        ReplaceNetworkAclAssociationError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReplaceNetworkAclAssociationError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReplaceNetworkAclAssociationError {
    fn description(&self) -> &str {
        match *self {
            ReplaceNetworkAclAssociationError::Validation(ref cause) => cause,
            ReplaceNetworkAclAssociationError::Credentials(ref err) => err.description(),
            ReplaceNetworkAclAssociationError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ReplaceNetworkAclAssociationError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReplaceNetworkAclEntry
#[derive(Debug, PartialEq)]
pub enum ReplaceNetworkAclEntryError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReplaceNetworkAclEntryError {
    pub fn from_body(body: &str) -> ReplaceNetworkAclEntryError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReplaceNetworkAclEntryError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReplaceNetworkAclEntryError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReplaceNetworkAclEntryError {
    fn from(err: XmlParseError) -> ReplaceNetworkAclEntryError {
        let XmlParseError(message) = err;
        ReplaceNetworkAclEntryError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReplaceNetworkAclEntryError {
    fn from(err: CredentialsError) -> ReplaceNetworkAclEntryError {
        ReplaceNetworkAclEntryError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReplaceNetworkAclEntryError {
    fn from(err: HttpDispatchError) -> ReplaceNetworkAclEntryError {
        ReplaceNetworkAclEntryError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReplaceNetworkAclEntryError {
    fn from(err: io::Error) -> ReplaceNetworkAclEntryError {
        ReplaceNetworkAclEntryError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReplaceNetworkAclEntryError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReplaceNetworkAclEntryError {
    fn description(&self) -> &str {
        match *self {
            ReplaceNetworkAclEntryError::Validation(ref cause) => cause,
            ReplaceNetworkAclEntryError::Credentials(ref err) => err.description(),
            ReplaceNetworkAclEntryError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ReplaceNetworkAclEntryError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReplaceRoute
#[derive(Debug, PartialEq)]
pub enum ReplaceRouteError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReplaceRouteError {
    pub fn from_body(body: &str) -> ReplaceRouteError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReplaceRouteError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReplaceRouteError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReplaceRouteError {
    fn from(err: XmlParseError) -> ReplaceRouteError {
        let XmlParseError(message) = err;
        ReplaceRouteError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReplaceRouteError {
    fn from(err: CredentialsError) -> ReplaceRouteError {
        ReplaceRouteError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReplaceRouteError {
    fn from(err: HttpDispatchError) -> ReplaceRouteError {
        ReplaceRouteError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReplaceRouteError {
    fn from(err: io::Error) -> ReplaceRouteError {
        ReplaceRouteError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReplaceRouteError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReplaceRouteError {
    fn description(&self) -> &str {
        match *self {
            ReplaceRouteError::Validation(ref cause) => cause,
            ReplaceRouteError::Credentials(ref err) => err.description(),
            ReplaceRouteError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            ReplaceRouteError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReplaceRouteTableAssociation
#[derive(Debug, PartialEq)]
pub enum ReplaceRouteTableAssociationError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReplaceRouteTableAssociationError {
    pub fn from_body(body: &str) -> ReplaceRouteTableAssociationError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReplaceRouteTableAssociationError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReplaceRouteTableAssociationError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReplaceRouteTableAssociationError {
    fn from(err: XmlParseError) -> ReplaceRouteTableAssociationError {
        let XmlParseError(message) = err;
        ReplaceRouteTableAssociationError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReplaceRouteTableAssociationError {
    fn from(err: CredentialsError) -> ReplaceRouteTableAssociationError {
        ReplaceRouteTableAssociationError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReplaceRouteTableAssociationError {
    fn from(err: HttpDispatchError) -> ReplaceRouteTableAssociationError {
        ReplaceRouteTableAssociationError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReplaceRouteTableAssociationError {
    fn from(err: io::Error) -> ReplaceRouteTableAssociationError {
        ReplaceRouteTableAssociationError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReplaceRouteTableAssociationError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReplaceRouteTableAssociationError {
    fn description(&self) -> &str {
        match *self {
            ReplaceRouteTableAssociationError::Validation(ref cause) => cause,
            ReplaceRouteTableAssociationError::Credentials(ref err) => err.description(),
            ReplaceRouteTableAssociationError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ReplaceRouteTableAssociationError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ReportInstanceStatus
#[derive(Debug, PartialEq)]
pub enum ReportInstanceStatusError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ReportInstanceStatusError {
    pub fn from_body(body: &str) -> ReportInstanceStatusError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ReportInstanceStatusError::Unknown(String::from(body)),
                }
            }
            Err(_) => ReportInstanceStatusError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ReportInstanceStatusError {
    fn from(err: XmlParseError) -> ReportInstanceStatusError {
        let XmlParseError(message) = err;
        ReportInstanceStatusError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ReportInstanceStatusError {
    fn from(err: CredentialsError) -> ReportInstanceStatusError {
        ReportInstanceStatusError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ReportInstanceStatusError {
    fn from(err: HttpDispatchError) -> ReportInstanceStatusError {
        ReportInstanceStatusError::HttpDispatch(err)
    }
}
impl From<io::Error> for ReportInstanceStatusError {
    fn from(err: io::Error) -> ReportInstanceStatusError {
        ReportInstanceStatusError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ReportInstanceStatusError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ReportInstanceStatusError {
    fn description(&self) -> &str {
        match *self {
            ReportInstanceStatusError::Validation(ref cause) => cause,
            ReportInstanceStatusError::Credentials(ref err) => err.description(),
            ReportInstanceStatusError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ReportInstanceStatusError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RequestSpotFleet
#[derive(Debug, PartialEq)]
pub enum RequestSpotFleetError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RequestSpotFleetError {
    pub fn from_body(body: &str) -> RequestSpotFleetError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RequestSpotFleetError::Unknown(String::from(body)),
                }
            }
            Err(_) => RequestSpotFleetError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RequestSpotFleetError {
    fn from(err: XmlParseError) -> RequestSpotFleetError {
        let XmlParseError(message) = err;
        RequestSpotFleetError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RequestSpotFleetError {
    fn from(err: CredentialsError) -> RequestSpotFleetError {
        RequestSpotFleetError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RequestSpotFleetError {
    fn from(err: HttpDispatchError) -> RequestSpotFleetError {
        RequestSpotFleetError::HttpDispatch(err)
    }
}
impl From<io::Error> for RequestSpotFleetError {
    fn from(err: io::Error) -> RequestSpotFleetError {
        RequestSpotFleetError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RequestSpotFleetError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RequestSpotFleetError {
    fn description(&self) -> &str {
        match *self {
            RequestSpotFleetError::Validation(ref cause) => cause,
            RequestSpotFleetError::Credentials(ref err) => err.description(),
            RequestSpotFleetError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            RequestSpotFleetError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RequestSpotInstances
#[derive(Debug, PartialEq)]
pub enum RequestSpotInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RequestSpotInstancesError {
    pub fn from_body(body: &str) -> RequestSpotInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RequestSpotInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => RequestSpotInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RequestSpotInstancesError {
    fn from(err: XmlParseError) -> RequestSpotInstancesError {
        let XmlParseError(message) = err;
        RequestSpotInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RequestSpotInstancesError {
    fn from(err: CredentialsError) -> RequestSpotInstancesError {
        RequestSpotInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RequestSpotInstancesError {
    fn from(err: HttpDispatchError) -> RequestSpotInstancesError {
        RequestSpotInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for RequestSpotInstancesError {
    fn from(err: io::Error) -> RequestSpotInstancesError {
        RequestSpotInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RequestSpotInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RequestSpotInstancesError {
    fn description(&self) -> &str {
        match *self {
            RequestSpotInstancesError::Validation(ref cause) => cause,
            RequestSpotInstancesError::Credentials(ref err) => err.description(),
            RequestSpotInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            RequestSpotInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ResetImageAttribute
#[derive(Debug, PartialEq)]
pub enum ResetImageAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ResetImageAttributeError {
    pub fn from_body(body: &str) -> ResetImageAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ResetImageAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ResetImageAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ResetImageAttributeError {
    fn from(err: XmlParseError) -> ResetImageAttributeError {
        let XmlParseError(message) = err;
        ResetImageAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ResetImageAttributeError {
    fn from(err: CredentialsError) -> ResetImageAttributeError {
        ResetImageAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ResetImageAttributeError {
    fn from(err: HttpDispatchError) -> ResetImageAttributeError {
        ResetImageAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ResetImageAttributeError {
    fn from(err: io::Error) -> ResetImageAttributeError {
        ResetImageAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ResetImageAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ResetImageAttributeError {
    fn description(&self) -> &str {
        match *self {
            ResetImageAttributeError::Validation(ref cause) => cause,
            ResetImageAttributeError::Credentials(ref err) => err.description(),
            ResetImageAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ResetImageAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ResetInstanceAttribute
#[derive(Debug, PartialEq)]
pub enum ResetInstanceAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ResetInstanceAttributeError {
    pub fn from_body(body: &str) -> ResetInstanceAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ResetInstanceAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ResetInstanceAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ResetInstanceAttributeError {
    fn from(err: XmlParseError) -> ResetInstanceAttributeError {
        let XmlParseError(message) = err;
        ResetInstanceAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ResetInstanceAttributeError {
    fn from(err: CredentialsError) -> ResetInstanceAttributeError {
        ResetInstanceAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ResetInstanceAttributeError {
    fn from(err: HttpDispatchError) -> ResetInstanceAttributeError {
        ResetInstanceAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ResetInstanceAttributeError {
    fn from(err: io::Error) -> ResetInstanceAttributeError {
        ResetInstanceAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ResetInstanceAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ResetInstanceAttributeError {
    fn description(&self) -> &str {
        match *self {
            ResetInstanceAttributeError::Validation(ref cause) => cause,
            ResetInstanceAttributeError::Credentials(ref err) => err.description(),
            ResetInstanceAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ResetInstanceAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ResetNetworkInterfaceAttribute
#[derive(Debug, PartialEq)]
pub enum ResetNetworkInterfaceAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ResetNetworkInterfaceAttributeError {
    pub fn from_body(body: &str) -> ResetNetworkInterfaceAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ResetNetworkInterfaceAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ResetNetworkInterfaceAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ResetNetworkInterfaceAttributeError {
    fn from(err: XmlParseError) -> ResetNetworkInterfaceAttributeError {
        let XmlParseError(message) = err;
        ResetNetworkInterfaceAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ResetNetworkInterfaceAttributeError {
    fn from(err: CredentialsError) -> ResetNetworkInterfaceAttributeError {
        ResetNetworkInterfaceAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ResetNetworkInterfaceAttributeError {
    fn from(err: HttpDispatchError) -> ResetNetworkInterfaceAttributeError {
        ResetNetworkInterfaceAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ResetNetworkInterfaceAttributeError {
    fn from(err: io::Error) -> ResetNetworkInterfaceAttributeError {
        ResetNetworkInterfaceAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ResetNetworkInterfaceAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ResetNetworkInterfaceAttributeError {
    fn description(&self) -> &str {
        match *self {
            ResetNetworkInterfaceAttributeError::Validation(ref cause) => cause,
            ResetNetworkInterfaceAttributeError::Credentials(ref err) => err.description(),
            ResetNetworkInterfaceAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ResetNetworkInterfaceAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ResetSnapshotAttribute
#[derive(Debug, PartialEq)]
pub enum ResetSnapshotAttributeError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ResetSnapshotAttributeError {
    pub fn from_body(body: &str) -> ResetSnapshotAttributeError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => ResetSnapshotAttributeError::Unknown(String::from(body)),
                }
            }
            Err(_) => ResetSnapshotAttributeError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for ResetSnapshotAttributeError {
    fn from(err: XmlParseError) -> ResetSnapshotAttributeError {
        let XmlParseError(message) = err;
        ResetSnapshotAttributeError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for ResetSnapshotAttributeError {
    fn from(err: CredentialsError) -> ResetSnapshotAttributeError {
        ResetSnapshotAttributeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ResetSnapshotAttributeError {
    fn from(err: HttpDispatchError) -> ResetSnapshotAttributeError {
        ResetSnapshotAttributeError::HttpDispatch(err)
    }
}
impl From<io::Error> for ResetSnapshotAttributeError {
    fn from(err: io::Error) -> ResetSnapshotAttributeError {
        ResetSnapshotAttributeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ResetSnapshotAttributeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ResetSnapshotAttributeError {
    fn description(&self) -> &str {
        match *self {
            ResetSnapshotAttributeError::Validation(ref cause) => cause,
            ResetSnapshotAttributeError::Credentials(ref err) => err.description(),
            ResetSnapshotAttributeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ResetSnapshotAttributeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RestoreAddressToClassic
#[derive(Debug, PartialEq)]
pub enum RestoreAddressToClassicError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RestoreAddressToClassicError {
    pub fn from_body(body: &str) -> RestoreAddressToClassicError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RestoreAddressToClassicError::Unknown(String::from(body)),
                }
            }
            Err(_) => RestoreAddressToClassicError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RestoreAddressToClassicError {
    fn from(err: XmlParseError) -> RestoreAddressToClassicError {
        let XmlParseError(message) = err;
        RestoreAddressToClassicError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RestoreAddressToClassicError {
    fn from(err: CredentialsError) -> RestoreAddressToClassicError {
        RestoreAddressToClassicError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RestoreAddressToClassicError {
    fn from(err: HttpDispatchError) -> RestoreAddressToClassicError {
        RestoreAddressToClassicError::HttpDispatch(err)
    }
}
impl From<io::Error> for RestoreAddressToClassicError {
    fn from(err: io::Error) -> RestoreAddressToClassicError {
        RestoreAddressToClassicError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RestoreAddressToClassicError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RestoreAddressToClassicError {
    fn description(&self) -> &str {
        match *self {
            RestoreAddressToClassicError::Validation(ref cause) => cause,
            RestoreAddressToClassicError::Credentials(ref err) => err.description(),
            RestoreAddressToClassicError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            RestoreAddressToClassicError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RevokeSecurityGroupEgress
#[derive(Debug, PartialEq)]
pub enum RevokeSecurityGroupEgressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RevokeSecurityGroupEgressError {
    pub fn from_body(body: &str) -> RevokeSecurityGroupEgressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RevokeSecurityGroupEgressError::Unknown(String::from(body)),
                }
            }
            Err(_) => RevokeSecurityGroupEgressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RevokeSecurityGroupEgressError {
    fn from(err: XmlParseError) -> RevokeSecurityGroupEgressError {
        let XmlParseError(message) = err;
        RevokeSecurityGroupEgressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RevokeSecurityGroupEgressError {
    fn from(err: CredentialsError) -> RevokeSecurityGroupEgressError {
        RevokeSecurityGroupEgressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RevokeSecurityGroupEgressError {
    fn from(err: HttpDispatchError) -> RevokeSecurityGroupEgressError {
        RevokeSecurityGroupEgressError::HttpDispatch(err)
    }
}
impl From<io::Error> for RevokeSecurityGroupEgressError {
    fn from(err: io::Error) -> RevokeSecurityGroupEgressError {
        RevokeSecurityGroupEgressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RevokeSecurityGroupEgressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RevokeSecurityGroupEgressError {
    fn description(&self) -> &str {
        match *self {
            RevokeSecurityGroupEgressError::Validation(ref cause) => cause,
            RevokeSecurityGroupEgressError::Credentials(ref err) => err.description(),
            RevokeSecurityGroupEgressError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            RevokeSecurityGroupEgressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RevokeSecurityGroupIngress
#[derive(Debug, PartialEq)]
pub enum RevokeSecurityGroupIngressError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RevokeSecurityGroupIngressError {
    pub fn from_body(body: &str) -> RevokeSecurityGroupIngressError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RevokeSecurityGroupIngressError::Unknown(String::from(body)),
                }
            }
            Err(_) => RevokeSecurityGroupIngressError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RevokeSecurityGroupIngressError {
    fn from(err: XmlParseError) -> RevokeSecurityGroupIngressError {
        let XmlParseError(message) = err;
        RevokeSecurityGroupIngressError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RevokeSecurityGroupIngressError {
    fn from(err: CredentialsError) -> RevokeSecurityGroupIngressError {
        RevokeSecurityGroupIngressError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RevokeSecurityGroupIngressError {
    fn from(err: HttpDispatchError) -> RevokeSecurityGroupIngressError {
        RevokeSecurityGroupIngressError::HttpDispatch(err)
    }
}
impl From<io::Error> for RevokeSecurityGroupIngressError {
    fn from(err: io::Error) -> RevokeSecurityGroupIngressError {
        RevokeSecurityGroupIngressError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RevokeSecurityGroupIngressError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RevokeSecurityGroupIngressError {
    fn description(&self) -> &str {
        match *self {
            RevokeSecurityGroupIngressError::Validation(ref cause) => cause,
            RevokeSecurityGroupIngressError::Credentials(ref err) => err.description(),
            RevokeSecurityGroupIngressError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            RevokeSecurityGroupIngressError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RunInstances
#[derive(Debug, PartialEq)]
pub enum RunInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RunInstancesError {
    pub fn from_body(body: &str) -> RunInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RunInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => RunInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RunInstancesError {
    fn from(err: XmlParseError) -> RunInstancesError {
        let XmlParseError(message) = err;
        RunInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RunInstancesError {
    fn from(err: CredentialsError) -> RunInstancesError {
        RunInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RunInstancesError {
    fn from(err: HttpDispatchError) -> RunInstancesError {
        RunInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for RunInstancesError {
    fn from(err: io::Error) -> RunInstancesError {
        RunInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RunInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RunInstancesError {
    fn description(&self) -> &str {
        match *self {
            RunInstancesError::Validation(ref cause) => cause,
            RunInstancesError::Credentials(ref err) => err.description(),
            RunInstancesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            RunInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by RunScheduledInstances
#[derive(Debug, PartialEq)]
pub enum RunScheduledInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl RunScheduledInstancesError {
    pub fn from_body(body: &str) -> RunScheduledInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => RunScheduledInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => RunScheduledInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for RunScheduledInstancesError {
    fn from(err: XmlParseError) -> RunScheduledInstancesError {
        let XmlParseError(message) = err;
        RunScheduledInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for RunScheduledInstancesError {
    fn from(err: CredentialsError) -> RunScheduledInstancesError {
        RunScheduledInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for RunScheduledInstancesError {
    fn from(err: HttpDispatchError) -> RunScheduledInstancesError {
        RunScheduledInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for RunScheduledInstancesError {
    fn from(err: io::Error) -> RunScheduledInstancesError {
        RunScheduledInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for RunScheduledInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for RunScheduledInstancesError {
    fn description(&self) -> &str {
        match *self {
            RunScheduledInstancesError::Validation(ref cause) => cause,
            RunScheduledInstancesError::Credentials(ref err) => err.description(),
            RunScheduledInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            RunScheduledInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by StartInstances
#[derive(Debug, PartialEq)]
pub enum StartInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl StartInstancesError {
    pub fn from_body(body: &str) -> StartInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => StartInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => StartInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for StartInstancesError {
    fn from(err: XmlParseError) -> StartInstancesError {
        let XmlParseError(message) = err;
        StartInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for StartInstancesError {
    fn from(err: CredentialsError) -> StartInstancesError {
        StartInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for StartInstancesError {
    fn from(err: HttpDispatchError) -> StartInstancesError {
        StartInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for StartInstancesError {
    fn from(err: io::Error) -> StartInstancesError {
        StartInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for StartInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for StartInstancesError {
    fn description(&self) -> &str {
        match *self {
            StartInstancesError::Validation(ref cause) => cause,
            StartInstancesError::Credentials(ref err) => err.description(),
            StartInstancesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            StartInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by StopInstances
#[derive(Debug, PartialEq)]
pub enum StopInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl StopInstancesError {
    pub fn from_body(body: &str) -> StopInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => StopInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => StopInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for StopInstancesError {
    fn from(err: XmlParseError) -> StopInstancesError {
        let XmlParseError(message) = err;
        StopInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for StopInstancesError {
    fn from(err: CredentialsError) -> StopInstancesError {
        StopInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for StopInstancesError {
    fn from(err: HttpDispatchError) -> StopInstancesError {
        StopInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for StopInstancesError {
    fn from(err: io::Error) -> StopInstancesError {
        StopInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for StopInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for StopInstancesError {
    fn description(&self) -> &str {
        match *self {
            StopInstancesError::Validation(ref cause) => cause,
            StopInstancesError::Credentials(ref err) => err.description(),
            StopInstancesError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            StopInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by TerminateInstances
#[derive(Debug, PartialEq)]
pub enum TerminateInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl TerminateInstancesError {
    pub fn from_body(body: &str) -> TerminateInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => TerminateInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => TerminateInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for TerminateInstancesError {
    fn from(err: XmlParseError) -> TerminateInstancesError {
        let XmlParseError(message) = err;
        TerminateInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for TerminateInstancesError {
    fn from(err: CredentialsError) -> TerminateInstancesError {
        TerminateInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for TerminateInstancesError {
    fn from(err: HttpDispatchError) -> TerminateInstancesError {
        TerminateInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for TerminateInstancesError {
    fn from(err: io::Error) -> TerminateInstancesError {
        TerminateInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for TerminateInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for TerminateInstancesError {
    fn description(&self) -> &str {
        match *self {
            TerminateInstancesError::Validation(ref cause) => cause,
            TerminateInstancesError::Credentials(ref err) => err.description(),
            TerminateInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            TerminateInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by UnassignIpv6Addresses
#[derive(Debug, PartialEq)]
pub enum UnassignIpv6AddressesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl UnassignIpv6AddressesError {
    pub fn from_body(body: &str) -> UnassignIpv6AddressesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => UnassignIpv6AddressesError::Unknown(String::from(body)),
                }
            }
            Err(_) => UnassignIpv6AddressesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for UnassignIpv6AddressesError {
    fn from(err: XmlParseError) -> UnassignIpv6AddressesError {
        let XmlParseError(message) = err;
        UnassignIpv6AddressesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for UnassignIpv6AddressesError {
    fn from(err: CredentialsError) -> UnassignIpv6AddressesError {
        UnassignIpv6AddressesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for UnassignIpv6AddressesError {
    fn from(err: HttpDispatchError) -> UnassignIpv6AddressesError {
        UnassignIpv6AddressesError::HttpDispatch(err)
    }
}
impl From<io::Error> for UnassignIpv6AddressesError {
    fn from(err: io::Error) -> UnassignIpv6AddressesError {
        UnassignIpv6AddressesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for UnassignIpv6AddressesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for UnassignIpv6AddressesError {
    fn description(&self) -> &str {
        match *self {
            UnassignIpv6AddressesError::Validation(ref cause) => cause,
            UnassignIpv6AddressesError::Credentials(ref err) => err.description(),
            UnassignIpv6AddressesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            UnassignIpv6AddressesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by UnassignPrivateIpAddresses
#[derive(Debug, PartialEq)]
pub enum UnassignPrivateIpAddressesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl UnassignPrivateIpAddressesError {
    pub fn from_body(body: &str) -> UnassignPrivateIpAddressesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => UnassignPrivateIpAddressesError::Unknown(String::from(body)),
                }
            }
            Err(_) => UnassignPrivateIpAddressesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for UnassignPrivateIpAddressesError {
    fn from(err: XmlParseError) -> UnassignPrivateIpAddressesError {
        let XmlParseError(message) = err;
        UnassignPrivateIpAddressesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for UnassignPrivateIpAddressesError {
    fn from(err: CredentialsError) -> UnassignPrivateIpAddressesError {
        UnassignPrivateIpAddressesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for UnassignPrivateIpAddressesError {
    fn from(err: HttpDispatchError) -> UnassignPrivateIpAddressesError {
        UnassignPrivateIpAddressesError::HttpDispatch(err)
    }
}
impl From<io::Error> for UnassignPrivateIpAddressesError {
    fn from(err: io::Error) -> UnassignPrivateIpAddressesError {
        UnassignPrivateIpAddressesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for UnassignPrivateIpAddressesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for UnassignPrivateIpAddressesError {
    fn description(&self) -> &str {
        match *self {
            UnassignPrivateIpAddressesError::Validation(ref cause) => cause,
            UnassignPrivateIpAddressesError::Credentials(ref err) => err.description(),
            UnassignPrivateIpAddressesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            UnassignPrivateIpAddressesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by UnmonitorInstances
#[derive(Debug, PartialEq)]
pub enum UnmonitorInstancesError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl UnmonitorInstancesError {
    pub fn from_body(body: &str) -> UnmonitorInstancesError {
        let reader = EventReader::new(body.as_bytes());
        let mut stack = XmlResponse::new(reader.into_iter().peekable());
        let _start_document = stack.next();
        let _response_envelope = stack.next();
        match XmlErrorDeserializer::deserialize("Error", &mut stack) {
            Ok(parsed_error) => {
                match &parsed_error.code[..] {
                    _ => UnmonitorInstancesError::Unknown(String::from(body)),
                }
            }
            Err(_) => UnmonitorInstancesError::Unknown(body.to_string()),
        }
    }
}

impl From<XmlParseError> for UnmonitorInstancesError {
    fn from(err: XmlParseError) -> UnmonitorInstancesError {
        let XmlParseError(message) = err;
        UnmonitorInstancesError::Unknown(message.to_string())
    }
}
impl From<CredentialsError> for UnmonitorInstancesError {
    fn from(err: CredentialsError) -> UnmonitorInstancesError {
        UnmonitorInstancesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for UnmonitorInstancesError {
    fn from(err: HttpDispatchError) -> UnmonitorInstancesError {
        UnmonitorInstancesError::HttpDispatch(err)
    }
}
impl From<io::Error> for UnmonitorInstancesError {
    fn from(err: io::Error) -> UnmonitorInstancesError {
        UnmonitorInstancesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for UnmonitorInstancesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for UnmonitorInstancesError {
    fn description(&self) -> &str {
        match *self {
            UnmonitorInstancesError::Validation(ref cause) => cause,
            UnmonitorInstancesError::Credentials(ref err) => err.description(),
            UnmonitorInstancesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            UnmonitorInstancesError::Unknown(ref cause) => cause,
        }
    }
}
/// Trait representing the capabilities of the Amazon EC2 API. Amazon EC2 clients implement this trait.
pub trait Ec2 {
    #[doc="<p>Accepts the Convertible Reserved Instance exchange quote described in the <a>GetReservedInstancesExchangeQuote</a> call.</p>"]
    fn accept_reserved_instances_exchange_quote
        (&self,
         input: &AcceptReservedInstancesExchangeQuoteRequest)
         -> Result<AcceptReservedInstancesExchangeQuoteResult,
                   AcceptReservedInstancesExchangeQuoteError>;


    #[doc="<p>Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the <code>pending-acceptance</code> state, and you must be the owner of the peer VPC. Use <a>DescribeVpcPeeringConnections</a> to view your outstanding VPC peering connection requests.</p>"]
    fn accept_vpc_peering_connection
        (&self,
         input: &AcceptVpcPeeringConnectionRequest)
         -> Result<AcceptVpcPeeringConnectionResult, AcceptVpcPeeringConnectionError>;


    #[doc="<p>Allocates an Elastic IP address.</p> <p>An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic per region and 5 Elastic IP addresses for EC2-VPC per region.</p> <p>If you release an Elastic IP address for use in a VPC, you might be able to recover it. To recover an Elastic IP address that you released, specify it in the <code>Address</code> parameter. Note that you cannot recover an Elastic IP address that you released after it is allocated to another AWS account.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn allocate_address(&self,
                        input: &AllocateAddressRequest)
                        -> Result<AllocateAddressResult, AllocateAddressError>;


    #[doc="<p>Allocates a Dedicated Host to your account. At minimum you need to specify the instance size type, Availability Zone, and quantity of hosts you want to allocate.</p>"]
    fn allocate_hosts(&self,
                      input: &AllocateHostsRequest)
                      -> Result<AllocateHostsResult, AllocateHostsError>;


    #[doc="<p>Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI\">IP Addresses Per Network Interface Per Instance Type</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn assign_ipv_6_addresses(&self,
                              input: &AssignIpv6AddressesRequest)
                              -> Result<AssignIpv6AddressesResult, AssignIpv6AddressesError>;


    #[doc="<p>Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html\">Instance Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about Elastic IP addresses, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>AssignPrivateIpAddresses is available only in EC2-VPC.</p>"]
    fn assign_private_ip_addresses(&self,
                                   input: &AssignPrivateIpAddressesRequest)
                                   -> Result<(), AssignPrivateIpAddressesError>;


    #[doc="<p>Associates an Elastic IP address with an instance or a network interface.</p> <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.</p> <p>[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.</p> <important> <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the <i>Elastic IP Addresses</i> section of <a href=\"http://aws.amazon.com/ec2/pricing/\">Amazon EC2 Pricing</a>.</p> </important>"]
    fn associate_address(&self,
                         input: &AssociateAddressRequest)
                         -> Result<AssociateAddressResult, AssociateAddressError>;


    #[doc="<p>Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.</p> <p>After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn associate_dhcp_options(&self,
                              input: &AssociateDhcpOptionsRequest)
                              -> Result<(), AssociateDhcpOptionsError>;


    #[doc="<p>Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.</p>"]
    fn associate_iam_instance_profile
        (&self,
         input: &AssociateIamInstanceProfileRequest)
         -> Result<AssociateIamInstanceProfileResult, AssociateIamInstanceProfileError>;


    #[doc="<p>Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn associate_route_table(&self,
                             input: &AssociateRouteTableRequest)
                             -> Result<AssociateRouteTableResult, AssociateRouteTableError>;


    #[doc="<p>Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.</p>"]
    fn associate_subnet_cidr_block
        (&self,
         input: &AssociateSubnetCidrBlockRequest)
         -> Result<AssociateSubnetCidrBlockResult, AssociateSubnetCidrBlockError>;


    #[doc="<p>Associates a CIDR block with your VPC. You can only associate a single Amazon-provided IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.</p>"]
    fn associate_vpc_cidr_block
        (&self,
         input: &AssociateVpcCidrBlockRequest)
         -> Result<AssociateVpcCidrBlockResult, AssociateVpcCidrBlockError>;


    #[doc="<p>Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the <code>running</code> state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.</p> <p>After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.</p> <p>Linking your instance to a VPC is sometimes referred to as <i>attaching</i> your instance.</p>"]
    fn attach_classic_link_vpc(&self,
                               input: &AttachClassicLinkVpcRequest)
                               -> Result<AttachClassicLinkVpcResult, AttachClassicLinkVpcError>;


    #[doc="<p>Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/\">Amazon Virtual Private Cloud User Guide</a>.</p>"]
    fn attach_internet_gateway(&self,
                               input: &AttachInternetGatewayRequest)
                               -> Result<(), AttachInternetGatewayError>;


    #[doc="<p>Attaches a network interface to an instance.</p>"]
    fn attach_network_interface
        (&self,
         input: &AttachNetworkInterfaceRequest)
         -> Result<AttachNetworkInterfaceResult, AttachNetworkInterfaceError>;


    #[doc="<p>Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.</p> <p>Encrypted EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>For a list of supported device names, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html\">Attaching an EBS Volume to an Instance</a>. Any device names that aren't reserved for instance store volumes can be used for EBS volumes. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html\">Amazon EC2 Instance Store</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>If a volume has an AWS Marketplace product code:</p> <ul> <li> <p>The volume can be attached only to a stopped instance.</p> </li> <li> <p>AWS Marketplace product codes are copied from the volume to the instance.</p> </li> <li> <p>You must be subscribed to the product.</p> </li> <li> <p>The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.</p> </li> </ul> <p>For an overview of the AWS Marketplace, see <a href=\"https://aws.amazon.com/marketplace/help/200900000\">Introducing AWS Marketplace</a>.</p> <p>For more information about EBS volumes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html\">Attaching Amazon EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn attach_volume(&self,
                     input: &AttachVolumeRequest)
                     -> Result<VolumeAttachment, AttachVolumeError>;


    #[doc="<p>Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn attach_vpn_gateway(&self,
                          input: &AttachVpnGatewayRequest)
                          -> Result<AttachVpnGatewayResult, AttachVpnGatewayError>;


    #[doc="<p>[EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html\">Security Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>. For more information about security group limits, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html\">Amazon VPC Limits</a>.</p> <p>Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.</p> <p>Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.</p>"]
    fn authorize_security_group_egress(&self,
                                       input: &AuthorizeSecurityGroupEgressRequest)
                                       -> Result<(), AuthorizeSecurityGroupEgressError>;


    #[doc="<p>Adds one or more ingress rules to a security group.</p> <p>Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.</p> <p>[EC2-Classic] This action gives one or more IPv4 CIDR address ranges permission to access a security group in your account, or gives one or more security groups (called the <i>source groups</i>) permission to access a security group for your account. A source group can be for your own AWS account, or another. You can have up to 100 rules per group.</p> <p>[EC2-VPC] This action gives one or more IPv4 or IPv6 CIDR address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the <i>source groups</i>) permission to access a security group for your VPC. The security groups must all be for the same VPC or a peer VPC in a VPC peering connection. For more information about VPC security group limits, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html\">Amazon VPC Limits</a>.</p>"]
    fn authorize_security_group_ingress(&self,
                                        input: &AuthorizeSecurityGroupIngressRequest)
                                        -> Result<(), AuthorizeSecurityGroupIngressError>;


    #[doc="<p>Bundles an Amazon instance store-backed Windows instance.</p> <p>During bundling, only the root device volume (C:\\) is bundled. Data on other instance store volumes is not preserved.</p> <note> <p>This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.</p> </note> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html\">Creating an Instance Store-Backed Windows AMI</a>.</p>"]
    fn bundle_instance(&self,
                       input: &BundleInstanceRequest)
                       -> Result<BundleInstanceResult, BundleInstanceError>;


    #[doc="<p>Cancels a bundling operation for an instance store-backed Windows instance.</p>"]
    fn cancel_bundle_task(&self,
                          input: &CancelBundleTaskRequest)
                          -> Result<CancelBundleTaskResult, CancelBundleTaskError>;


    #[doc="<p>Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html\">Importing a Virtual Machine Using the Amazon EC2 CLI</a>.</p>"]
    fn cancel_conversion_task(&self,
                              input: &CancelConversionRequest)
                              -> Result<(), CancelConversionTaskError>;


    #[doc="<p>Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.</p>"]
    fn cancel_export_task(&self,
                          input: &CancelExportTaskRequest)
                          -> Result<(), CancelExportTaskError>;


    #[doc="<p>Cancels an in-process import virtual machine or import snapshot task.</p>"]
    fn cancel_import_task(&self,
                          input: &CancelImportTaskRequest)
                          -> Result<CancelImportTaskResult, CancelImportTaskError>;


    #[doc="<p>Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn cancel_reserved_instances_listing
        (&self,
         input: &CancelReservedInstancesListingRequest)
         -> Result<CancelReservedInstancesListingResult, CancelReservedInstancesListingError>;


    #[doc="<p>Cancels the specified Spot fleet requests.</p> <p>After you cancel a Spot fleet request, the Spot fleet launches no new Spot instances. You must specify whether the Spot fleet should also terminate its Spot instances. If you terminate the instances, the Spot fleet request enters the <code>cancelled_terminating</code> state. Otherwise, the Spot fleet request enters the <code>cancelled_running</code> state and the instances continue to run until they are interrupted or you terminate them manually.</p>"]
    fn cancel_spot_fleet_requests
        (&self,
         input: &CancelSpotFleetRequestsRequest)
         -> Result<CancelSpotFleetRequestsResponse, EC2CancelSpotFleetRequestsError>;


    #[doc="<p>Cancels one or more Spot instance requests. Spot instances are instances that Amazon EC2 starts on your behalf when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html\">Spot Instance Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <important> <p>Canceling a Spot instance request does not terminate running Spot instances associated with the request.</p> </important>"]
    fn cancel_spot_instance_requests
        (&self,
         input: &CancelSpotInstanceRequestsRequest)
         -> Result<CancelSpotInstanceRequestsResult, CancelSpotInstanceRequestsError>;


    #[doc="<p>Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner needs to verify whether another user's instance is eligible for support.</p>"]
    fn confirm_product_instance
        (&self,
         input: &ConfirmProductInstanceRequest)
         -> Result<ConfirmProductInstanceResult, ConfirmProductInstanceError>;


    #[doc="<p>Initiates the copy of an AMI from the specified source region to the current region. You specify the destination region by using its endpoint when making the request.</p> <p>For more information about the prerequisites and limits when copying an AMI, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html\">Copying an AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn copy_image(&self, input: &CopyImageRequest) -> Result<CopyImageResult, CopyImageError>;


    #[doc="<p>Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to.</p> <p>Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless the <code>Encrypted</code> flag is specified during the snapshot copy operation. By default, encrypted snapshot copies use the default AWS Key Management Service (AWS KMS) customer master key (CMK); however, you can specify a non-default CMK with the <code>KmsKeyId</code> parameter. </p> <note> <p>To copy an encrypted snapshot that has been shared from another account, you must have permissions for the CMK used to encrypt the snapshot.</p> </note> <note> <p>Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.</p> </note> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html\">Copying an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn copy_snapshot(&self,
                     input: &CopySnapshotRequest)
                     -> Result<CopySnapshotResult, CopySnapshotError>;


    #[doc="<p>Provides information to AWS about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the AWS side of the VPN connection is the virtual private gateway.) You must provide the Internet-routable IP address of the customer gateway's external interface. The IP address must be static and may be behind a device performing network address translation (NAT).</p> <p>For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534 range).</p> <note> <p>Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception of 7224, which is reserved in the <code>us-east-1</code> region, and 9059, which is reserved in the <code>eu-west-1</code> region.</p> </note> <p>For more information about VPN customer gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <important> <p>You cannot create more than one customer gateway with the same VPN type, IP address, and BGP ASN parameter values. If you run an identical request more than one time, the first request creates the customer gateway, and subsequent requests return information about the existing customer gateway. The subsequent requests do not create new customer gateway resources.</p> </important>"]
    fn create_customer_gateway
        (&self,
         input: &CreateCustomerGatewayRequest)
         -> Result<CreateCustomerGatewayResult, CreateCustomerGatewayError>;


    #[doc="<p>Creates a default VPC with a size <code>/16</code> IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html\">Default VPC and Default Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>. You cannot specify the components of the default VPC yourself.</p> <p>You can create a default VPC if you deleted your previous default VPC. You cannot have more than one default VPC per region. </p> <p>If your account supports EC2-Classic, you cannot use this action to create a default VPC in a region that supports EC2-Classic. If you want a default VPC in a region that supports EC2-Classic, see \"I really want a default VPC for my existing EC2 account. Is that possible?\" in the <a href=\"http://aws.amazon.com/vpc/faqs/#Default_VPCs\">Default VPCs FAQ</a>.</p>"]
    fn create_default_vpc(&self,
                          input: &CreateDefaultVpcRequest)
                          -> Result<CreateDefaultVpcResult, CreateDefaultVpcError>;


    #[doc="<p>Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see <a href=\"http://www.ietf.org/rfc/rfc2132.txt\">RFC 2132</a>.</p> <ul> <li> <p> <code>domain-name-servers</code> - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. If you want your instance to receive a custom DNS hostname as specified in <code>domain-name</code>, you must set <code>domain-name-servers</code> to a custom DNS server.</p> </li> <li> <p> <code>domain-name</code> - If you're using AmazonProvidedDNS in <code>us-east-1</code>, specify <code>ec2.internal</code>. If you're using AmazonProvidedDNS in another region, specify <code>region.compute.internal</code> (for example, <code>ap-northeast-1.compute.internal</code>). Otherwise, specify a domain name (for example, <code>MyCompany.com</code>). This value is used to complete unqualified DNS hostnames. <b>Important</b>: Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.</p> </li> <li> <p> <code>ntp-servers</code> - The IP addresses of up to four Network Time Protocol (NTP) servers.</p> </li> <li> <p> <code>netbios-name-servers</code> - The IP addresses of up to four NetBIOS name servers.</p> </li> <li> <p> <code>netbios-node-type</code> - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see <a href=\"http://www.ietf.org/rfc/rfc2132.txt\">RFC 2132</a>.</p> </li> </ul> <p>Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an Internet gateway, make sure to set the <code>domain-name-servers</code> option either to <code>AmazonProvidedDNS</code> or to a domain name server of your choice. For more information about DHCP options, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_dhcp_options(&self,
                           input: &CreateDhcpOptionsRequest)
                           -> Result<CreateDhcpOptionsResult, CreateDhcpOptionsError>;


    #[doc="<p>[IPv6 only] Creates an egress-only Internet gateway for your VPC. An egress-only Internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the Internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.</p>"]
    fn create_egress_only_internet_gateway
        (&self,
         input: &CreateEgressOnlyInternetGatewayRequest)
         -> Result<CreateEgressOnlyInternetGatewayResult, CreateEgressOnlyInternetGatewayError>;


    #[doc="<p>Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log streams can include information about accepted and rejected traffic to a network interface. You can view the data in your log streams using Amazon CloudWatch Logs.</p> <p>In your request, you must also specify an IAM role that has permission to publish logs to CloudWatch Logs.</p>"]
    fn create_flow_logs(&self,
                        input: &CreateFlowLogsRequest)
                        -> Result<CreateFlowLogsResult, CreateFlowLogsError>;


    #[doc="<p>Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).</p> <p>The create operation is asynchronous. To verify that the AFI is ready for use, check the output logs.</p> <p>An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on one or more FPGA-accelerated instances. For more information, see the <a href=\"https://github.com/aws/aws-fpga/\">AWS FPGA Hardware Development Kit</a>.</p>"]
    fn create_fpga_image(&self,
                         input: &CreateFpgaImageRequest)
                         -> Result<CreateFpgaImageResult, CreateFpgaImageError>;


    #[doc="<p>Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.</p> <p>If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html\">Creating Amazon EBS-Backed Linux AMIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_image(&self,
                    input: &CreateImageRequest)
                    -> Result<CreateImageResult, CreateImageError>;


    #[doc="<p>Exports a running or stopped instance to an S3 bucket.</p> <p>For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html\">Exporting an Instance as a VM Using VM Import/Export</a> in the <i>VM Import/Export User Guide</i>.</p>"]
    fn create_instance_export_task
        (&self,
         input: &CreateInstanceExportTaskRequest)
         -> Result<CreateInstanceExportTaskResult, CreateInstanceExportTaskError>;


    #[doc="<p>Creates an Internet gateway for use with a VPC. After creating the Internet gateway, you attach it to a VPC using <a>AttachInternetGateway</a>.</p> <p>For more information about your VPC and Internet gateway, see the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/\">Amazon Virtual Private Cloud User Guide</a>.</p>"]
    fn create_internet_gateway
        (&self,
         input: &CreateInternetGatewayRequest)
         -> Result<CreateInternetGatewayResult, CreateInternetGatewayError>;


    #[doc="<p>Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.</p> <p>You can have up to five thousand key pairs per region.</p> <p>The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use <a>ImportKeyPair</a>.</p> <p>For more information about key pairs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_key_pair(&self, input: &CreateKeyPairRequest) -> Result<KeyPair, CreateKeyPairError>;


    #[doc="<p>Creates a NAT gateway in the specified subnet. A NAT gateway can be used to enable instances in a private subnet to connect to the Internet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">NAT Gateways</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_nat_gateway(&self,
                          input: &CreateNatGatewayRequest)
                          -> Result<CreateNatGatewayResult, CreateNatGatewayError>;


    #[doc="<p>Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.</p> <p>For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_network_acl(&self,
                          input: &CreateNetworkAclRequest)
                          -> Result<CreateNetworkAclResult, CreateNetworkAclError>;


    #[doc="<p>Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.</p> <p>We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.</p> <p>After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.</p> <p>For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_network_acl_entry(&self,
                                input: &CreateNetworkAclEntryRequest)
                                -> Result<(), CreateNetworkAclEntryError>;


    #[doc="<p>Creates a network interface in the specified subnet.</p> <p>For more information about network interfaces, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html\">Elastic Network Interfaces</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_network_interface
        (&self,
         input: &CreateNetworkInterfaceRequest)
         -> Result<CreateNetworkInterfaceResult, CreateNetworkInterfaceError>;


    #[doc="<p>Grants an AWS authorized partner account permission to attach the specified network interface to an instance in their account.</p> <p>You can grant permission to a single AWS account only, and only one account at a time.</p>"]
    fn create_network_interface_permission
        (&self,
         input: &CreateNetworkInterfacePermissionRequest)
         -> Result<CreateNetworkInterfacePermissionResult, CreateNetworkInterfacePermissionError>;


    #[doc="<p>Creates a placement group that you launch cluster instances into. You must give the group a name that's unique within the scope of your account.</p> <p>For more information about placement groups and cluster instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html\">Cluster Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_placement_group(&self,
                              input: &CreatePlacementGroupRequest)
                              -> Result<(), CreatePlacementGroupError>;


    #[doc="<p>Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the <a>DescribeReservedInstances</a> operation.</p> <note> <p>Only Standard Reserved Instances with a capacity reservation can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances and Standard Reserved Instances with a regional benefit cannot be sold.</p> </note> <p>The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.</p> <p>To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the <a>DescribeReservedInstancesListings</a> operation.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_reserved_instances_listing
        (&self,
         input: &CreateReservedInstancesListingRequest)
         -> Result<CreateReservedInstancesListingResult, CreateReservedInstancesListingError>;


    #[doc="<p>Creates a route in a route table within a VPC.</p> <p>You must specify one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.</p> <p>When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address <code>192.0.2.3</code>, and the route table includes the following two IPv4 routes:</p> <ul> <li> <p> <code>192.0.2.0/24</code> (goes to some target A)</p> </li> <li> <p> <code>192.0.2.0/28</code> (goes to some target B)</p> </li> </ul> <p>Both routes apply to the traffic destined for <code>192.0.2.3</code>. However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_route(&self,
                    input: &CreateRouteRequest)
                    -> Result<CreateRouteResult, CreateRouteError>;


    #[doc="<p>Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_route_table(&self,
                          input: &CreateRouteTableRequest)
                          -> Result<CreateRouteTableResult, CreateRouteTableError>;


    #[doc="<p>Creates a security group.</p> <p>A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html\">Amazon EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html\">Security Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <important> <p>EC2-Classic: You can have up to 500 security groups.</p> <p>EC2-VPC: You can create up to 500 security groups per VPC.</p> </important> <p>When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.</p> <p>You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.</p> <p>You can add or remove rules from your security groups using <a>AuthorizeSecurityGroupIngress</a>, <a>AuthorizeSecurityGroupEgress</a>, <a>RevokeSecurityGroupIngress</a>, and <a>RevokeSecurityGroupEgress</a>.</p>"]
    fn create_security_group(&self,
                             input: &CreateSecurityGroupRequest)
                             -> Result<CreateSecurityGroupResult, CreateSecurityGroupError>;


    #[doc="<p>Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.</p> <p>When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.</p> <p>You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is <code>pending</code>.</p> <p>To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.</p> <p>Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html\">Amazon Elastic Block Store</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_snapshot(&self,
                       input: &CreateSnapshotRequest)
                       -> Result<Snapshot, CreateSnapshotError>;


    #[doc="<p>Creates a data feed for Spot instances, enabling you to view Spot instance usage logs. You can create one data feed per AWS account. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html\">Spot Instance Data Feed</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_spot_datafeed_subscription
        (&self,
         input: &CreateSpotDatafeedSubscriptionRequest)
         -> Result<CreateSpotDatafeedSubscriptionResult, CreateSpotDatafeedSubscriptionError>;


    #[doc="<p>Creates a subnet in an existing VPC.</p> <p>When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's IPv4 CIDR block can be the same as the VPC's IPv4 CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's IPv4 CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses).</p> <p>If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length. </p> <important> <p>AWS reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.</p> </important> <p>If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.</p> <p>If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address doesn't change if you stop and restart the instance (unlike a similar instance launched outside a VPC, which gets a new IP address when restarted). It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.</p> <p>For more information about subnets, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html\">Your VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_subnet(&self,
                     input: &CreateSubnetRequest)
                     -> Result<CreateSubnetResult, CreateSubnetError>;


    #[doc="<p>Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.</p> <p>For more information about tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about creating IAM policies that control users' access to resources based on tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html\">Supported Resource-Level Permissions for Amazon EC2 API Actions</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_tags(&self, input: &CreateTagsRequest) -> Result<(), CreateTagsError>;


    #[doc="<p>Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see <a href=\"http://docs.aws.amazon.com/general/latest/gr/rande.html\">Regions and Endpoints</a>.</p> <p>You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.</p> <p>You can create encrypted volumes with the <code>Encrypted</code> parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>You can tag your volumes during creation. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Amazon EC2 Resources</a>.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html\">Creating an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_volume(&self, input: &CreateVolumeRequest) -> Result<Volume, CreateVolumeError>;


    #[doc="<p>Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). To help you decide how big to make your VPC, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html\">Your VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <p>You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. The IPv6 CIDR block uses a /56 prefix length, and is allocated from Amazon's pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC.</p> <p>By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <p>You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html\">Dedicated Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_vpc(&self, input: &CreateVpcRequest) -> Result<CreateVpcResult, CreateVpcError>;


    #[doc="<p>Creates a VPC endpoint for a specified AWS service. An endpoint enables you to create a private connection between your VPC and another AWS service in your account. You can specify an endpoint policy to attach to the endpoint that will control access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.</p> <p>Use <a>DescribeVpcEndpointServices</a> to get a list of supported AWS services.</p>"]
    fn create_vpc_endpoint(&self,
                           input: &CreateVpcEndpointRequest)
                           -> Result<CreateVpcEndpointResult, CreateVpcEndpointError>;


    #[doc="<p>Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.</p> <p>The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.</p> <p>If you try to create a VPC peering connection between VPCs that have overlapping CIDR blocks, the VPC peering connection status goes to <code>failed</code>.</p>"]
    fn create_vpc_peering_connection
        (&self,
         input: &CreateVpcPeeringConnectionRequest)
         -> Result<CreateVpcPeeringConnectionResult, CreateVpcPeeringConnectionError>;


    #[doc="<p>Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is <code>ipsec.1</code>.</p> <p>The response includes information that you need to give to your network administrator to configure your customer gateway.</p> <important> <p>We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway.</p> </important> <p>If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.</p> <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.</p> <p>For more information about VPN connections, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_vpn_connection(&self,
                             input: &CreateVpnConnectionRequest)
                             -> Result<CreateVpnConnectionResult, CreateVpnConnectionError>;


    #[doc="<p>Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.</p> <p>For more information about VPN connections, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_vpn_connection_route(&self,
                                   input: &CreateVpnConnectionRouteRequest)
                                   -> Result<(), CreateVpnConnectionRouteError>;


    #[doc="<p>Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.</p> <p>For more information about virtual private gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_vpn_gateway(&self,
                          input: &CreateVpnGatewayRequest)
                          -> Result<CreateVpnGatewayResult, CreateVpnGatewayError>;


    #[doc="<p>Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.</p>"]
    fn delete_customer_gateway(&self,
                               input: &DeleteCustomerGatewayRequest)
                               -> Result<(), DeleteCustomerGatewayError>;


    #[doc="<p>Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.</p>"]
    fn delete_dhcp_options(&self,
                           input: &DeleteDhcpOptionsRequest)
                           -> Result<(), DeleteDhcpOptionsError>;


    #[doc="<p>Deletes an egress-only Internet gateway.</p>"]
    fn delete_egress_only_internet_gateway
        (&self,
         input: &DeleteEgressOnlyInternetGatewayRequest)
         -> Result<DeleteEgressOnlyInternetGatewayResult, DeleteEgressOnlyInternetGatewayError>;


    #[doc="<p>Deletes one or more flow logs.</p>"]
    fn delete_flow_logs(&self,
                        input: &DeleteFlowLogsRequest)
                        -> Result<DeleteFlowLogsResult, DeleteFlowLogsError>;


    #[doc="<p>Deletes the specified Internet gateway. You must detach the Internet gateway from the VPC before you can delete it.</p>"]
    fn delete_internet_gateway(&self,
                               input: &DeleteInternetGatewayRequest)
                               -> Result<(), DeleteInternetGatewayError>;


    #[doc="<p>Deletes the specified key pair, by removing the public key from Amazon EC2.</p>"]
    fn delete_key_pair(&self, input: &DeleteKeyPairRequest) -> Result<(), DeleteKeyPairError>;


    #[doc="<p>Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.</p>"]
    fn delete_nat_gateway(&self,
                          input: &DeleteNatGatewayRequest)
                          -> Result<DeleteNatGatewayResult, DeleteNatGatewayError>;


    #[doc="<p>Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.</p>"]
    fn delete_network_acl(&self,
                          input: &DeleteNetworkAclRequest)
                          -> Result<(), DeleteNetworkAclError>;


    #[doc="<p>Deletes the specified ingress or egress entry (rule) from the specified network ACL.</p>"]
    fn delete_network_acl_entry(&self,
                                input: &DeleteNetworkAclEntryRequest)
                                -> Result<(), DeleteNetworkAclEntryError>;


    #[doc="<p>Deletes the specified network interface. You must detach the network interface before you can delete it.</p>"]
    fn delete_network_interface(&self,
                                input: &DeleteNetworkInterfaceRequest)
                                -> Result<(), DeleteNetworkInterfaceError>;


    #[doc="<p>Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you're removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.</p>"]
    fn delete_network_interface_permission
        (&self,
         input: &DeleteNetworkInterfacePermissionRequest)
         -> Result<DeleteNetworkInterfacePermissionResult, DeleteNetworkInterfacePermissionError>;


    #[doc="<p>Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information about placement groups and cluster instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html\">Cluster Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_placement_group(&self,
                              input: &DeletePlacementGroupRequest)
                              -> Result<(), DeletePlacementGroupError>;


    #[doc="<p>Deletes the specified route from the specified route table.</p>"]
    fn delete_route(&self, input: &DeleteRouteRequest) -> Result<(), DeleteRouteError>;


    #[doc="<p>Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.</p>"]
    fn delete_route_table(&self,
                          input: &DeleteRouteTableRequest)
                          -> Result<(), DeleteRouteTableError>;


    #[doc="<p>Deletes a security group.</p> <p>If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with <code>InvalidGroup.InUse</code> in EC2-Classic or <code>DependencyViolation</code> in EC2-VPC.</p>"]
    fn delete_security_group(&self,
                             input: &DeleteSecurityGroupRequest)
                             -> Result<(), DeleteSecurityGroupError>;


    #[doc="<p>Deletes the specified snapshot.</p> <p>When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.</p> <p>You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html\">Deleting an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_snapshot(&self, input: &DeleteSnapshotRequest) -> Result<(), DeleteSnapshotError>;


    #[doc="<p>Deletes the data feed for Spot instances.</p>"]
    fn delete_spot_datafeed_subscription(&self,
                                         input: &DeleteSpotDatafeedSubscriptionRequest)
                                         -> Result<(), DeleteSpotDatafeedSubscriptionError>;


    #[doc="<p>Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.</p>"]
    fn delete_subnet(&self, input: &DeleteSubnetRequest) -> Result<(), DeleteSubnetError>;


    #[doc="<p>Deletes the specified set of tags from the specified set of resources. This call is designed to follow a <code>DescribeTags</code> request.</p> <p>For more information about tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_tags(&self, input: &DeleteTagsRequest) -> Result<(), DeleteTagsError>;


    #[doc="<p>Deletes the specified EBS volume. The volume must be in the <code>available</code> state (not attached to an instance).</p> <note> <p>The volume may remain in the <code>deleting</code> state for several minutes.</p> </note> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html\">Deleting an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_volume(&self, input: &DeleteVolumeRequest) -> Result<(), DeleteVolumeError>;


    #[doc="<p>Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.</p>"]
    fn delete_vpc(&self, input: &DeleteVpcRequest) -> Result<(), DeleteVpcError>;


    #[doc="<p>Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes the endpoint routes in the route tables that were associated with the endpoint.</p>"]
    fn delete_vpc_endpoints(&self,
                            input: &DeleteVpcEndpointsRequest)
                            -> Result<DeleteVpcEndpointsResult, DeleteVpcEndpointsError>;


    #[doc="<p>Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the <code>active</code> state. The owner of the requester VPC can delete a VPC peering connection in the <code>pending-acceptance</code> state. </p>"]
    fn delete_vpc_peering_connection
        (&self,
         input: &DeleteVpcPeeringConnectionRequest)
         -> Result<DeleteVpcPeeringConnectionResult, DeleteVpcPeeringConnectionError>;


    #[doc="<p>Deletes the specified VPN connection.</p> <p>If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway using the new configuration information returned with the new VPN connection ID.</p>"]
    fn delete_vpn_connection(&self,
                             input: &DeleteVpnConnectionRequest)
                             -> Result<(), DeleteVpnConnectionError>;


    #[doc="<p>Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.</p>"]
    fn delete_vpn_connection_route(&self,
                                   input: &DeleteVpnConnectionRouteRequest)
                                   -> Result<(), DeleteVpnConnectionRouteError>;


    #[doc="<p>Deletes the specified virtual private gateway. We recommend that before you delete a virtual private gateway, you detach it from the VPC and delete the VPN connection. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.</p>"]
    fn delete_vpn_gateway(&self,
                          input: &DeleteVpnGatewayRequest)
                          -> Result<(), DeleteVpnGatewayError>;


    #[doc="<p>Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances; however, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.</p> <p>When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.</p>"]
    fn deregister_image(&self, input: &DeregisterImageRequest) -> Result<(), DeregisterImageError>;


    #[doc="<p>Describes attributes of your AWS account. The following are the supported account attributes:</p> <ul> <li> <p> <code>supported-platforms</code>: Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC.</p> </li> <li> <p> <code>default-vpc</code>: The ID of the default VPC for your account, or <code>none</code>.</p> </li> <li> <p> <code>max-instances</code>: The maximum number of On-Demand instances that you can run.</p> </li> <li> <p> <code>vpc-max-security-groups-per-interface</code>: The maximum number of security groups that you can assign to a network interface.</p> </li> <li> <p> <code>max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic. </p> </li> <li> <p> <code>vpc-max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.</p> </li> </ul>"]
    fn describe_account_attributes
        (&self,
         input: &DescribeAccountAttributesRequest)
         -> Result<DescribeAccountAttributesResult, DescribeAccountAttributesError>;


    #[doc="<p>Describes one or more of your Elastic IP addresses.</p> <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_addresses(&self,
                          input: &DescribeAddressesRequest)
                          -> Result<DescribeAddressesResult, DescribeAddressesError>;


    #[doc="<p>Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html\">Regions and Availability Zones</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_availability_zones
        (&self,
         input: &DescribeAvailabilityZonesRequest)
         -> Result<DescribeAvailabilityZonesResult, DescribeAvailabilityZonesError>;


    #[doc="<p>Describes one or more of your bundling tasks.</p> <note> <p>Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use <code>RegisterImage</code> with the Amazon S3 bucket name and image manifest name you provided to the bundle task.</p> </note>"]
    fn describe_bundle_tasks(&self,
                             input: &DescribeBundleTasksRequest)
                             -> Result<DescribeBundleTasksResult, DescribeBundleTasksError>;


    #[doc="<p>Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink; you cannot use this request to return information about other instances.</p>"]
    fn describe_classic_link_instances
        (&self,
         input: &DescribeClassicLinkInstancesRequest)
         -> Result<DescribeClassicLinkInstancesResult, DescribeClassicLinkInstancesError>;


    #[doc="<p>Describes one or more of your conversion tasks. For more information, see the <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/\">VM Import/Export User Guide</a>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    fn describe_conversion_tasks
        (&self,
         input: &DescribeConversionTasksRequest)
         -> Result<DescribeConversionTasksResult, DescribeConversionTasksError>;


    #[doc="<p>Describes one or more of your VPN customer gateways.</p> <p>For more information about VPN customer gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_customer_gateways
        (&self,
         input: &DescribeCustomerGatewaysRequest)
         -> Result<DescribeCustomerGatewaysResult, DescribeCustomerGatewaysError>;


    #[doc="<p>Describes one or more of your DHCP options sets.</p> <p>For more information about DHCP options sets, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_dhcp_options(&self,
                             input: &DescribeDhcpOptionsRequest)
                             -> Result<DescribeDhcpOptionsResult, DescribeDhcpOptionsError>;


    #[doc="<p>Describes one or more of your egress-only Internet gateways.</p>"]
    fn describe_egress_only_internet_gateways
        (&self,
         input: &DescribeEgressOnlyInternetGatewaysRequest)
         -> Result<DescribeEgressOnlyInternetGatewaysResult,
                   DescribeEgressOnlyInternetGatewaysError>;


    #[doc="<p>Describes the Elastic GPUs associated with your instances. For more information about Elastic GPUs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-gpus.html\">Amazon EC2 Elastic GPUs</a>.</p>"]
    fn describe_elastic_gpus(&self,
                             input: &DescribeElasticGpusRequest)
                             -> Result<DescribeElasticGpusResult, DescribeElasticGpusError>;


    #[doc="<p>Describes one or more of your export tasks.</p>"]
    fn describe_export_tasks(&self,
                             input: &DescribeExportTasksRequest)
                             -> Result<DescribeExportTasksResult, DescribeExportTasksError>;


    #[doc="<p>Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.</p>"]
    fn describe_flow_logs(&self,
                          input: &DescribeFlowLogsRequest)
                          -> Result<DescribeFlowLogsResult, DescribeFlowLogsError>;


    #[doc="<p>Describes one or more available Amazon FPGA Images (AFIs). These include public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.</p>"]
    fn describe_fpga_images(&self,
                            input: &DescribeFpgaImagesRequest)
                            -> Result<DescribeFpgaImagesResult, DescribeFpgaImagesError>;


    #[doc="<p>Describes the Dedicated Host Reservations that are available to purchase.</p> <p>The results describe all the Dedicated Host Reservation offerings, including offerings that may not match the instance family and region of your Dedicated Hosts. When purchasing an offering, ensure that the the instance family and region of the offering matches that of the Dedicated Host/s it will be associated with. For an overview of supported instance types, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html\">Dedicated Hosts Overview</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p>"]
    fn describe_host_reservation_offerings
        (&self,
         input: &DescribeHostReservationOfferingsRequest)
         -> Result<DescribeHostReservationOfferingsResult, DescribeHostReservationOfferingsError>;


    #[doc="<p>Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.</p>"]
    fn describe_host_reservations
        (&self,
         input: &DescribeHostReservationsRequest)
         -> Result<DescribeHostReservationsResult, DescribeHostReservationsError>;


    #[doc="<p>Describes one or more of your Dedicated Hosts.</p> <p>The results describe only the Dedicated Hosts in the region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released will be listed with the state <code>released</code>.</p>"]
    fn describe_hosts(&self,
                      input: &DescribeHostsRequest)
                      -> Result<DescribeHostsResult, DescribeHostsError>;


    #[doc="<p>Describes your IAM instance profile associations.</p>"]
    fn describe_iam_instance_profile_associations(&self, input: &DescribeIamInstanceProfileAssociationsRequest) -> Result<DescribeIamInstanceProfileAssociationsResult, DescribeIamInstanceProfileAssociationsError>;


    #[doc="<p>Describes the ID format settings for your resources on a per-region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.</p> <p>The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>. </p> <p>These settings apply to the IAM user who makes the request; they do not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the <a>ModifyIdFormat</a> command. Resources created with longer IDs are visible to all IAM users, regardless of these settings and provided that they have permission to use the relevant <code>Describe</code> command for the resource type.</p>"]
    fn describe_id_format(&self,
                          input: &DescribeIdFormatRequest)
                          -> Result<DescribeIdFormatResult, DescribeIdFormatError>;


    #[doc="<p>Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html\">Resource IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p> <p>The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>. </p> <p>These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.</p>"]
    fn describe_identity_id_format
        (&self,
         input: &DescribeIdentityIdFormatRequest)
         -> Result<DescribeIdentityIdFormatResult, DescribeIdentityIdFormatError>;


    #[doc="<p>Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.</p>"]
    fn describe_image_attribute(&self,
                                input: &DescribeImageAttributeRequest)
                                -> Result<ImageAttribute, DescribeImageAttributeError>;


    #[doc="<p>Describes one or more of the images (AMIs, AKIs, and ARIs) available to you. Images available to you include public images, private images that you own, and private images owned by other AWS accounts but for which you have explicit launch permissions.</p> <note> <p>Deregistered images are included in the returned results for an unspecified interval after deregistration.</p> </note>"]
    fn describe_images(&self,
                       input: &DescribeImagesRequest)
                       -> Result<DescribeImagesResult, DescribeImagesError>;


    #[doc="<p>Displays details about an import virtual machine or import snapshot tasks that are already created.</p>"]
    fn describe_import_image_tasks
        (&self,
         input: &DescribeImportImageTasksRequest)
         -> Result<DescribeImportImageTasksResult, DescribeImportImageTasksError>;


    #[doc="<p>Describes your import snapshot tasks.</p>"]
    fn describe_import_snapshot_tasks
        (&self,
         input: &DescribeImportSnapshotTasksRequest)
         -> Result<DescribeImportSnapshotTasksResult, DescribeImportSnapshotTasksError>;


    #[doc="<p>Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: <code>instanceType</code> | <code>kernel</code> | <code>ramdisk</code> | <code>userData</code> | <code>disableApiTermination</code> | <code>instanceInitiatedShutdownBehavior</code> | <code>rootDeviceName</code> | <code>blockDeviceMapping</code> | <code>productCodes</code> | <code>sourceDestCheck</code> | <code>groupSet</code> | <code>ebsOptimized</code> | <code>sriovNetSupport</code> </p>"]
    fn describe_instance_attribute(&self,
                                   input: &DescribeInstanceAttributeRequest)
                                   -> Result<InstanceAttribute, DescribeInstanceAttributeError>;


    #[doc="<p>Describes the status of one or more instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.</p> <p>Instance status includes the following components:</p> <ul> <li> <p> <b>Status checks</b> - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html\">Status Checks for Your Instances</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html\">Troubleshooting Instances with Failed Status Checks</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </li> <li> <p> <b>Scheduled events</b> - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html\">Scheduled Events for Your Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </li> <li> <p> <b>Instance state</b> - You can manage your instances from the moment you launch them through their termination. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html\">Instance Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </li> </ul>"]
    fn describe_instance_status
        (&self,
         input: &DescribeInstanceStatusRequest)
         -> Result<DescribeInstanceStatusResult, DescribeInstanceStatusError>;


    #[doc="<p>Describes one or more of your instances.</p> <p>If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the returned results.</p> <p>Recently terminated instances might appear in the returned results. This interval is usually less than one hour.</p> <p>If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.</p>"]
    fn describe_instances(&self,
                          input: &DescribeInstancesRequest)
                          -> Result<DescribeInstancesResult, DescribeInstancesError>;


    #[doc="<p>Describes one or more of your Internet gateways.</p>"]
    fn describe_internet_gateways
        (&self,
         input: &DescribeInternetGatewaysRequest)
         -> Result<DescribeInternetGatewaysResult, DescribeInternetGatewaysError>;


    #[doc="<p>Describes one or more of your key pairs.</p> <p>For more information about key pairs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_key_pairs(&self,
                          input: &DescribeKeyPairsRequest)
                          -> Result<DescribeKeyPairsResult, DescribeKeyPairsError>;


    #[doc="<p>Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.</p>"]
    fn describe_moving_addresses
        (&self,
         input: &DescribeMovingAddressesRequest)
         -> Result<DescribeMovingAddressesResult, DescribeMovingAddressesError>;


    #[doc="<p>Describes one or more of the your NAT gateways.</p>"]
    fn describe_nat_gateways(&self,
                             input: &DescribeNatGatewaysRequest)
                             -> Result<DescribeNatGatewaysResult, DescribeNatGatewaysError>;


    #[doc="<p>Describes one or more of your network ACLs.</p> <p>For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_network_acls(&self,
                             input: &DescribeNetworkAclsRequest)
                             -> Result<DescribeNetworkAclsResult, DescribeNetworkAclsError>;


    #[doc="<p>Describes a network interface attribute. You can specify only one attribute at a time.</p>"]
    fn describe_network_interface_attribute
        (&self,
         input: &DescribeNetworkInterfaceAttributeRequest)
         -> Result<DescribeNetworkInterfaceAttributeResult, DescribeNetworkInterfaceAttributeError>;


    #[doc="<p>Describes the permissions for your network interfaces. </p>"]
    fn describe_network_interface_permissions
        (&self,
         input: &DescribeNetworkInterfacePermissionsRequest)
         -> Result<DescribeNetworkInterfacePermissionsResult,
                   DescribeNetworkInterfacePermissionsError>;


    #[doc="<p>Describes one or more of your network interfaces.</p>"]
    fn describe_network_interfaces
        (&self,
         input: &DescribeNetworkInterfacesRequest)
         -> Result<DescribeNetworkInterfacesResult, DescribeNetworkInterfacesError>;


    #[doc="<p>Describes one or more of your placement groups. For more information about placement groups and cluster instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html\">Cluster Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_placement_groups
        (&self,
         input: &DescribePlacementGroupsRequest)
         -> Result<DescribePlacementGroupsResult, DescribePlacementGroupsError>;


    #[doc="<p>Describes available AWS services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service. A prefix list ID is required for creating an outbound security group rule that allows traffic from a VPC to access an AWS service through a VPC endpoint.</p>"]
    fn describe_prefix_lists(&self,
                             input: &DescribePrefixListsRequest)
                             -> Result<DescribePrefixListsResult, DescribePrefixListsError>;


    #[doc="<p>Describes one or more regions that are currently available to you.</p> <p>For a list of the regions supported by Amazon EC2, see <a href=\"http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region\">Regions and Endpoints</a>.</p>"]
    fn describe_regions(&self,
                        input: &DescribeRegionsRequest)
                        -> Result<DescribeRegionsResult, DescribeRegionsError>;


    #[doc="<p>Describes one or more of the Reserved Instances that you purchased.</p> <p>For more information about Reserved Instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html\">Reserved Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_reserved_instances
        (&self,
         input: &DescribeReservedInstancesRequest)
         -> Result<DescribeReservedInstancesResult, DescribeReservedInstancesError>;


    #[doc="<p>Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.</p> <p>The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.</p> <p>As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.</p> <p>As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_reserved_instances_listings
        (&self,
         input: &DescribeReservedInstancesListingsRequest)
         -> Result<DescribeReservedInstancesListingsResult, DescribeReservedInstancesListingsError>;


    #[doc="<p>Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html\">Modifying Reserved Instances</a> in the Amazon Elastic Compute Cloud User Guide.</p>"]
    fn describe_reserved_instances_modifications(&self, input: &DescribeReservedInstancesModificationsRequest) -> Result<DescribeReservedInstancesModificationsResult, DescribeReservedInstancesModificationsError>;


    #[doc="<p>Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.</p> <p>If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_reserved_instances_offerings
        (&self,
         input: &DescribeReservedInstancesOfferingsRequest)
         -> Result<DescribeReservedInstancesOfferingsResult,
                   DescribeReservedInstancesOfferingsError>;


    #[doc="<p>Describes one or more of your route tables.</p> <p>Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_route_tables(&self,
                             input: &DescribeRouteTablesRequest)
                             -> Result<DescribeRouteTablesResult, DescribeRouteTablesError>;


    #[doc="<p>Finds available schedules that meet the specified criteria.</p> <p>You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.</p> <p>After you find a schedule that meets your needs, call <a>PurchaseScheduledInstances</a> to purchase Scheduled Instances with that schedule.</p>"]
    fn describe_scheduled_instance_availability(&self, input: &DescribeScheduledInstanceAvailabilityRequest) -> Result<DescribeScheduledInstanceAvailabilityResult, DescribeScheduledInstanceAvailabilityError>;


    #[doc="<p>Describes one or more of your Scheduled Instances.</p>"]
    fn describe_scheduled_instances
        (&self,
         input: &DescribeScheduledInstancesRequest)
         -> Result<DescribeScheduledInstancesResult, DescribeScheduledInstancesError>;


    #[doc="<p>[EC2-VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.</p>"]
    fn describe_security_group_references
        (&self,
         input: &DescribeSecurityGroupReferencesRequest)
         -> Result<DescribeSecurityGroupReferencesResult, DescribeSecurityGroupReferencesError>;


    #[doc="<p>Describes one or more of your security groups.</p> <p>A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html\">Amazon EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html\">Security Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_security_groups
        (&self,
         input: &DescribeSecurityGroupsRequest)
         -> Result<DescribeSecurityGroupsResult, DescribeSecurityGroupsError>;


    #[doc="<p>Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.</p> <p>For more information about EBS snapshots, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html\">Amazon EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_snapshot_attribute
        (&self,
         input: &DescribeSnapshotAttributeRequest)
         -> Result<DescribeSnapshotAttributeResult, DescribeSnapshotAttributeError>;


    #[doc="<p>Describes one or more of the EBS snapshots available to you. Available snapshots include public snapshots available for any AWS account to launch, private snapshots that you own, and private snapshots owned by another AWS account but for which you've been given explicit create volume permissions.</p> <p>The create volume permissions fall into the following categories:</p> <ul> <li> <p> <i>public</i>: The owner of the snapshot granted create volume permissions for the snapshot to the <code>all</code> group. All AWS accounts have create volume permissions for these snapshots.</p> </li> <li> <p> <i>explicit</i>: The owner of the snapshot granted create volume permissions to a specific AWS account.</p> </li> <li> <p> <i>implicit</i>: An AWS account has implicit create volume permissions for all snapshots it owns.</p> </li> </ul> <p>The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.</p> <p>If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.</p> <p>If you specify one or more snapshot owners using the <code>OwnerIds</code> option, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS account IDs of the specified owners, <code>amazon</code> for snapshots owned by Amazon, or <code>self</code> for snapshots that you own.</p> <p>If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify AWS account IDs (if you own the snapshots), <code>self</code> for snapshots for which you own or have explicit permissions, or <code>all</code> for public snapshots.</p> <p>If you are describing a long list of snapshots, you can paginate the output to make the list more manageable. The <code>MaxResults</code> parameter sets the maximum number of results returned in a single page. If the list of results exceeds your <code>MaxResults</code> value, then that number of results is returned along with a <code>NextToken</code> value that can be passed to a subsequent <code>DescribeSnapshots</code> request to retrieve the remaining results.</p> <p>For more information about EBS snapshots, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html\">Amazon EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_snapshots(&self,
                          input: &DescribeSnapshotsRequest)
                          -> Result<DescribeSnapshotsResult, DescribeSnapshotsError>;


    #[doc="<p>Describes the data feed for Spot instances. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html\">Spot Instance Data Feed</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_spot_datafeed_subscription
        (&self,
         input: &DescribeSpotDatafeedSubscriptionRequest)
         -> Result<DescribeSpotDatafeedSubscriptionResult, DescribeSpotDatafeedSubscriptionError>;


    #[doc="<p>Describes the running instances for the specified Spot fleet.</p>"]
    fn describe_spot_fleet_instances
        (&self,
         input: &DescribeSpotFleetInstancesRequest)
         -> Result<DescribeSpotFleetInstancesResponse, DescribeSpotFleetInstancesError>;


    #[doc="<p>Describes the events for the specified Spot fleet request during the specified time.</p> <p>Spot fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event.</p>"]
    fn describe_spot_fleet_request_history
        (&self,
         input: &DescribeSpotFleetRequestHistoryRequest)
         -> Result<DescribeSpotFleetRequestHistoryResponse, DescribeSpotFleetRequestHistoryError>;


    #[doc="<p>Describes your Spot fleet requests.</p> <p>Spot fleet requests are deleted 48 hours after they are canceled and their instances are terminated.</p>"]
    fn describe_spot_fleet_requests
        (&self,
         input: &DescribeSpotFleetRequestsRequest)
         -> Result<DescribeSpotFleetRequestsResponse, DescribeSpotFleetRequestsError>;


    #[doc="<p>Describes the Spot instance requests that belong to your account. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html\">Spot Instance Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>You can use <code>DescribeSpotInstanceRequests</code> to find a running Spot instance by examining the response. If the status of the Spot instance is <code>fulfilled</code>, the instance ID appears in the response and contains the identifier of the instance. Alternatively, you can use <a>DescribeInstances</a> with a filter to look for instances where the instance lifecycle is <code>spot</code>.</p> <p>Spot instance requests are deleted 4 hours after they are canceled and their instances are terminated.</p>"]
    fn describe_spot_instance_requests
        (&self,
         input: &DescribeSpotInstanceRequestsRequest)
         -> Result<DescribeSpotInstanceRequestsResult, DescribeSpotInstanceRequestsError>;


    #[doc="<p>Describes the Spot price history. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html\">Spot Instance Pricing History</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.</p>"]
    fn describe_spot_price_history
        (&self,
         input: &DescribeSpotPriceHistoryRequest)
         -> Result<DescribeSpotPriceHistoryResult, DescribeSpotPriceHistoryError>;


    #[doc="<p>[EC2-VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in a peer VPC, or a security group in a peer VPC for which the VPC peering connection has been deleted.</p>"]
    fn describe_stale_security_groups
        (&self,
         input: &DescribeStaleSecurityGroupsRequest)
         -> Result<DescribeStaleSecurityGroupsResult, DescribeStaleSecurityGroupsError>;


    #[doc="<p>Describes one or more of your subnets.</p> <p>For more information about subnets, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html\">Your VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_subnets(&self,
                        input: &DescribeSubnetsRequest)
                        -> Result<DescribeSubnetsResult, DescribeSubnetsError>;


    #[doc="<p>Describes one or more of the tags for your EC2 resources.</p> <p>For more information about tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_tags(&self,
                     input: &DescribeTagsRequest)
                     -> Result<DescribeTagsResult, DescribeTagsError>;


    #[doc="<p>Describes the specified attribute of the specified volume. You can specify only one attribute at a time.</p> <p>For more information about EBS volumes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html\">Amazon EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_volume_attribute
        (&self,
         input: &DescribeVolumeAttributeRequest)
         -> Result<DescribeVolumeAttributeResult, DescribeVolumeAttributeError>;


    #[doc="<p>Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.</p> <p>The <code>DescribeVolumeStatus</code> operation provides the following information about the specified volumes:</p> <p> <i>Status</i>: Reflects the current status of the volume. The possible values are <code>ok</code>, <code>impaired</code> , <code>warning</code>, or <code>insufficient-data</code>. If all checks pass, the overall status of the volume is <code>ok</code>. If the check fails, the overall status is <code>impaired</code>. If the status is <code>insufficient-data</code>, then the checks may still be taking place on your volume at the time. We recommend that you retry the request. For more information on volume status, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html\">Monitoring the Status of Your Volumes</a>.</p> <p> <i>Events</i>: Reflect the cause of a volume status and may require you to take action. For example, if your volume returns an <code>impaired</code> status, then the volume event might be <code>potential-data-inconsistency</code>. This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and may have inconsistent data.</p> <p> <i>Actions</i>: Reflect the actions you may have to take in response to an event. For example, if the status of the volume is <code>impaired</code> and the volume event shows <code>potential-data-inconsistency</code>, then the action shows <code>enable-volume-io</code>. This means that you may want to enable the I/O operations for the volume by calling the <a>EnableVolumeIO</a> action and then check the volume for data consistency.</p> <note> <p>Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the <code>error</code> state (for example, when a volume is incapable of accepting I/O.)</p> </note>"]
    fn describe_volume_status(&self,
                              input: &DescribeVolumeStatusRequest)
                              -> Result<DescribeVolumeStatusResult, DescribeVolumeStatusError>;


    #[doc="<p>Describes the specified EBS volumes.</p> <p>If you are describing a long list of volumes, you can paginate the output to make the list more manageable. The <code>MaxResults</code> parameter sets the maximum number of results returned in a single page. If the list of results exceeds your <code>MaxResults</code> value, then that number of results is returned along with a <code>NextToken</code> value that can be passed to a subsequent <code>DescribeVolumes</code> request to retrieve the remaining results.</p> <p>For more information about EBS volumes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html\">Amazon EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_volumes(&self,
                        input: &DescribeVolumesRequest)
                        -> Result<DescribeVolumesResult, DescribeVolumesError>;


    #[doc="<p>Reports the current modification status of EBS volumes.</p> <p>Current-generation EBS volumes support modification of attributes including type, size, and (for <code>io1</code> volumes) IOPS provisioning while either attached to or detached from an instance. Following an action from the API or the console to modify a volume, the status of the modification may be <code>modifying</code>, <code>optimizing</code>, <code>completed</code>, or <code>failed</code>. If a volume has never been modified, then certain elements of the returned <code>VolumeModification</code> objects are null. </p> <p> You can also use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the <a href=\"http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/\">Amazon CloudWatch Events User Guide</a>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods\">Monitoring Volume Modifications\"</a>. </p>"]
    fn describe_volumes_modifications
        (&self,
         input: &DescribeVolumesModificationsRequest)
         -> Result<DescribeVolumesModificationsResult, DescribeVolumesModificationsError>;


    #[doc="<p>Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.</p>"]
    fn describe_vpc_attribute(&self,
                              input: &DescribeVpcAttributeRequest)
                              -> Result<DescribeVpcAttributeResult, DescribeVpcAttributeError>;


    #[doc="<p>Describes the ClassicLink status of one or more VPCs.</p>"]
    fn describe_vpc_classic_link
        (&self,
         input: &DescribeVpcClassicLinkRequest)
         -> Result<DescribeVpcClassicLinkResult, DescribeVpcClassicLinkError>;


    #[doc="<p>Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_vpc_classic_link_dns_support
        (&self,
         input: &DescribeVpcClassicLinkDnsSupportRequest)
         -> Result<DescribeVpcClassicLinkDnsSupportResult, DescribeVpcClassicLinkDnsSupportError>;


    #[doc="<p>Describes all supported AWS services that can be specified when creating a VPC endpoint.</p>"]
    fn describe_vpc_endpoint_services
        (&self,
         input: &DescribeVpcEndpointServicesRequest)
         -> Result<DescribeVpcEndpointServicesResult, DescribeVpcEndpointServicesError>;


    #[doc="<p>Describes one or more of your VPC endpoints.</p>"]
    fn describe_vpc_endpoints(&self,
                              input: &DescribeVpcEndpointsRequest)
                              -> Result<DescribeVpcEndpointsResult, DescribeVpcEndpointsError>;


    #[doc="<p>Describes one or more of your VPC peering connections.</p>"]
    fn describe_vpc_peering_connections
        (&self,
         input: &DescribeVpcPeeringConnectionsRequest)
         -> Result<DescribeVpcPeeringConnectionsResult, DescribeVpcPeeringConnectionsError>;


    #[doc="<p>Describes one or more of your VPCs.</p>"]
    fn describe_vpcs(&self,
                     input: &DescribeVpcsRequest)
                     -> Result<DescribeVpcsResult, DescribeVpcsError>;


    #[doc="<p>Describes one or more of your VPN connections.</p> <p>For more information about VPN connections, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_vpn_connections
        (&self,
         input: &DescribeVpnConnectionsRequest)
         -> Result<DescribeVpnConnectionsResult, DescribeVpnConnectionsError>;


    #[doc="<p>Describes one or more of your virtual private gateways.</p> <p>For more information about virtual private gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding an IPsec Hardware VPN to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_vpn_gateways(&self,
                             input: &DescribeVpnGatewaysRequest)
                             -> Result<DescribeVpnGatewaysResult, DescribeVpnGatewaysError>;


    #[doc="<p>Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.</p>"]
    fn detach_classic_link_vpc(&self,
                               input: &DetachClassicLinkVpcRequest)
                               -> Result<DetachClassicLinkVpcResult, DetachClassicLinkVpcError>;


    #[doc="<p>Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.</p>"]
    fn detach_internet_gateway(&self,
                               input: &DetachInternetGatewayRequest)
                               -> Result<(), DetachInternetGatewayError>;


    #[doc="<p>Detaches a network interface from an instance.</p>"]
    fn detach_network_interface(&self,
                                input: &DetachNetworkInterfaceRequest)
                                -> Result<(), DetachNetworkInterfaceError>;


    #[doc="<p>Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the <code>busy</code> state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.</p> <p>When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html\">Detaching an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn detach_volume(&self,
                     input: &DetachVolumeRequest)
                     -> Result<VolumeAttachment, DetachVolumeError>;


    #[doc="<p>Detaches a virtual private gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a virtual private gateway has been completely detached from a VPC by describing the virtual private gateway (any attachments to the virtual private gateway are also described).</p> <p>You must wait for the attachment's state to switch to <code>detached</code> before you can delete the VPC or attach a different VPC to the virtual private gateway.</p>"]
    fn detach_vpn_gateway(&self,
                          input: &DetachVpnGatewayRequest)
                          -> Result<(), DetachVpnGatewayError>;


    #[doc="<p>Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.</p>"]
    fn disable_vgw_route_propagation(&self,
                                     input: &DisableVgwRoutePropagationRequest)
                                     -> Result<(), DisableVgwRoutePropagationError>;


    #[doc="<p>Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.</p>"]
    fn disable_vpc_classic_link
        (&self,
         input: &DisableVpcClassicLinkRequest)
         -> Result<DisableVpcClassicLinkResult, DisableVpcClassicLinkError>;


    #[doc="<p>Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information about ClassicLink, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn disable_vpc_classic_link_dns_support
        (&self,
         input: &DisableVpcClassicLinkDnsSupportRequest)
         -> Result<DisableVpcClassicLinkDnsSupportResult, DisableVpcClassicLinkDnsSupportError>;


    #[doc="<p>Disassociates an Elastic IP address from the instance or network interface it's associated with.</p> <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.</p>"]
    fn disassociate_address(&self,
                            input: &DisassociateAddressRequest)
                            -> Result<(), DisassociateAddressError>;


    #[doc="<p>Disassociates an IAM instance profile from a running or stopped instance.</p> <p>Use <a>DescribeIamInstanceProfileAssociations</a> to get the association ID.</p>"]
    fn disassociate_iam_instance_profile
        (&self,
         input: &DisassociateIamInstanceProfileRequest)
         -> Result<DisassociateIamInstanceProfileResult, DisassociateIamInstanceProfileError>;


    #[doc="<p>Disassociates a subnet from a route table.</p> <p>After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn disassociate_route_table(&self,
                                input: &DisassociateRouteTableRequest)
                                -> Result<(), DisassociateRouteTableError>;


    #[doc="<p>Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it. </p>"]
    fn disassociate_subnet_cidr_block
        (&self,
         input: &DisassociateSubnetCidrBlockRequest)
         -> Result<DisassociateSubnetCidrBlockResult, DisassociateSubnetCidrBlockError>;


    #[doc="<p>Disassociates a CIDR block from a VPC. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it. </p>"]
    fn disassociate_vpc_cidr_block
        (&self,
         input: &DisassociateVpcCidrBlockRequest)
         -> Result<DisassociateVpcCidrBlockResult, DisassociateVpcCidrBlockError>;


    #[doc="<p>Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.</p>"]
    fn enable_vgw_route_propagation(&self,
                                    input: &EnableVgwRoutePropagationRequest)
                                    -> Result<(), EnableVgwRoutePropagationError>;


    #[doc="<p>Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.</p>"]
    fn enable_volume_io(&self, input: &EnableVolumeIORequest) -> Result<(), EnableVolumeIOError>;


    #[doc="<p>Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC's route tables have existing routes for address ranges within the <code>10.0.0.0/8</code> IP address range, excluding local routes for VPCs in the <code>10.0.0.0/16</code> and <code>10.1.0.0/16</code> IP address ranges. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn enable_vpc_classic_link(&self,
                               input: &EnableVpcClassicLinkRequest)
                               -> Result<EnableVpcClassicLinkResult, EnableVpcClassicLinkError>;


    #[doc="<p>Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information about ClassicLink, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn enable_vpc_classic_link_dns_support
        (&self,
         input: &EnableVpcClassicLinkDnsSupportRequest)
         -> Result<EnableVpcClassicLinkDnsSupportResult, EnableVpcClassicLinkDnsSupportError>;


    #[doc="<p>Gets the console output for the specified instance.</p> <p>Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.</p> <p>Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which is available for at least one hour after the most recent post.</p> <p>For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.</p> <p>For Windows instances, the instance console output includes output from the EC2Config service.</p>"]
    fn get_console_output(&self,
                          input: &GetConsoleOutputRequest)
                          -> Result<GetConsoleOutputResult, GetConsoleOutputError>;


    #[doc="<p>Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.</p> <p>The returned content is Base64-encoded.</p>"]
    fn get_console_screenshot(&self,
                              input: &GetConsoleScreenshotRequest)
                              -> Result<GetConsoleScreenshotResult, GetConsoleScreenshotError>;


    #[doc="<p>Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.</p> <p>This is a preview of the <a>PurchaseHostReservation</a> action and does not result in the offering being purchased.</p>"]
    fn get_host_reservation_purchase_preview
        (&self,
         input: &GetHostReservationPurchasePreviewRequest)
         -> Result<GetHostReservationPurchasePreviewResult, GetHostReservationPurchasePreviewError>;


    #[doc="<p>Retrieves the encrypted administrator password for an instance running Windows.</p> <p>The Windows password is generated at boot if the <code>EC2Config</code> service plugin, <code>Ec2SetPassword</code>, is enabled. This usually only happens the first time an AMI is launched, and then <code>Ec2SetPassword</code> is automatically disabled. The password is not generated for rebundled AMIs unless <code>Ec2SetPassword</code> is enabled before bundling.</p> <p>The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.</p> <p>Password generation and encryption takes a few moments. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.</p>"]
    fn get_password_data(&self,
                         input: &GetPasswordDataRequest)
                         -> Result<GetPasswordDataResult, GetPasswordDataError>;


    #[doc="<p>Returns details about the values and term of your specified Convertible Reserved Instances. When a target configuration is specified, it returns information about whether the exchange is valid and can be performed.</p>"]
    fn get_reserved_instances_exchange_quote
        (&self,
         input: &GetReservedInstancesExchangeQuoteRequest)
         -> Result<GetReservedInstancesExchangeQuoteResult, GetReservedInstancesExchangeQuoteError>;


    #[doc="<p>Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI). For more information, see <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html\">Importing a VM as an Image Using VM Import/Export</a> in the <i>VM Import/Export User Guide</i>.</p>"]
    fn import_image(&self,
                    input: &ImportImageRequest)
                    -> Result<ImportImageResult, ImportImageError>;


    #[doc="<p>Creates an import instance task using metadata from the specified disk image. <code>ImportInstance</code> only supports single-volume VMs. To import multi-volume VMs, use <a>ImportImage</a>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html\">Importing a Virtual Machine Using the Amazon EC2 CLI</a>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    fn import_instance(&self,
                       input: &ImportInstanceRequest)
                       -> Result<ImportInstanceResult, ImportInstanceError>;


    #[doc="<p>Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with <a>CreateKeyPair</a>, in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.</p> <p>For more information about key pairs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn import_key_pair(&self,
                       input: &ImportKeyPairRequest)
                       -> Result<ImportKeyPairResult, ImportKeyPairError>;


    #[doc="<p>Imports a disk into an EBS snapshot.</p>"]
    fn import_snapshot(&self,
                       input: &ImportSnapshotRequest)
                       -> Result<ImportSnapshotResult, ImportSnapshotError>;


    #[doc="<p>Creates an import volume task using metadata from the specified disk image.For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/importing-your-volumes-into-amazon-ebs.html\">Importing Disks to Amazon EBS</a>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    fn import_volume(&self,
                     input: &ImportVolumeRequest)
                     -> Result<ImportVolumeResult, ImportVolumeError>;


    #[doc="<p>Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, AWS will place instances that you launch with a tenancy of <code>host</code>, but without targeting a specific host ID, onto any available Dedicated Host in your account which has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID if you want the instance to launch onto a specific host. If no host ID is provided, the instance will be launched onto a suitable host which has auto-placement enabled.</p>"]
    fn modify_hosts(&self,
                    input: &ModifyHostsRequest)
                    -> Result<ModifyHostsResult, ModifyHostsError>;


    #[doc="<p>Modifies the ID format for the specified resource on a per-region basis. You can specify that resources should receive longer IDs (17-character IDs) when they are created. The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>.</p> <p>This setting applies to the IAM user who makes the request; it does not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user. If you're using this action as the root user, then these settings apply to the entire account, unless an IAM user explicitly overrides these settings for themselves. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html\">Resource IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p> <p>Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant <code>Describe</code> command for the resource type.</p>"]
    fn modify_id_format(&self, input: &ModifyIdFormatRequest) -> Result<(), ModifyIdFormatError>;


    #[doc="<p>Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account. You can specify that resources should receive longer IDs (17-character IDs) when they are created. </p> <p>The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html\">Resource IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p> <p>This setting applies to the principal specified in the request; it does not apply to the principal that makes the request. </p> <p>Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant <code>Describe</code> command for the resource type.</p>"]
    fn modify_identity_id_format(&self,
                                 input: &ModifyIdentityIdFormatRequest)
                                 -> Result<(), ModifyIdentityIdFormatError>;


    #[doc="<p>Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.</p> <note> <p>AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.</p> </note> <note> <p>The SriovNetSupport enhanced networking attribute cannot be changed using this command. Instead, enable SriovNetSupport on an instance and create an AMI from the instance. This will result in an image with SriovNetSupport enabled.</p> </note>"]
    fn modify_image_attribute(&self,
                              input: &ModifyImageAttributeRequest)
                              -> Result<(), ModifyImageAttributeError>;


    #[doc="<p>Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.</p> <p>To modify some attributes, the instance must be stopped. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html\">Modifying Attributes of a Stopped Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn modify_instance_attribute(&self,
                                 input: &ModifyInstanceAttributeRequest)
                                 -> Result<(), ModifyInstanceAttributeError>;


    #[doc="<p>Set the instance affinity value for a specific stopped instance and modify the instance tenancy setting.</p> <p>Instance affinity is disabled by default. When instance affinity is <code>host</code> and it is not associated with a specific Dedicated Host, the next time it is launched it will automatically be associated with the host it lands on. This relationship will persist if the instance is stopped/started, or rebooted.</p> <p>You can modify the host ID associated with a stopped instance. If a stopped instance has a new host ID association, the instance will target that host when restarted.</p> <p>You can modify the tenancy of a stopped instance with a tenancy of <code>host</code> or <code>dedicated</code>.</p> <p>Affinity, hostID, and tenancy are not required parameters, but at least one of them must be specified in the request. Affinity and tenancy can be modified in the same request, but tenancy can only be modified on instances that are stopped.</p>"]
    fn modify_instance_placement
        (&self,
         input: &ModifyInstancePlacementRequest)
         -> Result<ModifyInstancePlacementResult, ModifyInstancePlacementError>;


    #[doc="<p>Modifies the specified network interface attribute. You can specify only one attribute at a time.</p>"]
    fn modify_network_interface_attribute(&self,
                                          input: &ModifyNetworkInterfaceAttributeRequest)
                                          -> Result<(), ModifyNetworkInterfaceAttributeError>;


    #[doc="<p>Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Standard Reserved Instances. The Reserved Instances to be modified must be identical, except for Availability Zone, network platform, and instance type.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html\">Modifying Reserved Instances</a> in the Amazon Elastic Compute Cloud User Guide.</p>"]
    fn modify_reserved_instances
        (&self,
         input: &ModifyReservedInstancesRequest)
         -> Result<ModifyReservedInstancesResult, ModifyReservedInstancesError>;


    #[doc="<p>Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single API call. If you need to both add and remove account IDs for a snapshot, you must use multiple API calls.</p> <note> <p>Encrypted snapshots and snapshots with AWS Marketplace product codes cannot be made public. Snapshots encrypted with your default CMK cannot be shared with other accounts.</p> </note> <p>For more information on modifying snapshot permissions, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html\">Sharing Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn modify_snapshot_attribute(&self,
                                 input: &ModifySnapshotAttributeRequest)
                                 -> Result<(), ModifySnapshotAttributeError>;


    #[doc="<p>Modifies the specified Spot fleet request.</p> <p>While the Spot fleet request is being modified, it is in the <code>modifying</code> state.</p> <p>To scale up your Spot fleet, increase its target capacity. The Spot fleet launches the additional Spot instances according to the allocation strategy for the Spot fleet request. If the allocation strategy is <code>lowestPrice</code>, the Spot fleet launches instances using the Spot pool with the lowest price. If the allocation strategy is <code>diversified</code>, the Spot fleet distributes the instances across the Spot pools.</p> <p>To scale down your Spot fleet, decrease its target capacity. First, the Spot fleet cancels any open bids that exceed the new target capacity. You can request that the Spot fleet terminate Spot instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is <code>lowestPrice</code>, the Spot fleet terminates the instances with the highest price per unit. If the allocation strategy is <code>diversified</code>, the Spot fleet terminates instances across the Spot pools. Alternatively, you can request that the Spot fleet keep the fleet at its current size, but not replace any Spot instances that are interrupted or that you terminate manually.</p>"]
    fn modify_spot_fleet_request
        (&self,
         input: &ModifySpotFleetRequestRequest)
         -> Result<ModifySpotFleetRequestResponse, ModifySpotFleetRequestError>;


    #[doc="<p>Modifies a subnet attribute. You can only modify one attribute at a time.</p>"]
    fn modify_subnet_attribute(&self,
                               input: &ModifySubnetAttributeRequest)
                               -> Result<(), ModifySubnetAttributeError>;


    #[doc="<p>You can modify several parameters of an existing EBS volume, including volume size, volume type, and IOPS capacity. If your EBS volume is attached to a current-generation EC2 instance type, you may be able to apply these changes without stopping the instance or detaching the volume from it. For more information about modifying an EBS volume running Linux, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Linux</a>. For more information about modifying an EBS volume running Windows, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Windows</a>. </p> <p> When you complete a resize operation on your volume, you need to extend the volume's file-system size to take advantage of the new storage capacity. For information about extending a Linux file system, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux\">Extending a Linux File System</a>. For information about extending a Windows file system, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows\">Extending a Windows File System</a>. </p> <p> You can use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the <a href=\"http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/\">Amazon CloudWatch Events User Guide</a>. You can also track the status of a modification using the <a>DescribeVolumesModifications</a> API. For information about tracking status changes using either method, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods\">Monitoring Volume Modifications</a>. </p> <note> <p>With previous-generation instance types, resizing an EBS volume may require detaching and reattaching the volume or stopping and restarting the instance. For more information about modifying an EBS volume running Linux, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Linux</a>. For more information about modifying an EBS volume running Windows, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Windows</a>.</p> </note> <note> <p>If you reach the maximum volume modification rate per volume limit, you will need to wait at least six hours before applying further modifications to the affected EBS volume.</p> </note>"]
    fn modify_volume(&self,
                     input: &ModifyVolumeRequest)
                     -> Result<ModifyVolumeResult, ModifyVolumeError>;


    #[doc="<p>Modifies a volume attribute.</p> <p>By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.</p> <p>You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.</p>"]
    fn modify_volume_attribute(&self,
                               input: &ModifyVolumeAttributeRequest)
                               -> Result<(), ModifyVolumeAttributeError>;


    #[doc="<p>Modifies the specified attribute of the specified VPC.</p>"]
    fn modify_vpc_attribute(&self,
                            input: &ModifyVpcAttributeRequest)
                            -> Result<(), ModifyVpcAttributeError>;


    #[doc="<p>Modifies attributes of a specified VPC endpoint. You can modify the policy associated with the endpoint, and you can add and remove route tables associated with the endpoint.</p>"]
    fn modify_vpc_endpoint(&self,
                           input: &ModifyVpcEndpointRequest)
                           -> Result<ModifyVpcEndpointResult, ModifyVpcEndpointError>;


    #[doc="<p>Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:</p> <ul> <li> <p>Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC.</p> </li> <li> <p>Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC.</p> </li> <li> <p>Enable/disable a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p> </li> </ul> <p>If the peered VPCs are in different accounts, each owner must initiate a separate request to modify the peering connection options, depending on whether their VPC was the requester or accepter for the VPC peering connection. If the peered VPCs are in the same account, you can modify the requester and accepter options in the same request. To confirm which VPC is the accepter and requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a> command.</p>"]
    fn modify_vpc_peering_connection_options
        (&self,
         input: &ModifyVpcPeeringConnectionOptionsRequest)
         -> Result<ModifyVpcPeeringConnectionOptionsResult, ModifyVpcPeeringConnectionOptionsError>;


    #[doc="<p>Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html\">Monitoring Your Instances and Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>To disable detailed monitoring, see .</p>"]
    fn monitor_instances(&self,
                         input: &MonitorInstancesRequest)
                         -> Result<MonitorInstancesResult, MonitorInstancesError>;


    #[doc="<p>Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the <a>RestoreAddressToClassic</a> request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform. </p>"]
    fn move_address_to_vpc(&self,
                           input: &MoveAddressToVpcRequest)
                           -> Result<MoveAddressToVpcResult, MoveAddressToVpcError>;


    #[doc="<p>Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.</p>"]
    fn purchase_host_reservation
        (&self,
         input: &PurchaseHostReservationRequest)
         -> Result<PurchaseHostReservationResult, PurchaseHostReservationError>;


    #[doc="<p>Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.</p> <p>Use <a>DescribeReservedInstancesOfferings</a> to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with <a>DescribeReservedInstances</a>.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html\">Reserved Instances</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn purchase_reserved_instances_offering
        (&self,
         input: &PurchaseReservedInstancesOfferingRequest)
         -> Result<PurchaseReservedInstancesOfferingResult, PurchaseReservedInstancesOfferingError>;


    #[doc="<p>Purchases one or more Scheduled Instances with the specified schedule.</p> <p>Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call <a>DescribeScheduledInstanceAvailability</a> to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call <a>RunScheduledInstances</a> during each scheduled time period.</p> <p>After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.</p>"]
    fn purchase_scheduled_instances
        (&self,
         input: &PurchaseScheduledInstancesRequest)
         -> Result<PurchaseScheduledInstancesResult, PurchaseScheduledInstancesError>;


    #[doc="<p>Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.</p> <p>If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.</p> <p>For more information about troubleshooting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html\">Getting Console Output and Rebooting Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn reboot_instances(&self, input: &RebootInstancesRequest) -> Result<(), RebootInstancesError>;


    #[doc="<p>Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html\">Creating Your Own AMIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <note> <p>For Amazon EBS-backed instances, <a>CreateImage</a> creates and registers the AMI in a single request, so you don't have to register the AMI yourself.</p> </note> <p>You can also use <code>RegisterImage</code> to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html\">Launching a Linux Instance from a Backup</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.</p> <p>Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure. To create an AMI that must retain billing codes, see <a>CreateImage</a>.</p> <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.</p>"]
    fn register_image(&self,
                      input: &RegisterImageRequest)
                      -> Result<RegisterImageResult, RegisterImageError>;


    #[doc="<p>Rejects a VPC peering connection request. The VPC peering connection must be in the <code>pending-acceptance</code> state. Use the <a>DescribeVpcPeeringConnections</a> request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use <a>DeleteVpcPeeringConnection</a>.</p>"]
    fn reject_vpc_peering_connection
        (&self,
         input: &RejectVpcPeeringConnectionRequest)
         -> Result<RejectVpcPeeringConnectionResult, RejectVpcPeeringConnectionError>;


    #[doc="<p>Releases the specified Elastic IP address.</p> <p>[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use <a>DisassociateAddress</a>.</p> <p>[Nondefault VPC] You must use <a>DisassociateAddress</a> to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (<code>InvalidIPAddress.InUse</code>).</p> <p>After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an <code>AuthFailure</code> error if the address is already allocated to another AWS account.</p> <p>[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see <a>AllocateAddress</a>.</p>"]
    fn release_address(&self, input: &ReleaseAddressRequest) -> Result<(), ReleaseAddressError>;


    #[doc="<p>When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand billing is stopped and the host goes into <code>released</code> state. The host ID of Dedicated Hosts that have been released can no longer be specified in another request, e.g., ModifyHosts. You must stop or terminate all instances on a host before it can be released.</p> <p>When Dedicated Hosts are released, it make take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated hosts. Try waiting a few minutes, and then try again.</p> <p>Released hosts will still appear in a <a>DescribeHosts</a> response.</p>"]
    fn release_hosts(&self,
                     input: &ReleaseHostsRequest)
                     -> Result<ReleaseHostsResult, ReleaseHostsError>;


    #[doc="<p>Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.</p> <p>Use <a>DescribeIamInstanceProfileAssociations</a> to get the association ID.</p>"]
    fn replace_iam_instance_profile_association
        (&self,
         input: &ReplaceIamInstanceProfileAssociationRequest)
         -> Result<ReplaceIamInstanceProfileAssociationResult,
                   ReplaceIamInstanceProfileAssociationError>;


    #[doc="<p>Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn replace_network_acl_association
        (&self,
         input: &ReplaceNetworkAclAssociationRequest)
         -> Result<ReplaceNetworkAclAssociationResult, ReplaceNetworkAclAssociationError>;


    #[doc="<p>Replaces an entry (rule) in a network ACL. For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn replace_network_acl_entry(&self,
                                 input: &ReplaceNetworkAclEntryRequest)
                                 -> Result<(), ReplaceNetworkAclEntryError>;


    #[doc="<p>Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn replace_route(&self, input: &ReplaceRouteRequest) -> Result<(), ReplaceRouteError>;


    #[doc="<p>Changes the route table associated with a given subnet in a VPC. After the operation completes, the subnet uses the routes in the new route table it's associated with. For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <p>You can also use ReplaceRouteTableAssociation to change which table is the main route table in the VPC. You just specify the main route table's association ID and the route table to be the new main route table.</p>"]
    fn replace_route_table_association
        (&self,
         input: &ReplaceRouteTableAssociationRequest)
         -> Result<ReplaceRouteTableAssociationResult, ReplaceRouteTableAssociationError>;


    #[doc="<p>Submits feedback about the status of an instance. The instance must be in the <code>running</code> state. If your experience with the instance differs from the instance status returned by <a>DescribeInstanceStatus</a>, use <a>ReportInstanceStatus</a> to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.</p> <p>Use of this action does not change the value returned by <a>DescribeInstanceStatus</a>.</p>"]
    fn report_instance_status(&self,
                              input: &ReportInstanceStatusRequest)
                              -> Result<(), ReportInstanceStatusError>;


    #[doc="<p>Creates a Spot fleet request.</p> <p>You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.</p> <p>By default, the Spot fleet requests Spot instances in the Spot pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.</p> <p>Alternatively, you can specify that the Spot fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot instances in your Spot fleet are in different Spot pools, you can improve the availability of your fleet.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html\">Spot Fleet Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn request_spot_fleet(&self,
                          input: &RequestSpotFleetRequest)
                          -> Result<RequestSpotFleetResponse, RequestSpotFleetError>;


    #[doc="<p>Creates a Spot instance request. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot Instance capacity and current Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html\">Spot Instance Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn request_spot_instances(&self,
                              input: &RequestSpotInstancesRequest)
                              -> Result<RequestSpotInstancesResult, RequestSpotInstancesError>;


    #[doc="<p>Resets an attribute of an AMI to its default value.</p> <note> <p>The productCodes attribute can't be reset.</p> </note>"]
    fn reset_image_attribute(&self,
                             input: &ResetImageAttributeRequest)
                             -> Result<(), ResetImageAttributeError>;


    #[doc="<p>Resets an attribute of an instance to its default value. To reset the <code>kernel</code> or <code>ramdisk</code>, the instance must be in a stopped state. To reset the <code>sourceDestCheck</code>, the instance can be either running or stopped.</p> <p>The <code>sourceDestCheck</code> attribute controls whether source/destination checking is enabled. The default value is <code>true</code>, which means checking is enabled. This value must be <code>false</code> for a NAT instance to perform NAT. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html\">NAT Instances</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn reset_instance_attribute(&self,
                                input: &ResetInstanceAttributeRequest)
                                -> Result<(), ResetInstanceAttributeError>;


    #[doc="<p>Resets a network interface attribute. You can specify only one attribute at a time.</p>"]
    fn reset_network_interface_attribute(&self,
                                         input: &ResetNetworkInterfaceAttributeRequest)
                                         -> Result<(), ResetNetworkInterfaceAttributeError>;


    #[doc="<p>Resets permission settings for the specified snapshot.</p> <p>For more information on modifying snapshot permissions, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html\">Sharing Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn reset_snapshot_attribute(&self,
                                input: &ResetSnapshotAttributeRequest)
                                -> Result<(), ResetSnapshotAttributeError>;


    #[doc="<p>Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.</p>"]
    fn restore_address_to_classic
        (&self,
         input: &RestoreAddressToClassicRequest)
         -> Result<RestoreAddressToClassicResult, RestoreAddressToClassicError>;


    #[doc="<p>[EC2-VPC only] Removes one or more egress rules from a security group for EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be revoked.</p> <p>Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.</p> <p>Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.</p>"]
    fn revoke_security_group_egress(&self,
                                    input: &RevokeSecurityGroupEgressRequest)
                                    -> Result<(), RevokeSecurityGroupEgressError>;


    #[doc="<p>Removes one or more ingress rules from a security group. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be removed.</p> <note> <p>[EC2-Classic security groups only] If the values you specify do not match the existing rule's values, no error is returned. Use <a>DescribeSecurityGroups</a> to verify that the rule has been removed.</p> </note> <p>Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.</p> <p>Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.</p>"]
    fn revoke_security_group_ingress(&self,
                                     input: &RevokeSecurityGroupIngressRequest)
                                     -> Result<(), RevokeSecurityGroupIngressError>;


    #[doc="<p>Launches the specified number of instances using an AMI for which you have permissions. </p> <p>You can specify a number of options, or leave the default options. The following rules apply:</p> <ul> <li> <p>[EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.</p> </li> <li> <p>[EC2-Classic] If don't specify an Availability Zone, we choose one for you.</p> </li> <li> <p>Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types\">Instance Types Available Only in a VPC</a>.</p> </li> <li> <p>[EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet.</p> </li> <li> <p>Not all instance types support IPv6 addresses. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html\">Instance Types</a>.</p> </li> <li> <p>If you don't specify a security group ID, we use the default security group. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html\">Security Groups</a>.</p> </li> <li> <p>If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.</p> </li> </ul> <p>To ensure faster instance launches, break up large requests into smaller batches. For example, create 5 separate launch requests for 100 instances each instead of 1 launch request for 500 instances.</p> <p>An instance is ready for you to use when it's in the <code>running</code> state. You can check the state of your instance using <a>DescribeInstances</a>. You can tag instances and EBS volumes during launch, after launch, or both. For more information, see <a>CreateTags</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Amazon EC2 Resources</a>.</p> <p>Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>For troubleshooting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html\">What To Do If An Instance Immediately Terminates</a>, and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html\">Troubleshooting Connecting to Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn run_instances(&self, input: &RunInstancesRequest) -> Result<Reservation, RunInstancesError>;


    #[doc="<p>Launches the specified Scheduled Instances.</p> <p>Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using <a>PurchaseScheduledInstances</a>.</p> <p>You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html\">Scheduled Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn run_scheduled_instances
        (&self,
         input: &RunScheduledInstancesRequest)
         -> Result<RunScheduledInstancesResult, RunScheduledInstancesError>;


    #[doc="<p>Starts an Amazon EBS-backed AMI that you've previously stopped.</p> <p>Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.</p> <p>Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.</p> <p>Performing this operation on an instance that uses an instance store as its root device returns an error.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html\">Stopping Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn start_instances(&self,
                       input: &StartInstancesRequest)
                       -> Result<StartInstancesResult, StartInstancesError>;


    #[doc="<p>Stops an Amazon EBS-backed instance.</p> <p>We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.</p> <p>You can't start or stop Spot instances, and you can't stop instance store-backed instances.</p> <p>When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.</p> <p>Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html\">Instance Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html\">Troubleshooting Stopping Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn stop_instances(&self,
                      input: &StopInstancesRequest)
                      -> Result<StopInstancesResult, StopInstancesError>;


    #[doc="<p>Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. </p> <p>If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.</p> <p>Terminated instances remain visible after termination (for approximately one hour).</p> <p>By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.</p> <p>You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the <code>DeleteOnTermination</code> block device mapping parameter set to <code>true</code> are automatically deleted. For more information about the differences between stopping and terminating instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html\">Instance Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>For more information about troubleshooting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html\">Troubleshooting Terminating Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn terminate_instances(&self,
                           input: &TerminateInstancesRequest)
                           -> Result<TerminateInstancesResult, TerminateInstancesError>;


    #[doc="<p>Unassigns one or more IPv6 addresses from a network interface.</p>"]
    fn unassign_ipv_6_addresses
        (&self,
         input: &UnassignIpv6AddressesRequest)
         -> Result<UnassignIpv6AddressesResult, UnassignIpv6AddressesError>;


    #[doc="<p>Unassigns one or more secondary private IP addresses from a network interface.</p>"]
    fn unassign_private_ip_addresses(&self,
                                     input: &UnassignPrivateIpAddressesRequest)
                                     -> Result<(), UnassignPrivateIpAddressesError>;


    #[doc="<p>Disables detailed monitoring for a running instance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html\">Monitoring Your Instances and Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn unmonitor_instances(&self,
                           input: &UnmonitorInstancesRequest)
                           -> Result<UnmonitorInstancesResult, UnmonitorInstancesError>;
}
/// A client for the Amazon EC2 API.
pub struct Ec2Client<P, D>
    where P: ProvideAwsCredentials,
          D: DispatchSignedRequest
{
    credentials_provider: P,
    region: region::Region,
    dispatcher: D,
}

impl<P, D> Ec2Client<P, D>
    where P: ProvideAwsCredentials,
          D: DispatchSignedRequest
{
    pub fn new(request_dispatcher: D, credentials_provider: P, region: region::Region) -> Self {
        Ec2Client {
            credentials_provider: credentials_provider,
            region: region,
            dispatcher: request_dispatcher,
        }
    }
}

impl<P, D> Ec2 for Ec2Client<P, D>
    where P: ProvideAwsCredentials,
          D: DispatchSignedRequest
{
    #[doc="<p>Accepts the Convertible Reserved Instance exchange quote described in the <a>GetReservedInstancesExchangeQuote</a> call.</p>"]
    fn accept_reserved_instances_exchange_quote
        (&self,
         input: &AcceptReservedInstancesExchangeQuoteRequest)
         -> Result<AcceptReservedInstancesExchangeQuoteResult,
                   AcceptReservedInstancesExchangeQuoteError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AcceptReservedInstancesExchangeQuote");
        params.put("Version", "2016-11-15");
        AcceptReservedInstancesExchangeQuoteRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AcceptReservedInstancesExchangeQuoteResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AcceptReservedInstancesExchangeQuoteResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AcceptReservedInstancesExchangeQuoteError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the <code>pending-acceptance</code> state, and you must be the owner of the peer VPC. Use <a>DescribeVpcPeeringConnections</a> to view your outstanding VPC peering connection requests.</p>"]
    fn accept_vpc_peering_connection
        (&self,
         input: &AcceptVpcPeeringConnectionRequest)
         -> Result<AcceptVpcPeeringConnectionResult, AcceptVpcPeeringConnectionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AcceptVpcPeeringConnection");
        params.put("Version", "2016-11-15");
        AcceptVpcPeeringConnectionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AcceptVpcPeeringConnectionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AcceptVpcPeeringConnectionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AcceptVpcPeeringConnectionError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Allocates an Elastic IP address.</p> <p>An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic per region and 5 Elastic IP addresses for EC2-VPC per region.</p> <p>If you release an Elastic IP address for use in a VPC, you might be able to recover it. To recover an Elastic IP address that you released, specify it in the <code>Address</code> parameter. Note that you cannot recover an Elastic IP address that you released after it is allocated to another AWS account.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn allocate_address(&self,
                        input: &AllocateAddressRequest)
                        -> Result<AllocateAddressResult, AllocateAddressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AllocateAddress");
        params.put("Version", "2016-11-15");
        AllocateAddressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AllocateAddressResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AllocateAddressResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AllocateAddressError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Allocates a Dedicated Host to your account. At minimum you need to specify the instance size type, Availability Zone, and quantity of hosts you want to allocate.</p>"]
    fn allocate_hosts(&self,
                      input: &AllocateHostsRequest)
                      -> Result<AllocateHostsResult, AllocateHostsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AllocateHosts");
        params.put("Version", "2016-11-15");
        AllocateHostsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AllocateHostsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AllocateHostsResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AllocateHostsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI\">IP Addresses Per Network Interface Per Instance Type</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn assign_ipv_6_addresses(&self,
                              input: &AssignIpv6AddressesRequest)
                              -> Result<AssignIpv6AddressesResult, AssignIpv6AddressesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssignIpv6Addresses");
        params.put("Version", "2016-11-15");
        AssignIpv6AddressesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AssignIpv6AddressesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(AssignIpv6AddressesResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssignIpv6AddressesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html\">Instance Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about Elastic IP addresses, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>AssignPrivateIpAddresses is available only in EC2-VPC.</p>"]
    fn assign_private_ip_addresses(&self,
                                   input: &AssignPrivateIpAddressesRequest)
                                   -> Result<(), AssignPrivateIpAddressesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssignPrivateIpAddresses");
        params.put("Version", "2016-11-15");
        AssignPrivateIpAddressesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssignPrivateIpAddressesError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Associates an Elastic IP address with an instance or a network interface.</p> <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.</p> <p>[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.</p> <important> <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the <i>Elastic IP Addresses</i> section of <a href=\"http://aws.amazon.com/ec2/pricing/\">Amazon EC2 Pricing</a>.</p> </important>"]
    fn associate_address(&self,
                         input: &AssociateAddressRequest)
                         -> Result<AssociateAddressResult, AssociateAddressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssociateAddress");
        params.put("Version", "2016-11-15");
        AssociateAddressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AssociateAddressResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(AssociateAddressResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssociateAddressError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.</p> <p>After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn associate_dhcp_options(&self,
                              input: &AssociateDhcpOptionsRequest)
                              -> Result<(), AssociateDhcpOptionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssociateDhcpOptions");
        params.put("Version", "2016-11-15");
        AssociateDhcpOptionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssociateDhcpOptionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.</p>"]
    fn associate_iam_instance_profile
        (&self,
         input: &AssociateIamInstanceProfileRequest)
         -> Result<AssociateIamInstanceProfileResult, AssociateIamInstanceProfileError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssociateIamInstanceProfile");
        params.put("Version", "2016-11-15");
        AssociateIamInstanceProfileRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AssociateIamInstanceProfileResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AssociateIamInstanceProfileResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssociateIamInstanceProfileError::from_body(String::from_utf8_lossy(&body)
                                                                    .as_ref()))
            }
        }
    }


    #[doc="<p>Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn associate_route_table(&self,
                             input: &AssociateRouteTableRequest)
                             -> Result<AssociateRouteTableResult, AssociateRouteTableError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssociateRouteTable");
        params.put("Version", "2016-11-15");
        AssociateRouteTableRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AssociateRouteTableResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(AssociateRouteTableResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssociateRouteTableError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.</p>"]
    fn associate_subnet_cidr_block
        (&self,
         input: &AssociateSubnetCidrBlockRequest)
         -> Result<AssociateSubnetCidrBlockResult, AssociateSubnetCidrBlockError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssociateSubnetCidrBlock");
        params.put("Version", "2016-11-15");
        AssociateSubnetCidrBlockRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AssociateSubnetCidrBlockResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AssociateSubnetCidrBlockResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssociateSubnetCidrBlockError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Associates a CIDR block with your VPC. You can only associate a single Amazon-provided IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.</p>"]
    fn associate_vpc_cidr_block
        (&self,
         input: &AssociateVpcCidrBlockRequest)
         -> Result<AssociateVpcCidrBlockResult, AssociateVpcCidrBlockError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AssociateVpcCidrBlock");
        params.put("Version", "2016-11-15");
        AssociateVpcCidrBlockRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AssociateVpcCidrBlockResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AssociateVpcCidrBlockResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AssociateVpcCidrBlockError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the <code>running</code> state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.</p> <p>After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.</p> <p>Linking your instance to a VPC is sometimes referred to as <i>attaching</i> your instance.</p>"]
    fn attach_classic_link_vpc(&self,
                               input: &AttachClassicLinkVpcRequest)
                               -> Result<AttachClassicLinkVpcResult, AttachClassicLinkVpcError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AttachClassicLinkVpc");
        params.put("Version", "2016-11-15");
        AttachClassicLinkVpcRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AttachClassicLinkVpcResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(AttachClassicLinkVpcResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AttachClassicLinkVpcError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/\">Amazon Virtual Private Cloud User Guide</a>.</p>"]
    fn attach_internet_gateway(&self,
                               input: &AttachInternetGatewayRequest)
                               -> Result<(), AttachInternetGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AttachInternetGateway");
        params.put("Version", "2016-11-15");
        AttachInternetGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AttachInternetGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Attaches a network interface to an instance.</p>"]
    fn attach_network_interface
        (&self,
         input: &AttachNetworkInterfaceRequest)
         -> Result<AttachNetworkInterfaceResult, AttachNetworkInterfaceError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AttachNetworkInterface");
        params.put("Version", "2016-11-15");
        AttachNetworkInterfaceRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AttachNetworkInterfaceResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(AttachNetworkInterfaceResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AttachNetworkInterfaceError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.</p> <p>Encrypted EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>For a list of supported device names, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html\">Attaching an EBS Volume to an Instance</a>. Any device names that aren't reserved for instance store volumes can be used for EBS volumes. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html\">Amazon EC2 Instance Store</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>If a volume has an AWS Marketplace product code:</p> <ul> <li> <p>The volume can be attached only to a stopped instance.</p> </li> <li> <p>AWS Marketplace product codes are copied from the volume to the instance.</p> </li> <li> <p>You must be subscribed to the product.</p> </li> <li> <p>The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.</p> </li> </ul> <p>For an overview of the AWS Marketplace, see <a href=\"https://aws.amazon.com/marketplace/help/200900000\">Introducing AWS Marketplace</a>.</p> <p>For more information about EBS volumes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html\">Attaching Amazon EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn attach_volume(&self,
                     input: &AttachVolumeRequest)
                     -> Result<VolumeAttachment, AttachVolumeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AttachVolume");
        params.put("Version", "2016-11-15");
        AttachVolumeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = VolumeAttachment::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(VolumeAttachmentDeserializer::deserialize(&actual_tag_name,
                                                                            &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AttachVolumeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn attach_vpn_gateway(&self,
                          input: &AttachVpnGatewayRequest)
                          -> Result<AttachVpnGatewayResult, AttachVpnGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AttachVpnGateway");
        params.put("Version", "2016-11-15");
        AttachVpnGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = AttachVpnGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(AttachVpnGatewayResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AttachVpnGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>[EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html\">Security Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>. For more information about security group limits, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html\">Amazon VPC Limits</a>.</p> <p>Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.</p> <p>Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.</p>"]
    fn authorize_security_group_egress(&self,
                                       input: &AuthorizeSecurityGroupEgressRequest)
                                       -> Result<(), AuthorizeSecurityGroupEgressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AuthorizeSecurityGroupEgress");
        params.put("Version", "2016-11-15");
        AuthorizeSecurityGroupEgressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AuthorizeSecurityGroupEgressError::from_body(String::from_utf8_lossy(&body)
                                                                     .as_ref()))
            }
        }
    }


    #[doc="<p>Adds one or more ingress rules to a security group.</p> <p>Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.</p> <p>[EC2-Classic] This action gives one or more IPv4 CIDR address ranges permission to access a security group in your account, or gives one or more security groups (called the <i>source groups</i>) permission to access a security group for your account. A source group can be for your own AWS account, or another. You can have up to 100 rules per group.</p> <p>[EC2-VPC] This action gives one or more IPv4 or IPv6 CIDR address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the <i>source groups</i>) permission to access a security group for your VPC. The security groups must all be for the same VPC or a peer VPC in a VPC peering connection. For more information about VPC security group limits, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html\">Amazon VPC Limits</a>.</p>"]
    fn authorize_security_group_ingress(&self,
                                        input: &AuthorizeSecurityGroupIngressRequest)
                                        -> Result<(), AuthorizeSecurityGroupIngressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "AuthorizeSecurityGroupIngress");
        params.put("Version", "2016-11-15");
        AuthorizeSecurityGroupIngressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(AuthorizeSecurityGroupIngressError::from_body(String::from_utf8_lossy(&body)
                                                                      .as_ref()))
            }
        }
    }


    #[doc="<p>Bundles an Amazon instance store-backed Windows instance.</p> <p>During bundling, only the root device volume (C:\\) is bundled. Data on other instance store volumes is not preserved.</p> <note> <p>This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.</p> </note> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html\">Creating an Instance Store-Backed Windows AMI</a>.</p>"]
    fn bundle_instance(&self,
                       input: &BundleInstanceRequest)
                       -> Result<BundleInstanceResult, BundleInstanceError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "BundleInstance");
        params.put("Version", "2016-11-15");
        BundleInstanceRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = BundleInstanceResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(BundleInstanceResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(BundleInstanceError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Cancels a bundling operation for an instance store-backed Windows instance.</p>"]
    fn cancel_bundle_task(&self,
                          input: &CancelBundleTaskRequest)
                          -> Result<CancelBundleTaskResult, CancelBundleTaskError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CancelBundleTask");
        params.put("Version", "2016-11-15");
        CancelBundleTaskRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CancelBundleTaskResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CancelBundleTaskResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CancelBundleTaskError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html\">Importing a Virtual Machine Using the Amazon EC2 CLI</a>.</p>"]
    fn cancel_conversion_task(&self,
                              input: &CancelConversionRequest)
                              -> Result<(), CancelConversionTaskError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CancelConversionTask");
        params.put("Version", "2016-11-15");
        CancelConversionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CancelConversionTaskError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.</p>"]
    fn cancel_export_task(&self,
                          input: &CancelExportTaskRequest)
                          -> Result<(), CancelExportTaskError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CancelExportTask");
        params.put("Version", "2016-11-15");
        CancelExportTaskRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CancelExportTaskError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Cancels an in-process import virtual machine or import snapshot task.</p>"]
    fn cancel_import_task(&self,
                          input: &CancelImportTaskRequest)
                          -> Result<CancelImportTaskResult, CancelImportTaskError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CancelImportTask");
        params.put("Version", "2016-11-15");
        CancelImportTaskRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CancelImportTaskResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CancelImportTaskResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CancelImportTaskError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn cancel_reserved_instances_listing
        (&self,
         input: &CancelReservedInstancesListingRequest)
         -> Result<CancelReservedInstancesListingResult, CancelReservedInstancesListingError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CancelReservedInstancesListing");
        params.put("Version", "2016-11-15");
        CancelReservedInstancesListingRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CancelReservedInstancesListingResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CancelReservedInstancesListingResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CancelReservedInstancesListingError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Cancels the specified Spot fleet requests.</p> <p>After you cancel a Spot fleet request, the Spot fleet launches no new Spot instances. You must specify whether the Spot fleet should also terminate its Spot instances. If you terminate the instances, the Spot fleet request enters the <code>cancelled_terminating</code> state. Otherwise, the Spot fleet request enters the <code>cancelled_running</code> state and the instances continue to run until they are interrupted or you terminate them manually.</p>"]
    fn cancel_spot_fleet_requests
        (&self,
         input: &CancelSpotFleetRequestsRequest)
         -> Result<CancelSpotFleetRequestsResponse, EC2CancelSpotFleetRequestsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CancelSpotFleetRequests");
        params.put("Version", "2016-11-15");
        CancelSpotFleetRequestsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CancelSpotFleetRequestsResponse::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CancelSpotFleetRequestsResponseDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(EC2CancelSpotFleetRequestsError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Cancels one or more Spot instance requests. Spot instances are instances that Amazon EC2 starts on your behalf when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html\">Spot Instance Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <important> <p>Canceling a Spot instance request does not terminate running Spot instances associated with the request.</p> </important>"]
    fn cancel_spot_instance_requests
        (&self,
         input: &CancelSpotInstanceRequestsRequest)
         -> Result<CancelSpotInstanceRequestsResult, CancelSpotInstanceRequestsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CancelSpotInstanceRequests");
        params.put("Version", "2016-11-15");
        CancelSpotInstanceRequestsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CancelSpotInstanceRequestsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CancelSpotInstanceRequestsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CancelSpotInstanceRequestsError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner needs to verify whether another user's instance is eligible for support.</p>"]
    fn confirm_product_instance
        (&self,
         input: &ConfirmProductInstanceRequest)
         -> Result<ConfirmProductInstanceResult, ConfirmProductInstanceError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ConfirmProductInstance");
        params.put("Version", "2016-11-15");
        ConfirmProductInstanceRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ConfirmProductInstanceResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ConfirmProductInstanceResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ConfirmProductInstanceError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Initiates the copy of an AMI from the specified source region to the current region. You specify the destination region by using its endpoint when making the request.</p> <p>For more information about the prerequisites and limits when copying an AMI, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html\">Copying an AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn copy_image(&self, input: &CopyImageRequest) -> Result<CopyImageResult, CopyImageError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CopyImage");
        params.put("Version", "2016-11-15");
        CopyImageRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CopyImageResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CopyImageResultDeserializer::deserialize(&actual_tag_name,
                                                                           &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CopyImageError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to.</p> <p>Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless the <code>Encrypted</code> flag is specified during the snapshot copy operation. By default, encrypted snapshot copies use the default AWS Key Management Service (AWS KMS) customer master key (CMK); however, you can specify a non-default CMK with the <code>KmsKeyId</code> parameter. </p> <note> <p>To copy an encrypted snapshot that has been shared from another account, you must have permissions for the CMK used to encrypt the snapshot.</p> </note> <note> <p>Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.</p> </note> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html\">Copying an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn copy_snapshot(&self,
                     input: &CopySnapshotRequest)
                     -> Result<CopySnapshotResult, CopySnapshotError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CopySnapshot");
        params.put("Version", "2016-11-15");
        CopySnapshotRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CopySnapshotResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CopySnapshotResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CopySnapshotError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Provides information to AWS about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the AWS side of the VPN connection is the virtual private gateway.) You must provide the Internet-routable IP address of the customer gateway's external interface. The IP address must be static and may be behind a device performing network address translation (NAT).</p> <p>For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534 range).</p> <note> <p>Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception of 7224, which is reserved in the <code>us-east-1</code> region, and 9059, which is reserved in the <code>eu-west-1</code> region.</p> </note> <p>For more information about VPN customer gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <important> <p>You cannot create more than one customer gateway with the same VPN type, IP address, and BGP ASN parameter values. If you run an identical request more than one time, the first request creates the customer gateway, and subsequent requests return information about the existing customer gateway. The subsequent requests do not create new customer gateway resources.</p> </important>"]
    fn create_customer_gateway
        (&self,
         input: &CreateCustomerGatewayRequest)
         -> Result<CreateCustomerGatewayResult, CreateCustomerGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateCustomerGateway");
        params.put("Version", "2016-11-15");
        CreateCustomerGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateCustomerGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateCustomerGatewayResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateCustomerGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a default VPC with a size <code>/16</code> IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html\">Default VPC and Default Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>. You cannot specify the components of the default VPC yourself.</p> <p>You can create a default VPC if you deleted your previous default VPC. You cannot have more than one default VPC per region. </p> <p>If your account supports EC2-Classic, you cannot use this action to create a default VPC in a region that supports EC2-Classic. If you want a default VPC in a region that supports EC2-Classic, see \"I really want a default VPC for my existing EC2 account. Is that possible?\" in the <a href=\"http://aws.amazon.com/vpc/faqs/#Default_VPCs\">Default VPCs FAQ</a>.</p>"]
    fn create_default_vpc(&self,
                          input: &CreateDefaultVpcRequest)
                          -> Result<CreateDefaultVpcResult, CreateDefaultVpcError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateDefaultVpc");
        params.put("Version", "2016-11-15");
        CreateDefaultVpcRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateDefaultVpcResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateDefaultVpcResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateDefaultVpcError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see <a href=\"http://www.ietf.org/rfc/rfc2132.txt\">RFC 2132</a>.</p> <ul> <li> <p> <code>domain-name-servers</code> - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. If you want your instance to receive a custom DNS hostname as specified in <code>domain-name</code>, you must set <code>domain-name-servers</code> to a custom DNS server.</p> </li> <li> <p> <code>domain-name</code> - If you're using AmazonProvidedDNS in <code>us-east-1</code>, specify <code>ec2.internal</code>. If you're using AmazonProvidedDNS in another region, specify <code>region.compute.internal</code> (for example, <code>ap-northeast-1.compute.internal</code>). Otherwise, specify a domain name (for example, <code>MyCompany.com</code>). This value is used to complete unqualified DNS hostnames. <b>Important</b>: Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.</p> </li> <li> <p> <code>ntp-servers</code> - The IP addresses of up to four Network Time Protocol (NTP) servers.</p> </li> <li> <p> <code>netbios-name-servers</code> - The IP addresses of up to four NetBIOS name servers.</p> </li> <li> <p> <code>netbios-node-type</code> - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see <a href=\"http://www.ietf.org/rfc/rfc2132.txt\">RFC 2132</a>.</p> </li> </ul> <p>Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an Internet gateway, make sure to set the <code>domain-name-servers</code> option either to <code>AmazonProvidedDNS</code> or to a domain name server of your choice. For more information about DHCP options, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_dhcp_options(&self,
                           input: &CreateDhcpOptionsRequest)
                           -> Result<CreateDhcpOptionsResult, CreateDhcpOptionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateDhcpOptions");
        params.put("Version", "2016-11-15");
        CreateDhcpOptionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateDhcpOptionsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateDhcpOptionsResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateDhcpOptionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>[IPv6 only] Creates an egress-only Internet gateway for your VPC. An egress-only Internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the Internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.</p>"]
    fn create_egress_only_internet_gateway
        (&self,
         input: &CreateEgressOnlyInternetGatewayRequest)
         -> Result<CreateEgressOnlyInternetGatewayResult, CreateEgressOnlyInternetGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateEgressOnlyInternetGateway");
        params.put("Version", "2016-11-15");
        CreateEgressOnlyInternetGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateEgressOnlyInternetGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateEgressOnlyInternetGatewayResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateEgressOnlyInternetGatewayError::from_body(String::from_utf8_lossy(&body)
                                                                        .as_ref()))
            }
        }
    }


    #[doc="<p>Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log streams can include information about accepted and rejected traffic to a network interface. You can view the data in your log streams using Amazon CloudWatch Logs.</p> <p>In your request, you must also specify an IAM role that has permission to publish logs to CloudWatch Logs.</p>"]
    fn create_flow_logs(&self,
                        input: &CreateFlowLogsRequest)
                        -> Result<CreateFlowLogsResult, CreateFlowLogsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateFlowLogs");
        params.put("Version", "2016-11-15");
        CreateFlowLogsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateFlowLogsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateFlowLogsResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateFlowLogsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).</p> <p>The create operation is asynchronous. To verify that the AFI is ready for use, check the output logs.</p> <p>An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on one or more FPGA-accelerated instances. For more information, see the <a href=\"https://github.com/aws/aws-fpga/\">AWS FPGA Hardware Development Kit</a>.</p>"]
    fn create_fpga_image(&self,
                         input: &CreateFpgaImageRequest)
                         -> Result<CreateFpgaImageResult, CreateFpgaImageError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateFpgaImage");
        params.put("Version", "2016-11-15");
        CreateFpgaImageRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateFpgaImageResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateFpgaImageResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateFpgaImageError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.</p> <p>If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html\">Creating Amazon EBS-Backed Linux AMIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_image(&self,
                    input: &CreateImageRequest)
                    -> Result<CreateImageResult, CreateImageError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateImage");
        params.put("Version", "2016-11-15");
        CreateImageRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateImageResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateImageResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateImageError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Exports a running or stopped instance to an S3 bucket.</p> <p>For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html\">Exporting an Instance as a VM Using VM Import/Export</a> in the <i>VM Import/Export User Guide</i>.</p>"]
    fn create_instance_export_task
        (&self,
         input: &CreateInstanceExportTaskRequest)
         -> Result<CreateInstanceExportTaskResult, CreateInstanceExportTaskError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateInstanceExportTask");
        params.put("Version", "2016-11-15");
        CreateInstanceExportTaskRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateInstanceExportTaskResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateInstanceExportTaskResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateInstanceExportTaskError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Creates an Internet gateway for use with a VPC. After creating the Internet gateway, you attach it to a VPC using <a>AttachInternetGateway</a>.</p> <p>For more information about your VPC and Internet gateway, see the <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/\">Amazon Virtual Private Cloud User Guide</a>.</p>"]
    fn create_internet_gateway
        (&self,
         input: &CreateInternetGatewayRequest)
         -> Result<CreateInternetGatewayResult, CreateInternetGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateInternetGateway");
        params.put("Version", "2016-11-15");
        CreateInternetGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateInternetGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateInternetGatewayResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateInternetGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.</p> <p>You can have up to five thousand key pairs per region.</p> <p>The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use <a>ImportKeyPair</a>.</p> <p>For more information about key pairs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_key_pair(&self, input: &CreateKeyPairRequest) -> Result<KeyPair, CreateKeyPairError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateKeyPair");
        params.put("Version", "2016-11-15");
        CreateKeyPairRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = KeyPair::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(KeyPairDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateKeyPairError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a NAT gateway in the specified subnet. A NAT gateway can be used to enable instances in a private subnet to connect to the Internet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html\">NAT Gateways</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_nat_gateway(&self,
                          input: &CreateNatGatewayRequest)
                          -> Result<CreateNatGatewayResult, CreateNatGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateNatGateway");
        params.put("Version", "2016-11-15");
        CreateNatGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateNatGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateNatGatewayResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateNatGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.</p> <p>For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_network_acl(&self,
                          input: &CreateNetworkAclRequest)
                          -> Result<CreateNetworkAclResult, CreateNetworkAclError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateNetworkAcl");
        params.put("Version", "2016-11-15");
        CreateNetworkAclRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateNetworkAclResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateNetworkAclResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateNetworkAclError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.</p> <p>We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.</p> <p>After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.</p> <p>For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_network_acl_entry(&self,
                                input: &CreateNetworkAclEntryRequest)
                                -> Result<(), CreateNetworkAclEntryError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateNetworkAclEntry");
        params.put("Version", "2016-11-15");
        CreateNetworkAclEntryRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateNetworkAclEntryError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a network interface in the specified subnet.</p> <p>For more information about network interfaces, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html\">Elastic Network Interfaces</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_network_interface
        (&self,
         input: &CreateNetworkInterfaceRequest)
         -> Result<CreateNetworkInterfaceResult, CreateNetworkInterfaceError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateNetworkInterface");
        params.put("Version", "2016-11-15");
        CreateNetworkInterfaceRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateNetworkInterfaceResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateNetworkInterfaceResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateNetworkInterfaceError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Grants an AWS authorized partner account permission to attach the specified network interface to an instance in their account.</p> <p>You can grant permission to a single AWS account only, and only one account at a time.</p>"]
    fn create_network_interface_permission
        (&self,
         input: &CreateNetworkInterfacePermissionRequest)
         -> Result<CreateNetworkInterfacePermissionResult, CreateNetworkInterfacePermissionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateNetworkInterfacePermission");
        params.put("Version", "2016-11-15");
        CreateNetworkInterfacePermissionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateNetworkInterfacePermissionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateNetworkInterfacePermissionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateNetworkInterfacePermissionError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a placement group that you launch cluster instances into. You must give the group a name that's unique within the scope of your account.</p> <p>For more information about placement groups and cluster instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html\">Cluster Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_placement_group(&self,
                              input: &CreatePlacementGroupRequest)
                              -> Result<(), CreatePlacementGroupError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreatePlacementGroup");
        params.put("Version", "2016-11-15");
        CreatePlacementGroupRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreatePlacementGroupError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the <a>DescribeReservedInstances</a> operation.</p> <note> <p>Only Standard Reserved Instances with a capacity reservation can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances and Standard Reserved Instances with a regional benefit cannot be sold.</p> </note> <p>The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.</p> <p>To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the <a>DescribeReservedInstancesListings</a> operation.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_reserved_instances_listing
        (&self,
         input: &CreateReservedInstancesListingRequest)
         -> Result<CreateReservedInstancesListingResult, CreateReservedInstancesListingError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateReservedInstancesListing");
        params.put("Version", "2016-11-15");
        CreateReservedInstancesListingRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateReservedInstancesListingResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateReservedInstancesListingResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateReservedInstancesListingError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Creates a route in a route table within a VPC.</p> <p>You must specify one of the following targets: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.</p> <p>When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address <code>192.0.2.3</code>, and the route table includes the following two IPv4 routes:</p> <ul> <li> <p> <code>192.0.2.0/24</code> (goes to some target A)</p> </li> <li> <p> <code>192.0.2.0/28</code> (goes to some target B)</p> </li> </ul> <p>Both routes apply to the traffic destined for <code>192.0.2.3</code>. However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_route(&self,
                    input: &CreateRouteRequest)
                    -> Result<CreateRouteResult, CreateRouteError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateRoute");
        params.put("Version", "2016-11-15");
        CreateRouteRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateRouteResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateRouteResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateRouteError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_route_table(&self,
                          input: &CreateRouteTableRequest)
                          -> Result<CreateRouteTableResult, CreateRouteTableError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateRouteTable");
        params.put("Version", "2016-11-15");
        CreateRouteTableRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateRouteTableResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateRouteTableResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateRouteTableError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a security group.</p> <p>A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html\">Amazon EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html\">Security Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <important> <p>EC2-Classic: You can have up to 500 security groups.</p> <p>EC2-VPC: You can create up to 500 security groups per VPC.</p> </important> <p>When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.</p> <p>You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.</p> <p>You can add or remove rules from your security groups using <a>AuthorizeSecurityGroupIngress</a>, <a>AuthorizeSecurityGroupEgress</a>, <a>RevokeSecurityGroupIngress</a>, and <a>RevokeSecurityGroupEgress</a>.</p>"]
    fn create_security_group(&self,
                             input: &CreateSecurityGroupRequest)
                             -> Result<CreateSecurityGroupResult, CreateSecurityGroupError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateSecurityGroup");
        params.put("Version", "2016-11-15");
        CreateSecurityGroupRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateSecurityGroupResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateSecurityGroupResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateSecurityGroupError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.</p> <p>When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.</p> <p>You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is <code>pending</code>.</p> <p>To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.</p> <p>Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html\">Amazon Elastic Block Store</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_snapshot(&self,
                       input: &CreateSnapshotRequest)
                       -> Result<Snapshot, CreateSnapshotError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateSnapshot");
        params.put("Version", "2016-11-15");
        CreateSnapshotRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = Snapshot::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(SnapshotDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateSnapshotError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a data feed for Spot instances, enabling you to view Spot instance usage logs. You can create one data feed per AWS account. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html\">Spot Instance Data Feed</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_spot_datafeed_subscription
        (&self,
         input: &CreateSpotDatafeedSubscriptionRequest)
         -> Result<CreateSpotDatafeedSubscriptionResult, CreateSpotDatafeedSubscriptionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateSpotDatafeedSubscription");
        params.put("Version", "2016-11-15");
        CreateSpotDatafeedSubscriptionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateSpotDatafeedSubscriptionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateSpotDatafeedSubscriptionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateSpotDatafeedSubscriptionError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Creates a subnet in an existing VPC.</p> <p>When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's IPv4 CIDR block can be the same as the VPC's IPv4 CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's IPv4 CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses).</p> <p>If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length. </p> <important> <p>AWS reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.</p> </important> <p>If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.</p> <p>If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address doesn't change if you stop and restart the instance (unlike a similar instance launched outside a VPC, which gets a new IP address when restarted). It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.</p> <p>For more information about subnets, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html\">Your VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_subnet(&self,
                     input: &CreateSubnetRequest)
                     -> Result<CreateSubnetResult, CreateSubnetError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateSubnet");
        params.put("Version", "2016-11-15");
        CreateSubnetRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateSubnetResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateSubnetResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateSubnetError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Adds or overwrites one or more tags for the specified Amazon EC2 resource or resources. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.</p> <p>For more information about tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about creating IAM policies that control users' access to resources based on tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html\">Supported Resource-Level Permissions for Amazon EC2 API Actions</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_tags(&self, input: &CreateTagsRequest) -> Result<(), CreateTagsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateTags");
        params.put("Version", "2016-11-15");
        CreateTagsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateTagsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see <a href=\"http://docs.aws.amazon.com/general/latest/gr/rande.html\">Regions and Endpoints</a>.</p> <p>You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.</p> <p>You can create encrypted volumes with the <code>Encrypted</code> parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html\">Amazon EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>You can tag your volumes during creation. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Amazon EC2 Resources</a>.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html\">Creating an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_volume(&self, input: &CreateVolumeRequest) -> Result<Volume, CreateVolumeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateVolume");
        params.put("Version", "2016-11-15");
        CreateVolumeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = Volume::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(VolumeDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateVolumeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). To help you decide how big to make your VPC, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html\">Your VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <p>You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. The IPv6 CIDR block uses a /56 prefix length, and is allocated from Amazon's pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC.</p> <p>By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <p>You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html\">Dedicated Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn create_vpc(&self, input: &CreateVpcRequest) -> Result<CreateVpcResult, CreateVpcError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateVpc");
        params.put("Version", "2016-11-15");
        CreateVpcRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateVpcResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateVpcResultDeserializer::deserialize(&actual_tag_name,
                                                                           &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateVpcError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a VPC endpoint for a specified AWS service. An endpoint enables you to create a private connection between your VPC and another AWS service in your account. You can specify an endpoint policy to attach to the endpoint that will control access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.</p> <p>Use <a>DescribeVpcEndpointServices</a> to get a list of supported AWS services.</p>"]
    fn create_vpc_endpoint(&self,
                           input: &CreateVpcEndpointRequest)
                           -> Result<CreateVpcEndpointResult, CreateVpcEndpointError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateVpcEndpoint");
        params.put("Version", "2016-11-15");
        CreateVpcEndpointRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateVpcEndpointResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateVpcEndpointResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateVpcEndpointError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.</p> <p>The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.</p> <p>If you try to create a VPC peering connection between VPCs that have overlapping CIDR blocks, the VPC peering connection status goes to <code>failed</code>.</p>"]
    fn create_vpc_peering_connection
        (&self,
         input: &CreateVpcPeeringConnectionRequest)
         -> Result<CreateVpcPeeringConnectionResult, CreateVpcPeeringConnectionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateVpcPeeringConnection");
        params.put("Version", "2016-11-15");
        CreateVpcPeeringConnectionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateVpcPeeringConnectionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(CreateVpcPeeringConnectionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateVpcPeeringConnectionError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is <code>ipsec.1</code>.</p> <p>The response includes information that you need to give to your network administrator to configure your customer gateway.</p> <important> <p>We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway.</p> </important> <p>If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.</p> <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.</p> <p>For more information about VPN connections, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_vpn_connection(&self,
                             input: &CreateVpnConnectionRequest)
                             -> Result<CreateVpnConnectionResult, CreateVpnConnectionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateVpnConnection");
        params.put("Version", "2016-11-15");
        CreateVpnConnectionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateVpnConnectionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateVpnConnectionResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateVpnConnectionError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.</p> <p>For more information about VPN connections, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_vpn_connection_route(&self,
                                   input: &CreateVpnConnectionRouteRequest)
                                   -> Result<(), CreateVpnConnectionRouteError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateVpnConnectionRoute");
        params.put("Version", "2016-11-15");
        CreateVpnConnectionRouteRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateVpnConnectionRouteError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.</p> <p>For more information about virtual private gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn create_vpn_gateway(&self,
                          input: &CreateVpnGatewayRequest)
                          -> Result<CreateVpnGatewayResult, CreateVpnGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CreateVpnGateway");
        params.put("Version", "2016-11-15");
        CreateVpnGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = CreateVpnGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(CreateVpnGatewayResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(CreateVpnGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.</p>"]
    fn delete_customer_gateway(&self,
                               input: &DeleteCustomerGatewayRequest)
                               -> Result<(), DeleteCustomerGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteCustomerGateway");
        params.put("Version", "2016-11-15");
        DeleteCustomerGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteCustomerGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.</p>"]
    fn delete_dhcp_options(&self,
                           input: &DeleteDhcpOptionsRequest)
                           -> Result<(), DeleteDhcpOptionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteDhcpOptions");
        params.put("Version", "2016-11-15");
        DeleteDhcpOptionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteDhcpOptionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes an egress-only Internet gateway.</p>"]
    fn delete_egress_only_internet_gateway
        (&self,
         input: &DeleteEgressOnlyInternetGatewayRequest)
         -> Result<DeleteEgressOnlyInternetGatewayResult, DeleteEgressOnlyInternetGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteEgressOnlyInternetGateway");
        params.put("Version", "2016-11-15");
        DeleteEgressOnlyInternetGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DeleteEgressOnlyInternetGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DeleteEgressOnlyInternetGatewayResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteEgressOnlyInternetGatewayError::from_body(String::from_utf8_lossy(&body)
                                                                        .as_ref()))
            }
        }
    }


    #[doc="<p>Deletes one or more flow logs.</p>"]
    fn delete_flow_logs(&self,
                        input: &DeleteFlowLogsRequest)
                        -> Result<DeleteFlowLogsResult, DeleteFlowLogsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteFlowLogs");
        params.put("Version", "2016-11-15");
        DeleteFlowLogsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DeleteFlowLogsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DeleteFlowLogsResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteFlowLogsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified Internet gateway. You must detach the Internet gateway from the VPC before you can delete it.</p>"]
    fn delete_internet_gateway(&self,
                               input: &DeleteInternetGatewayRequest)
                               -> Result<(), DeleteInternetGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteInternetGateway");
        params.put("Version", "2016-11-15");
        DeleteInternetGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteInternetGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified key pair, by removing the public key from Amazon EC2.</p>"]
    fn delete_key_pair(&self, input: &DeleteKeyPairRequest) -> Result<(), DeleteKeyPairError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteKeyPair");
        params.put("Version", "2016-11-15");
        DeleteKeyPairRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteKeyPairError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.</p>"]
    fn delete_nat_gateway(&self,
                          input: &DeleteNatGatewayRequest)
                          -> Result<DeleteNatGatewayResult, DeleteNatGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteNatGateway");
        params.put("Version", "2016-11-15");
        DeleteNatGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DeleteNatGatewayResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DeleteNatGatewayResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteNatGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.</p>"]
    fn delete_network_acl(&self,
                          input: &DeleteNetworkAclRequest)
                          -> Result<(), DeleteNetworkAclError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteNetworkAcl");
        params.put("Version", "2016-11-15");
        DeleteNetworkAclRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteNetworkAclError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified ingress or egress entry (rule) from the specified network ACL.</p>"]
    fn delete_network_acl_entry(&self,
                                input: &DeleteNetworkAclEntryRequest)
                                -> Result<(), DeleteNetworkAclEntryError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteNetworkAclEntry");
        params.put("Version", "2016-11-15");
        DeleteNetworkAclEntryRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteNetworkAclEntryError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified network interface. You must detach the network interface before you can delete it.</p>"]
    fn delete_network_interface(&self,
                                input: &DeleteNetworkInterfaceRequest)
                                -> Result<(), DeleteNetworkInterfaceError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteNetworkInterface");
        params.put("Version", "2016-11-15");
        DeleteNetworkInterfaceRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteNetworkInterfaceError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you're removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.</p>"]
    fn delete_network_interface_permission
        (&self,
         input: &DeleteNetworkInterfacePermissionRequest)
         -> Result<DeleteNetworkInterfacePermissionResult, DeleteNetworkInterfacePermissionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteNetworkInterfacePermission");
        params.put("Version", "2016-11-15");
        DeleteNetworkInterfacePermissionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DeleteNetworkInterfacePermissionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DeleteNetworkInterfacePermissionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteNetworkInterfacePermissionError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information about placement groups and cluster instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html\">Cluster Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_placement_group(&self,
                              input: &DeletePlacementGroupRequest)
                              -> Result<(), DeletePlacementGroupError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeletePlacementGroup");
        params.put("Version", "2016-11-15");
        DeletePlacementGroupRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeletePlacementGroupError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified route from the specified route table.</p>"]
    fn delete_route(&self, input: &DeleteRouteRequest) -> Result<(), DeleteRouteError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteRoute");
        params.put("Version", "2016-11-15");
        DeleteRouteRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteRouteError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.</p>"]
    fn delete_route_table(&self,
                          input: &DeleteRouteTableRequest)
                          -> Result<(), DeleteRouteTableError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteRouteTable");
        params.put("Version", "2016-11-15");
        DeleteRouteTableRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteRouteTableError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes a security group.</p> <p>If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with <code>InvalidGroup.InUse</code> in EC2-Classic or <code>DependencyViolation</code> in EC2-VPC.</p>"]
    fn delete_security_group(&self,
                             input: &DeleteSecurityGroupRequest)
                             -> Result<(), DeleteSecurityGroupError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteSecurityGroup");
        params.put("Version", "2016-11-15");
        DeleteSecurityGroupRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteSecurityGroupError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified snapshot.</p> <p>When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.</p> <p>You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html\">Deleting an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_snapshot(&self, input: &DeleteSnapshotRequest) -> Result<(), DeleteSnapshotError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteSnapshot");
        params.put("Version", "2016-11-15");
        DeleteSnapshotRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteSnapshotError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the data feed for Spot instances.</p>"]
    fn delete_spot_datafeed_subscription(&self,
                                         input: &DeleteSpotDatafeedSubscriptionRequest)
                                         -> Result<(), DeleteSpotDatafeedSubscriptionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteSpotDatafeedSubscription");
        params.put("Version", "2016-11-15");
        DeleteSpotDatafeedSubscriptionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteSpotDatafeedSubscriptionError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.</p>"]
    fn delete_subnet(&self, input: &DeleteSubnetRequest) -> Result<(), DeleteSubnetError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteSubnet");
        params.put("Version", "2016-11-15");
        DeleteSubnetRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteSubnetError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified set of tags from the specified set of resources. This call is designed to follow a <code>DescribeTags</code> request.</p> <p>For more information about tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_tags(&self, input: &DeleteTagsRequest) -> Result<(), DeleteTagsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteTags");
        params.put("Version", "2016-11-15");
        DeleteTagsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteTagsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified EBS volume. The volume must be in the <code>available</code> state (not attached to an instance).</p> <note> <p>The volume may remain in the <code>deleting</code> state for several minutes.</p> </note> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html\">Deleting an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn delete_volume(&self, input: &DeleteVolumeRequest) -> Result<(), DeleteVolumeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteVolume");
        params.put("Version", "2016-11-15");
        DeleteVolumeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteVolumeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.</p>"]
    fn delete_vpc(&self, input: &DeleteVpcRequest) -> Result<(), DeleteVpcError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteVpc");
        params.put("Version", "2016-11-15");
        DeleteVpcRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteVpcError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes the endpoint routes in the route tables that were associated with the endpoint.</p>"]
    fn delete_vpc_endpoints(&self,
                            input: &DeleteVpcEndpointsRequest)
                            -> Result<DeleteVpcEndpointsResult, DeleteVpcEndpointsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteVpcEndpoints");
        params.put("Version", "2016-11-15");
        DeleteVpcEndpointsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DeleteVpcEndpointsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DeleteVpcEndpointsResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteVpcEndpointsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the <code>active</code> state. The owner of the requester VPC can delete a VPC peering connection in the <code>pending-acceptance</code> state. </p>"]
    fn delete_vpc_peering_connection
        (&self,
         input: &DeleteVpcPeeringConnectionRequest)
         -> Result<DeleteVpcPeeringConnectionResult, DeleteVpcPeeringConnectionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteVpcPeeringConnection");
        params.put("Version", "2016-11-15");
        DeleteVpcPeeringConnectionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DeleteVpcPeeringConnectionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DeleteVpcPeeringConnectionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteVpcPeeringConnectionError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified VPN connection.</p> <p>If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway using the new configuration information returned with the new VPN connection ID.</p>"]
    fn delete_vpn_connection(&self,
                             input: &DeleteVpnConnectionRequest)
                             -> Result<(), DeleteVpnConnectionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteVpnConnection");
        params.put("Version", "2016-11-15");
        DeleteVpnConnectionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteVpnConnectionError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.</p>"]
    fn delete_vpn_connection_route(&self,
                                   input: &DeleteVpnConnectionRouteRequest)
                                   -> Result<(), DeleteVpnConnectionRouteError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteVpnConnectionRoute");
        params.put("Version", "2016-11-15");
        DeleteVpnConnectionRouteRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteVpnConnectionRouteError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the specified virtual private gateway. We recommend that before you delete a virtual private gateway, you detach it from the VPC and delete the VPN connection. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.</p>"]
    fn delete_vpn_gateway(&self,
                          input: &DeleteVpnGatewayRequest)
                          -> Result<(), DeleteVpnGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeleteVpnGateway");
        params.put("Version", "2016-11-15");
        DeleteVpnGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteVpnGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances; however, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.</p> <p>When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.</p>"]
    fn deregister_image(&self, input: &DeregisterImageRequest) -> Result<(), DeregisterImageError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DeregisterImage");
        params.put("Version", "2016-11-15");
        DeregisterImageRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeregisterImageError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes attributes of your AWS account. The following are the supported account attributes:</p> <ul> <li> <p> <code>supported-platforms</code>: Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC.</p> </li> <li> <p> <code>default-vpc</code>: The ID of the default VPC for your account, or <code>none</code>.</p> </li> <li> <p> <code>max-instances</code>: The maximum number of On-Demand instances that you can run.</p> </li> <li> <p> <code>vpc-max-security-groups-per-interface</code>: The maximum number of security groups that you can assign to a network interface.</p> </li> <li> <p> <code>max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic. </p> </li> <li> <p> <code>vpc-max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.</p> </li> </ul>"]
    fn describe_account_attributes
        (&self,
         input: &DescribeAccountAttributesRequest)
         -> Result<DescribeAccountAttributesResult, DescribeAccountAttributesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeAccountAttributes");
        params.put("Version", "2016-11-15");
        DescribeAccountAttributesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeAccountAttributesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeAccountAttributesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeAccountAttributesError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your Elastic IP addresses.</p> <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_addresses(&self,
                          input: &DescribeAddressesRequest)
                          -> Result<DescribeAddressesResult, DescribeAddressesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeAddresses");
        params.put("Version", "2016-11-15");
        DescribeAddressesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeAddressesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeAddressesResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeAddressesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html\">Regions and Availability Zones</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_availability_zones
        (&self,
         input: &DescribeAvailabilityZonesRequest)
         -> Result<DescribeAvailabilityZonesResult, DescribeAvailabilityZonesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeAvailabilityZones");
        params.put("Version", "2016-11-15");
        DescribeAvailabilityZonesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeAvailabilityZonesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeAvailabilityZonesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeAvailabilityZonesError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your bundling tasks.</p> <note> <p>Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use <code>RegisterImage</code> with the Amazon S3 bucket name and image manifest name you provided to the bundle task.</p> </note>"]
    fn describe_bundle_tasks(&self,
                             input: &DescribeBundleTasksRequest)
                             -> Result<DescribeBundleTasksResult, DescribeBundleTasksError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeBundleTasks");
        params.put("Version", "2016-11-15");
        DescribeBundleTasksRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeBundleTasksResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeBundleTasksResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeBundleTasksError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink; you cannot use this request to return information about other instances.</p>"]
    fn describe_classic_link_instances
        (&self,
         input: &DescribeClassicLinkInstancesRequest)
         -> Result<DescribeClassicLinkInstancesResult, DescribeClassicLinkInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeClassicLinkInstances");
        params.put("Version", "2016-11-15");
        DescribeClassicLinkInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeClassicLinkInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeClassicLinkInstancesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeClassicLinkInstancesError::from_body(String::from_utf8_lossy(&body)
                                                                     .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your conversion tasks. For more information, see the <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/\">VM Import/Export User Guide</a>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    fn describe_conversion_tasks
        (&self,
         input: &DescribeConversionTasksRequest)
         -> Result<DescribeConversionTasksResult, DescribeConversionTasksError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeConversionTasks");
        params.put("Version", "2016-11-15");
        DescribeConversionTasksRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeConversionTasksResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeConversionTasksResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeConversionTasksError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your VPN customer gateways.</p> <p>For more information about VPN customer gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_customer_gateways
        (&self,
         input: &DescribeCustomerGatewaysRequest)
         -> Result<DescribeCustomerGatewaysResult, DescribeCustomerGatewaysError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeCustomerGateways");
        params.put("Version", "2016-11-15");
        DescribeCustomerGatewaysRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeCustomerGatewaysResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeCustomerGatewaysResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeCustomerGatewaysError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your DHCP options sets.</p> <p>For more information about DHCP options sets, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html\">DHCP Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_dhcp_options(&self,
                             input: &DescribeDhcpOptionsRequest)
                             -> Result<DescribeDhcpOptionsResult, DescribeDhcpOptionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeDhcpOptions");
        params.put("Version", "2016-11-15");
        DescribeDhcpOptionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeDhcpOptionsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeDhcpOptionsResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeDhcpOptionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your egress-only Internet gateways.</p>"]
    fn describe_egress_only_internet_gateways
        (&self,
         input: &DescribeEgressOnlyInternetGatewaysRequest)
         -> Result<DescribeEgressOnlyInternetGatewaysResult,
                   DescribeEgressOnlyInternetGatewaysError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeEgressOnlyInternetGateways");
        params.put("Version", "2016-11-15");
        DescribeEgressOnlyInternetGatewaysRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeEgressOnlyInternetGatewaysResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeEgressOnlyInternetGatewaysResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeEgressOnlyInternetGatewaysError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the Elastic GPUs associated with your instances. For more information about Elastic GPUs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-gpus.html\">Amazon EC2 Elastic GPUs</a>.</p>"]
    fn describe_elastic_gpus(&self,
                             input: &DescribeElasticGpusRequest)
                             -> Result<DescribeElasticGpusResult, DescribeElasticGpusError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeElasticGpus");
        params.put("Version", "2016-11-15");
        DescribeElasticGpusRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeElasticGpusResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeElasticGpusResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeElasticGpusError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your export tasks.</p>"]
    fn describe_export_tasks(&self,
                             input: &DescribeExportTasksRequest)
                             -> Result<DescribeExportTasksResult, DescribeExportTasksError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeExportTasks");
        params.put("Version", "2016-11-15");
        DescribeExportTasksRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeExportTasksResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeExportTasksResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeExportTasksError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.</p>"]
    fn describe_flow_logs(&self,
                          input: &DescribeFlowLogsRequest)
                          -> Result<DescribeFlowLogsResult, DescribeFlowLogsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeFlowLogs");
        params.put("Version", "2016-11-15");
        DescribeFlowLogsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeFlowLogsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeFlowLogsResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeFlowLogsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more available Amazon FPGA Images (AFIs). These include public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.</p>"]
    fn describe_fpga_images(&self,
                            input: &DescribeFpgaImagesRequest)
                            -> Result<DescribeFpgaImagesResult, DescribeFpgaImagesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeFpgaImages");
        params.put("Version", "2016-11-15");
        DescribeFpgaImagesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeFpgaImagesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeFpgaImagesResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeFpgaImagesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the Dedicated Host Reservations that are available to purchase.</p> <p>The results describe all the Dedicated Host Reservation offerings, including offerings that may not match the instance family and region of your Dedicated Hosts. When purchasing an offering, ensure that the the instance family and region of the offering matches that of the Dedicated Host/s it will be associated with. For an overview of supported instance types, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html\">Dedicated Hosts Overview</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p>"]
    fn describe_host_reservation_offerings
        (&self,
         input: &DescribeHostReservationOfferingsRequest)
         -> Result<DescribeHostReservationOfferingsResult, DescribeHostReservationOfferingsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeHostReservationOfferings");
        params.put("Version", "2016-11-15");
        DescribeHostReservationOfferingsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeHostReservationOfferingsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeHostReservationOfferingsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeHostReservationOfferingsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.</p>"]
    fn describe_host_reservations
        (&self,
         input: &DescribeHostReservationsRequest)
         -> Result<DescribeHostReservationsResult, DescribeHostReservationsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeHostReservations");
        params.put("Version", "2016-11-15");
        DescribeHostReservationsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeHostReservationsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeHostReservationsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeHostReservationsError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your Dedicated Hosts.</p> <p>The results describe only the Dedicated Hosts in the region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released will be listed with the state <code>released</code>.</p>"]
    fn describe_hosts(&self,
                      input: &DescribeHostsRequest)
                      -> Result<DescribeHostsResult, DescribeHostsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeHosts");
        params.put("Version", "2016-11-15");
        DescribeHostsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeHostsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeHostsResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeHostsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes your IAM instance profile associations.</p>"]
fn describe_iam_instance_profile_associations(&self, input: &DescribeIamInstanceProfileAssociationsRequest) -> Result<DescribeIamInstanceProfileAssociationsResult, DescribeIamInstanceProfileAssociationsError>{
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeIamInstanceProfileAssociations");
        params.put("Version", "2016-11-15");
        DescribeIamInstanceProfileAssociationsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeIamInstanceProfileAssociationsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeIamInstanceProfileAssociationsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeIamInstanceProfileAssociationsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the ID format settings for your resources on a per-region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.</p> <p>The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>. </p> <p>These settings apply to the IAM user who makes the request; they do not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the <a>ModifyIdFormat</a> command. Resources created with longer IDs are visible to all IAM users, regardless of these settings and provided that they have permission to use the relevant <code>Describe</code> command for the resource type.</p>"]
    fn describe_id_format(&self,
                          input: &DescribeIdFormatRequest)
                          -> Result<DescribeIdFormatResult, DescribeIdFormatError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeIdFormat");
        params.put("Version", "2016-11-15");
        DescribeIdFormatRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeIdFormatResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeIdFormatResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeIdFormatError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html\">Resource IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p> <p>The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>. </p> <p>These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.</p>"]
    fn describe_identity_id_format
        (&self,
         input: &DescribeIdentityIdFormatRequest)
         -> Result<DescribeIdentityIdFormatResult, DescribeIdentityIdFormatError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeIdentityIdFormat");
        params.put("Version", "2016-11-15");
        DescribeIdentityIdFormatRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeIdentityIdFormatResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeIdentityIdFormatResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeIdentityIdFormatError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.</p>"]
    fn describe_image_attribute(&self,
                                input: &DescribeImageAttributeRequest)
                                -> Result<ImageAttribute, DescribeImageAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeImageAttribute");
        params.put("Version", "2016-11-15");
        DescribeImageAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ImageAttribute::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ImageAttributeDeserializer::deserialize(&actual_tag_name,
                                                                          &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeImageAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of the images (AMIs, AKIs, and ARIs) available to you. Images available to you include public images, private images that you own, and private images owned by other AWS accounts but for which you have explicit launch permissions.</p> <note> <p>Deregistered images are included in the returned results for an unspecified interval after deregistration.</p> </note>"]
    fn describe_images(&self,
                       input: &DescribeImagesRequest)
                       -> Result<DescribeImagesResult, DescribeImagesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeImages");
        params.put("Version", "2016-11-15");
        DescribeImagesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeImagesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeImagesResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeImagesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Displays details about an import virtual machine or import snapshot tasks that are already created.</p>"]
    fn describe_import_image_tasks
        (&self,
         input: &DescribeImportImageTasksRequest)
         -> Result<DescribeImportImageTasksResult, DescribeImportImageTasksError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeImportImageTasks");
        params.put("Version", "2016-11-15");
        DescribeImportImageTasksRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeImportImageTasksResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeImportImageTasksResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeImportImageTasksError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Describes your import snapshot tasks.</p>"]
    fn describe_import_snapshot_tasks
        (&self,
         input: &DescribeImportSnapshotTasksRequest)
         -> Result<DescribeImportSnapshotTasksResult, DescribeImportSnapshotTasksError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeImportSnapshotTasks");
        params.put("Version", "2016-11-15");
        DescribeImportSnapshotTasksRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeImportSnapshotTasksResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeImportSnapshotTasksResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeImportSnapshotTasksError::from_body(String::from_utf8_lossy(&body)
                                                                    .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: <code>instanceType</code> | <code>kernel</code> | <code>ramdisk</code> | <code>userData</code> | <code>disableApiTermination</code> | <code>instanceInitiatedShutdownBehavior</code> | <code>rootDeviceName</code> | <code>blockDeviceMapping</code> | <code>productCodes</code> | <code>sourceDestCheck</code> | <code>groupSet</code> | <code>ebsOptimized</code> | <code>sriovNetSupport</code> </p>"]
    fn describe_instance_attribute(&self,
                                   input: &DescribeInstanceAttributeRequest)
                                   -> Result<InstanceAttribute, DescribeInstanceAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeInstanceAttribute");
        params.put("Version", "2016-11-15");
        DescribeInstanceAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = InstanceAttribute::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(InstanceAttributeDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeInstanceAttributeError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the status of one or more instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.</p> <p>Instance status includes the following components:</p> <ul> <li> <p> <b>Status checks</b> - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html\">Status Checks for Your Instances</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html\">Troubleshooting Instances with Failed Status Checks</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </li> <li> <p> <b>Scheduled events</b> - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html\">Scheduled Events for Your Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </li> <li> <p> <b>Instance state</b> - You can manage your instances from the moment you launch them through their termination. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html\">Instance Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </li> </ul>"]
    fn describe_instance_status
        (&self,
         input: &DescribeInstanceStatusRequest)
         -> Result<DescribeInstanceStatusResult, DescribeInstanceStatusError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeInstanceStatus");
        params.put("Version", "2016-11-15");
        DescribeInstanceStatusRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeInstanceStatusResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeInstanceStatusResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeInstanceStatusError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your instances.</p> <p>If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the returned results.</p> <p>Recently terminated instances might appear in the returned results. This interval is usually less than one hour.</p> <p>If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.</p>"]
    fn describe_instances(&self,
                          input: &DescribeInstancesRequest)
                          -> Result<DescribeInstancesResult, DescribeInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeInstances");
        params.put("Version", "2016-11-15");
        DescribeInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeInstancesResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your Internet gateways.</p>"]
    fn describe_internet_gateways
        (&self,
         input: &DescribeInternetGatewaysRequest)
         -> Result<DescribeInternetGatewaysResult, DescribeInternetGatewaysError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeInternetGateways");
        params.put("Version", "2016-11-15");
        DescribeInternetGatewaysRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeInternetGatewaysResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeInternetGatewaysResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeInternetGatewaysError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your key pairs.</p> <p>For more information about key pairs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_key_pairs(&self,
                          input: &DescribeKeyPairsRequest)
                          -> Result<DescribeKeyPairsResult, DescribeKeyPairsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeKeyPairs");
        params.put("Version", "2016-11-15");
        DescribeKeyPairsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeKeyPairsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeKeyPairsResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeKeyPairsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.</p>"]
    fn describe_moving_addresses
        (&self,
         input: &DescribeMovingAddressesRequest)
         -> Result<DescribeMovingAddressesResult, DescribeMovingAddressesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeMovingAddresses");
        params.put("Version", "2016-11-15");
        DescribeMovingAddressesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeMovingAddressesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeMovingAddressesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeMovingAddressesError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of the your NAT gateways.</p>"]
    fn describe_nat_gateways(&self,
                             input: &DescribeNatGatewaysRequest)
                             -> Result<DescribeNatGatewaysResult, DescribeNatGatewaysError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeNatGateways");
        params.put("Version", "2016-11-15");
        DescribeNatGatewaysRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeNatGatewaysResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeNatGatewaysResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeNatGatewaysError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your network ACLs.</p> <p>For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_network_acls(&self,
                             input: &DescribeNetworkAclsRequest)
                             -> Result<DescribeNetworkAclsResult, DescribeNetworkAclsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeNetworkAcls");
        params.put("Version", "2016-11-15");
        DescribeNetworkAclsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeNetworkAclsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeNetworkAclsResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeNetworkAclsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes a network interface attribute. You can specify only one attribute at a time.</p>"]
    fn describe_network_interface_attribute
        (&self,
         input: &DescribeNetworkInterfaceAttributeRequest)
         -> Result<DescribeNetworkInterfaceAttributeResult, DescribeNetworkInterfaceAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeNetworkInterfaceAttribute");
        params.put("Version", "2016-11-15");
        DescribeNetworkInterfaceAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeNetworkInterfaceAttributeResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeNetworkInterfaceAttributeResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeNetworkInterfaceAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the permissions for your network interfaces. </p>"]
    fn describe_network_interface_permissions
        (&self,
         input: &DescribeNetworkInterfacePermissionsRequest)
         -> Result<DescribeNetworkInterfacePermissionsResult,
                   DescribeNetworkInterfacePermissionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeNetworkInterfacePermissions");
        params.put("Version", "2016-11-15");
        DescribeNetworkInterfacePermissionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeNetworkInterfacePermissionsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeNetworkInterfacePermissionsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeNetworkInterfacePermissionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your network interfaces.</p>"]
    fn describe_network_interfaces
        (&self,
         input: &DescribeNetworkInterfacesRequest)
         -> Result<DescribeNetworkInterfacesResult, DescribeNetworkInterfacesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeNetworkInterfaces");
        params.put("Version", "2016-11-15");
        DescribeNetworkInterfacesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeNetworkInterfacesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeNetworkInterfacesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeNetworkInterfacesError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your placement groups. For more information about placement groups and cluster instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html\">Cluster Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_placement_groups
        (&self,
         input: &DescribePlacementGroupsRequest)
         -> Result<DescribePlacementGroupsResult, DescribePlacementGroupsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribePlacementGroups");
        params.put("Version", "2016-11-15");
        DescribePlacementGroupsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribePlacementGroupsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribePlacementGroupsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribePlacementGroupsError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Describes available AWS services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service. A prefix list ID is required for creating an outbound security group rule that allows traffic from a VPC to access an AWS service through a VPC endpoint.</p>"]
    fn describe_prefix_lists(&self,
                             input: &DescribePrefixListsRequest)
                             -> Result<DescribePrefixListsResult, DescribePrefixListsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribePrefixLists");
        params.put("Version", "2016-11-15");
        DescribePrefixListsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribePrefixListsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribePrefixListsResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribePrefixListsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more regions that are currently available to you.</p> <p>For a list of the regions supported by Amazon EC2, see <a href=\"http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region\">Regions and Endpoints</a>.</p>"]
    fn describe_regions(&self,
                        input: &DescribeRegionsRequest)
                        -> Result<DescribeRegionsResult, DescribeRegionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeRegions");
        params.put("Version", "2016-11-15");
        DescribeRegionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeRegionsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeRegionsResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeRegionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of the Reserved Instances that you purchased.</p> <p>For more information about Reserved Instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html\">Reserved Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_reserved_instances
        (&self,
         input: &DescribeReservedInstancesRequest)
         -> Result<DescribeReservedInstancesResult, DescribeReservedInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeReservedInstances");
        params.put("Version", "2016-11-15");
        DescribeReservedInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeReservedInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeReservedInstancesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeReservedInstancesError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.</p> <p>The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.</p> <p>As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.</p> <p>As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_reserved_instances_listings
        (&self,
         input: &DescribeReservedInstancesListingsRequest)
         -> Result<DescribeReservedInstancesListingsResult, DescribeReservedInstancesListingsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeReservedInstancesListings");
        params.put("Version", "2016-11-15");
        DescribeReservedInstancesListingsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeReservedInstancesListingsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeReservedInstancesListingsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeReservedInstancesListingsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html\">Modifying Reserved Instances</a> in the Amazon Elastic Compute Cloud User Guide.</p>"]
fn describe_reserved_instances_modifications(&self, input: &DescribeReservedInstancesModificationsRequest) -> Result<DescribeReservedInstancesModificationsResult, DescribeReservedInstancesModificationsError>{
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeReservedInstancesModifications");
        params.put("Version", "2016-11-15");
        DescribeReservedInstancesModificationsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeReservedInstancesModificationsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeReservedInstancesModificationsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeReservedInstancesModificationsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.</p> <p>If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_reserved_instances_offerings
        (&self,
         input: &DescribeReservedInstancesOfferingsRequest)
         -> Result<DescribeReservedInstancesOfferingsResult,
                   DescribeReservedInstancesOfferingsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeReservedInstancesOfferings");
        params.put("Version", "2016-11-15");
        DescribeReservedInstancesOfferingsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeReservedInstancesOfferingsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeReservedInstancesOfferingsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeReservedInstancesOfferingsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your route tables.</p> <p>Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_route_tables(&self,
                             input: &DescribeRouteTablesRequest)
                             -> Result<DescribeRouteTablesResult, DescribeRouteTablesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeRouteTables");
        params.put("Version", "2016-11-15");
        DescribeRouteTablesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeRouteTablesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeRouteTablesResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeRouteTablesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Finds available schedules that meet the specified criteria.</p> <p>You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.</p> <p>After you find a schedule that meets your needs, call <a>PurchaseScheduledInstances</a> to purchase Scheduled Instances with that schedule.</p>"]
fn describe_scheduled_instance_availability(&self, input: &DescribeScheduledInstanceAvailabilityRequest) -> Result<DescribeScheduledInstanceAvailabilityResult, DescribeScheduledInstanceAvailabilityError>{
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeScheduledInstanceAvailability");
        params.put("Version", "2016-11-15");
        DescribeScheduledInstanceAvailabilityRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeScheduledInstanceAvailabilityResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeScheduledInstanceAvailabilityResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeScheduledInstanceAvailabilityError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your Scheduled Instances.</p>"]
    fn describe_scheduled_instances
        (&self,
         input: &DescribeScheduledInstancesRequest)
         -> Result<DescribeScheduledInstancesResult, DescribeScheduledInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeScheduledInstances");
        params.put("Version", "2016-11-15");
        DescribeScheduledInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeScheduledInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeScheduledInstancesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeScheduledInstancesError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>[EC2-VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.</p>"]
    fn describe_security_group_references
        (&self,
         input: &DescribeSecurityGroupReferencesRequest)
         -> Result<DescribeSecurityGroupReferencesResult, DescribeSecurityGroupReferencesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSecurityGroupReferences");
        params.put("Version", "2016-11-15");
        DescribeSecurityGroupReferencesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSecurityGroupReferencesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSecurityGroupReferencesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSecurityGroupReferencesError::from_body(String::from_utf8_lossy(&body)
                                                                        .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your security groups.</p> <p>A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html\">Amazon EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html\">Security Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_security_groups
        (&self,
         input: &DescribeSecurityGroupsRequest)
         -> Result<DescribeSecurityGroupsResult, DescribeSecurityGroupsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSecurityGroups");
        params.put("Version", "2016-11-15");
        DescribeSecurityGroupsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSecurityGroupsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSecurityGroupsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSecurityGroupsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.</p> <p>For more information about EBS snapshots, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html\">Amazon EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_snapshot_attribute
        (&self,
         input: &DescribeSnapshotAttributeRequest)
         -> Result<DescribeSnapshotAttributeResult, DescribeSnapshotAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSnapshotAttribute");
        params.put("Version", "2016-11-15");
        DescribeSnapshotAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSnapshotAttributeResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSnapshotAttributeResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSnapshotAttributeError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of the EBS snapshots available to you. Available snapshots include public snapshots available for any AWS account to launch, private snapshots that you own, and private snapshots owned by another AWS account but for which you've been given explicit create volume permissions.</p> <p>The create volume permissions fall into the following categories:</p> <ul> <li> <p> <i>public</i>: The owner of the snapshot granted create volume permissions for the snapshot to the <code>all</code> group. All AWS accounts have create volume permissions for these snapshots.</p> </li> <li> <p> <i>explicit</i>: The owner of the snapshot granted create volume permissions to a specific AWS account.</p> </li> <li> <p> <i>implicit</i>: An AWS account has implicit create volume permissions for all snapshots it owns.</p> </li> </ul> <p>The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.</p> <p>If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.</p> <p>If you specify one or more snapshot owners using the <code>OwnerIds</code> option, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS account IDs of the specified owners, <code>amazon</code> for snapshots owned by Amazon, or <code>self</code> for snapshots that you own.</p> <p>If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify AWS account IDs (if you own the snapshots), <code>self</code> for snapshots for which you own or have explicit permissions, or <code>all</code> for public snapshots.</p> <p>If you are describing a long list of snapshots, you can paginate the output to make the list more manageable. The <code>MaxResults</code> parameter sets the maximum number of results returned in a single page. If the list of results exceeds your <code>MaxResults</code> value, then that number of results is returned along with a <code>NextToken</code> value that can be passed to a subsequent <code>DescribeSnapshots</code> request to retrieve the remaining results.</p> <p>For more information about EBS snapshots, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html\">Amazon EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_snapshots(&self,
                          input: &DescribeSnapshotsRequest)
                          -> Result<DescribeSnapshotsResult, DescribeSnapshotsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSnapshots");
        params.put("Version", "2016-11-15");
        DescribeSnapshotsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSnapshotsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeSnapshotsResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSnapshotsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the data feed for Spot instances. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html\">Spot Instance Data Feed</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_spot_datafeed_subscription
        (&self,
         input: &DescribeSpotDatafeedSubscriptionRequest)
         -> Result<DescribeSpotDatafeedSubscriptionResult, DescribeSpotDatafeedSubscriptionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSpotDatafeedSubscription");
        params.put("Version", "2016-11-15");
        DescribeSpotDatafeedSubscriptionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSpotDatafeedSubscriptionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSpotDatafeedSubscriptionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSpotDatafeedSubscriptionError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the running instances for the specified Spot fleet.</p>"]
    fn describe_spot_fleet_instances
        (&self,
         input: &DescribeSpotFleetInstancesRequest)
         -> Result<DescribeSpotFleetInstancesResponse, DescribeSpotFleetInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSpotFleetInstances");
        params.put("Version", "2016-11-15");
        DescribeSpotFleetInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSpotFleetInstancesResponse::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSpotFleetInstancesResponseDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSpotFleetInstancesError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the events for the specified Spot fleet request during the specified time.</p> <p>Spot fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event.</p>"]
    fn describe_spot_fleet_request_history
        (&self,
         input: &DescribeSpotFleetRequestHistoryRequest)
         -> Result<DescribeSpotFleetRequestHistoryResponse, DescribeSpotFleetRequestHistoryError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSpotFleetRequestHistory");
        params.put("Version", "2016-11-15");
        DescribeSpotFleetRequestHistoryRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSpotFleetRequestHistoryResponse::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSpotFleetRequestHistoryResponseDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSpotFleetRequestHistoryError::from_body(String::from_utf8_lossy(&body)
                                                                        .as_ref()))
            }
        }
    }


    #[doc="<p>Describes your Spot fleet requests.</p> <p>Spot fleet requests are deleted 48 hours after they are canceled and their instances are terminated.</p>"]
    fn describe_spot_fleet_requests
        (&self,
         input: &DescribeSpotFleetRequestsRequest)
         -> Result<DescribeSpotFleetRequestsResponse, DescribeSpotFleetRequestsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSpotFleetRequests");
        params.put("Version", "2016-11-15");
        DescribeSpotFleetRequestsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSpotFleetRequestsResponse::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSpotFleetRequestsResponseDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSpotFleetRequestsError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the Spot instance requests that belong to your account. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html\">Spot Instance Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>You can use <code>DescribeSpotInstanceRequests</code> to find a running Spot instance by examining the response. If the status of the Spot instance is <code>fulfilled</code>, the instance ID appears in the response and contains the identifier of the instance. Alternatively, you can use <a>DescribeInstances</a> with a filter to look for instances where the instance lifecycle is <code>spot</code>.</p> <p>Spot instance requests are deleted 4 hours after they are canceled and their instances are terminated.</p>"]
    fn describe_spot_instance_requests
        (&self,
         input: &DescribeSpotInstanceRequestsRequest)
         -> Result<DescribeSpotInstanceRequestsResult, DescribeSpotInstanceRequestsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSpotInstanceRequests");
        params.put("Version", "2016-11-15");
        DescribeSpotInstanceRequestsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSpotInstanceRequestsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSpotInstanceRequestsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSpotInstanceRequestsError::from_body(String::from_utf8_lossy(&body)
                                                                     .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the Spot price history. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html\">Spot Instance Pricing History</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.</p>"]
    fn describe_spot_price_history
        (&self,
         input: &DescribeSpotPriceHistoryRequest)
         -> Result<DescribeSpotPriceHistoryResult, DescribeSpotPriceHistoryError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSpotPriceHistory");
        params.put("Version", "2016-11-15");
        DescribeSpotPriceHistoryRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSpotPriceHistoryResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSpotPriceHistoryResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSpotPriceHistoryError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>[EC2-VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in a peer VPC, or a security group in a peer VPC for which the VPC peering connection has been deleted.</p>"]
    fn describe_stale_security_groups
        (&self,
         input: &DescribeStaleSecurityGroupsRequest)
         -> Result<DescribeStaleSecurityGroupsResult, DescribeStaleSecurityGroupsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeStaleSecurityGroups");
        params.put("Version", "2016-11-15");
        DescribeStaleSecurityGroupsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeStaleSecurityGroupsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeStaleSecurityGroupsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeStaleSecurityGroupsError::from_body(String::from_utf8_lossy(&body)
                                                                    .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your subnets.</p> <p>For more information about subnets, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html\">Your VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_subnets(&self,
                        input: &DescribeSubnetsRequest)
                        -> Result<DescribeSubnetsResult, DescribeSubnetsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeSubnets");
        params.put("Version", "2016-11-15");
        DescribeSubnetsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeSubnetsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeSubnetsResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeSubnetsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of the tags for your EC2 resources.</p> <p>For more information about tags, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_tags(&self,
                     input: &DescribeTagsRequest)
                     -> Result<DescribeTagsResult, DescribeTagsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeTags");
        params.put("Version", "2016-11-15");
        DescribeTagsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeTagsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeTagsResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeTagsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the specified attribute of the specified volume. You can specify only one attribute at a time.</p> <p>For more information about EBS volumes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html\">Amazon EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_volume_attribute
        (&self,
         input: &DescribeVolumeAttributeRequest)
         -> Result<DescribeVolumeAttributeResult, DescribeVolumeAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVolumeAttribute");
        params.put("Version", "2016-11-15");
        DescribeVolumeAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVolumeAttributeResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVolumeAttributeResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVolumeAttributeError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.</p> <p>The <code>DescribeVolumeStatus</code> operation provides the following information about the specified volumes:</p> <p> <i>Status</i>: Reflects the current status of the volume. The possible values are <code>ok</code>, <code>impaired</code> , <code>warning</code>, or <code>insufficient-data</code>. If all checks pass, the overall status of the volume is <code>ok</code>. If the check fails, the overall status is <code>impaired</code>. If the status is <code>insufficient-data</code>, then the checks may still be taking place on your volume at the time. We recommend that you retry the request. For more information on volume status, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html\">Monitoring the Status of Your Volumes</a>.</p> <p> <i>Events</i>: Reflect the cause of a volume status and may require you to take action. For example, if your volume returns an <code>impaired</code> status, then the volume event might be <code>potential-data-inconsistency</code>. This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and may have inconsistent data.</p> <p> <i>Actions</i>: Reflect the actions you may have to take in response to an event. For example, if the status of the volume is <code>impaired</code> and the volume event shows <code>potential-data-inconsistency</code>, then the action shows <code>enable-volume-io</code>. This means that you may want to enable the I/O operations for the volume by calling the <a>EnableVolumeIO</a> action and then check the volume for data consistency.</p> <note> <p>Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the <code>error</code> state (for example, when a volume is incapable of accepting I/O.)</p> </note>"]
    fn describe_volume_status(&self,
                              input: &DescribeVolumeStatusRequest)
                              -> Result<DescribeVolumeStatusResult, DescribeVolumeStatusError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVolumeStatus");
        params.put("Version", "2016-11-15");
        DescribeVolumeStatusRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVolumeStatusResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeVolumeStatusResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVolumeStatusError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the specified EBS volumes.</p> <p>If you are describing a long list of volumes, you can paginate the output to make the list more manageable. The <code>MaxResults</code> parameter sets the maximum number of results returned in a single page. If the list of results exceeds your <code>MaxResults</code> value, then that number of results is returned along with a <code>NextToken</code> value that can be passed to a subsequent <code>DescribeVolumes</code> request to retrieve the remaining results.</p> <p>For more information about EBS volumes, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html\">Amazon EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_volumes(&self,
                        input: &DescribeVolumesRequest)
                        -> Result<DescribeVolumesResult, DescribeVolumesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVolumes");
        params.put("Version", "2016-11-15");
        DescribeVolumesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVolumesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVolumesResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVolumesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Reports the current modification status of EBS volumes.</p> <p>Current-generation EBS volumes support modification of attributes including type, size, and (for <code>io1</code> volumes) IOPS provisioning while either attached to or detached from an instance. Following an action from the API or the console to modify a volume, the status of the modification may be <code>modifying</code>, <code>optimizing</code>, <code>completed</code>, or <code>failed</code>. If a volume has never been modified, then certain elements of the returned <code>VolumeModification</code> objects are null. </p> <p> You can also use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the <a href=\"http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/\">Amazon CloudWatch Events User Guide</a>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods\">Monitoring Volume Modifications\"</a>. </p>"]
    fn describe_volumes_modifications
        (&self,
         input: &DescribeVolumesModificationsRequest)
         -> Result<DescribeVolumesModificationsResult, DescribeVolumesModificationsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVolumesModifications");
        params.put("Version", "2016-11-15");
        DescribeVolumesModificationsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVolumesModificationsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVolumesModificationsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVolumesModificationsError::from_body(String::from_utf8_lossy(&body)
                                                                     .as_ref()))
            }
        }
    }


    #[doc="<p>Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.</p>"]
    fn describe_vpc_attribute(&self,
                              input: &DescribeVpcAttributeRequest)
                              -> Result<DescribeVpcAttributeResult, DescribeVpcAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpcAttribute");
        params.put("Version", "2016-11-15");
        DescribeVpcAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpcAttributeResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeVpcAttributeResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpcAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the ClassicLink status of one or more VPCs.</p>"]
    fn describe_vpc_classic_link
        (&self,
         input: &DescribeVpcClassicLinkRequest)
         -> Result<DescribeVpcClassicLinkResult, DescribeVpcClassicLinkError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpcClassicLink");
        params.put("Version", "2016-11-15");
        DescribeVpcClassicLinkRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpcClassicLinkResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVpcClassicLinkResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpcClassicLinkError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn describe_vpc_classic_link_dns_support
        (&self,
         input: &DescribeVpcClassicLinkDnsSupportRequest)
         -> Result<DescribeVpcClassicLinkDnsSupportResult, DescribeVpcClassicLinkDnsSupportError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpcClassicLinkDnsSupport");
        params.put("Version", "2016-11-15");
        DescribeVpcClassicLinkDnsSupportRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpcClassicLinkDnsSupportResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVpcClassicLinkDnsSupportResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpcClassicLinkDnsSupportError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes all supported AWS services that can be specified when creating a VPC endpoint.</p>"]
    fn describe_vpc_endpoint_services
        (&self,
         input: &DescribeVpcEndpointServicesRequest)
         -> Result<DescribeVpcEndpointServicesResult, DescribeVpcEndpointServicesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpcEndpointServices");
        params.put("Version", "2016-11-15");
        DescribeVpcEndpointServicesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpcEndpointServicesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVpcEndpointServicesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpcEndpointServicesError::from_body(String::from_utf8_lossy(&body)
                                                                    .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your VPC endpoints.</p>"]
    fn describe_vpc_endpoints(&self,
                              input: &DescribeVpcEndpointsRequest)
                              -> Result<DescribeVpcEndpointsResult, DescribeVpcEndpointsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpcEndpoints");
        params.put("Version", "2016-11-15");
        DescribeVpcEndpointsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpcEndpointsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeVpcEndpointsResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpcEndpointsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your VPC peering connections.</p>"]
    fn describe_vpc_peering_connections
        (&self,
         input: &DescribeVpcPeeringConnectionsRequest)
         -> Result<DescribeVpcPeeringConnectionsResult, DescribeVpcPeeringConnectionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpcPeeringConnections");
        params.put("Version", "2016-11-15");
        DescribeVpcPeeringConnectionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpcPeeringConnectionsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVpcPeeringConnectionsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpcPeeringConnectionsError::from_body(String::from_utf8_lossy(&body)
                                                                      .as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your VPCs.</p>"]
    fn describe_vpcs(&self,
                     input: &DescribeVpcsRequest)
                     -> Result<DescribeVpcsResult, DescribeVpcsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpcs");
        params.put("Version", "2016-11-15");
        DescribeVpcsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpcsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVpcsResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpcsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your VPN connections.</p> <p>For more information about VPN connections, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding a Hardware Virtual Private Gateway to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_vpn_connections
        (&self,
         input: &DescribeVpnConnectionsRequest)
         -> Result<DescribeVpnConnectionsResult, DescribeVpnConnectionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpnConnections");
        params.put("Version", "2016-11-15");
        DescribeVpnConnectionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpnConnectionsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DescribeVpnConnectionsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpnConnectionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Describes one or more of your virtual private gateways.</p> <p>For more information about virtual private gateways, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html\">Adding an IPsec Hardware VPN to Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn describe_vpn_gateways(&self,
                             input: &DescribeVpnGatewaysRequest)
                             -> Result<DescribeVpnGatewaysResult, DescribeVpnGatewaysError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DescribeVpnGateways");
        params.put("Version", "2016-11-15");
        DescribeVpnGatewaysRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DescribeVpnGatewaysResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DescribeVpnGatewaysResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeVpnGatewaysError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.</p>"]
    fn detach_classic_link_vpc(&self,
                               input: &DetachClassicLinkVpcRequest)
                               -> Result<DetachClassicLinkVpcResult, DetachClassicLinkVpcError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DetachClassicLinkVpc");
        params.put("Version", "2016-11-15");
        DetachClassicLinkVpcRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DetachClassicLinkVpcResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(DetachClassicLinkVpcResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DetachClassicLinkVpcError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.</p>"]
    fn detach_internet_gateway(&self,
                               input: &DetachInternetGatewayRequest)
                               -> Result<(), DetachInternetGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DetachInternetGateway");
        params.put("Version", "2016-11-15");
        DetachInternetGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DetachInternetGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Detaches a network interface from an instance.</p>"]
    fn detach_network_interface(&self,
                                input: &DetachNetworkInterfaceRequest)
                                -> Result<(), DetachNetworkInterfaceError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DetachNetworkInterface");
        params.put("Version", "2016-11-15");
        DetachNetworkInterfaceRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DetachNetworkInterfaceError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the <code>busy</code> state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.</p> <p>When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html\">Detaching an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn detach_volume(&self,
                     input: &DetachVolumeRequest)
                     -> Result<VolumeAttachment, DetachVolumeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DetachVolume");
        params.put("Version", "2016-11-15");
        DetachVolumeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = VolumeAttachment::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(VolumeAttachmentDeserializer::deserialize(&actual_tag_name,
                                                                            &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DetachVolumeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Detaches a virtual private gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a virtual private gateway has been completely detached from a VPC by describing the virtual private gateway (any attachments to the virtual private gateway are also described).</p> <p>You must wait for the attachment's state to switch to <code>detached</code> before you can delete the VPC or attach a different VPC to the virtual private gateway.</p>"]
    fn detach_vpn_gateway(&self,
                          input: &DetachVpnGatewayRequest)
                          -> Result<(), DetachVpnGatewayError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DetachVpnGateway");
        params.put("Version", "2016-11-15");
        DetachVpnGatewayRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DetachVpnGatewayError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.</p>"]
    fn disable_vgw_route_propagation(&self,
                                     input: &DisableVgwRoutePropagationRequest)
                                     -> Result<(), DisableVgwRoutePropagationError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisableVgwRoutePropagation");
        params.put("Version", "2016-11-15");
        DisableVgwRoutePropagationRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisableVgwRoutePropagationError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.</p>"]
    fn disable_vpc_classic_link
        (&self,
         input: &DisableVpcClassicLinkRequest)
         -> Result<DisableVpcClassicLinkResult, DisableVpcClassicLinkError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisableVpcClassicLink");
        params.put("Version", "2016-11-15");
        DisableVpcClassicLinkRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DisableVpcClassicLinkResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DisableVpcClassicLinkResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisableVpcClassicLinkError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information about ClassicLink, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn disable_vpc_classic_link_dns_support
        (&self,
         input: &DisableVpcClassicLinkDnsSupportRequest)
         -> Result<DisableVpcClassicLinkDnsSupportResult, DisableVpcClassicLinkDnsSupportError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisableVpcClassicLinkDnsSupport");
        params.put("Version", "2016-11-15");
        DisableVpcClassicLinkDnsSupportRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DisableVpcClassicLinkDnsSupportResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DisableVpcClassicLinkDnsSupportResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisableVpcClassicLinkDnsSupportError::from_body(String::from_utf8_lossy(&body)
                                                                        .as_ref()))
            }
        }
    }


    #[doc="<p>Disassociates an Elastic IP address from the instance or network interface it's associated with.</p> <p>An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html\">Elastic IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.</p>"]
    fn disassociate_address(&self,
                            input: &DisassociateAddressRequest)
                            -> Result<(), DisassociateAddressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisassociateAddress");
        params.put("Version", "2016-11-15");
        DisassociateAddressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisassociateAddressError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Disassociates an IAM instance profile from a running or stopped instance.</p> <p>Use <a>DescribeIamInstanceProfileAssociations</a> to get the association ID.</p>"]
    fn disassociate_iam_instance_profile
        (&self,
         input: &DisassociateIamInstanceProfileRequest)
         -> Result<DisassociateIamInstanceProfileResult, DisassociateIamInstanceProfileError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisassociateIamInstanceProfile");
        params.put("Version", "2016-11-15");
        DisassociateIamInstanceProfileRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DisassociateIamInstanceProfileResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DisassociateIamInstanceProfileResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisassociateIamInstanceProfileError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Disassociates a subnet from a route table.</p> <p>After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn disassociate_route_table(&self,
                                input: &DisassociateRouteTableRequest)
                                -> Result<(), DisassociateRouteTableError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisassociateRouteTable");
        params.put("Version", "2016-11-15");
        DisassociateRouteTableRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisassociateRouteTableError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it. </p>"]
    fn disassociate_subnet_cidr_block
        (&self,
         input: &DisassociateSubnetCidrBlockRequest)
         -> Result<DisassociateSubnetCidrBlockResult, DisassociateSubnetCidrBlockError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisassociateSubnetCidrBlock");
        params.put("Version", "2016-11-15");
        DisassociateSubnetCidrBlockRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DisassociateSubnetCidrBlockResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DisassociateSubnetCidrBlockResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisassociateSubnetCidrBlockError::from_body(String::from_utf8_lossy(&body)
                                                                    .as_ref()))
            }
        }
    }


    #[doc="<p>Disassociates a CIDR block from a VPC. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it. </p>"]
    fn disassociate_vpc_cidr_block
        (&self,
         input: &DisassociateVpcCidrBlockRequest)
         -> Result<DisassociateVpcCidrBlockResult, DisassociateVpcCidrBlockError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "DisassociateVpcCidrBlock");
        params.put("Version", "2016-11-15");
        DisassociateVpcCidrBlockRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = DisassociateVpcCidrBlockResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(DisassociateVpcCidrBlockResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DisassociateVpcCidrBlockError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.</p>"]
    fn enable_vgw_route_propagation(&self,
                                    input: &EnableVgwRoutePropagationRequest)
                                    -> Result<(), EnableVgwRoutePropagationError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "EnableVgwRoutePropagation");
        params.put("Version", "2016-11-15");
        EnableVgwRoutePropagationRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(EnableVgwRoutePropagationError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.</p>"]
    fn enable_volume_io(&self, input: &EnableVolumeIORequest) -> Result<(), EnableVolumeIOError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "EnableVolumeIO");
        params.put("Version", "2016-11-15");
        EnableVolumeIORequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(EnableVolumeIOError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC's route tables have existing routes for address ranges within the <code>10.0.0.0/8</code> IP address range, excluding local routes for VPCs in the <code>10.0.0.0/16</code> and <code>10.1.0.0/16</code> IP address ranges. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn enable_vpc_classic_link(&self,
                               input: &EnableVpcClassicLinkRequest)
                               -> Result<EnableVpcClassicLinkResult, EnableVpcClassicLinkError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "EnableVpcClassicLink");
        params.put("Version", "2016-11-15");
        EnableVpcClassicLinkRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = EnableVpcClassicLinkResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(EnableVpcClassicLinkResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(EnableVpcClassicLinkError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information about ClassicLink, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html\">ClassicLink</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn enable_vpc_classic_link_dns_support
        (&self,
         input: &EnableVpcClassicLinkDnsSupportRequest)
         -> Result<EnableVpcClassicLinkDnsSupportResult, EnableVpcClassicLinkDnsSupportError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "EnableVpcClassicLinkDnsSupport");
        params.put("Version", "2016-11-15");
        EnableVpcClassicLinkDnsSupportRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = EnableVpcClassicLinkDnsSupportResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(EnableVpcClassicLinkDnsSupportResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(EnableVpcClassicLinkDnsSupportError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Gets the console output for the specified instance.</p> <p>Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.</p> <p>Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which is available for at least one hour after the most recent post.</p> <p>For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.</p> <p>For Windows instances, the instance console output includes output from the EC2Config service.</p>"]
    fn get_console_output(&self,
                          input: &GetConsoleOutputRequest)
                          -> Result<GetConsoleOutputResult, GetConsoleOutputError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "GetConsoleOutput");
        params.put("Version", "2016-11-15");
        GetConsoleOutputRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = GetConsoleOutputResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(GetConsoleOutputResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetConsoleOutputError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.</p> <p>The returned content is Base64-encoded.</p>"]
    fn get_console_screenshot(&self,
                              input: &GetConsoleScreenshotRequest)
                              -> Result<GetConsoleScreenshotResult, GetConsoleScreenshotError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "GetConsoleScreenshot");
        params.put("Version", "2016-11-15");
        GetConsoleScreenshotRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = GetConsoleScreenshotResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(GetConsoleScreenshotResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetConsoleScreenshotError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.</p> <p>This is a preview of the <a>PurchaseHostReservation</a> action and does not result in the offering being purchased.</p>"]
    fn get_host_reservation_purchase_preview
        (&self,
         input: &GetHostReservationPurchasePreviewRequest)
         -> Result<GetHostReservationPurchasePreviewResult, GetHostReservationPurchasePreviewError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "GetHostReservationPurchasePreview");
        params.put("Version", "2016-11-15");
        GetHostReservationPurchasePreviewRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = GetHostReservationPurchasePreviewResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(GetHostReservationPurchasePreviewResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetHostReservationPurchasePreviewError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Retrieves the encrypted administrator password for an instance running Windows.</p> <p>The Windows password is generated at boot if the <code>EC2Config</code> service plugin, <code>Ec2SetPassword</code>, is enabled. This usually only happens the first time an AMI is launched, and then <code>Ec2SetPassword</code> is automatically disabled. The password is not generated for rebundled AMIs unless <code>Ec2SetPassword</code> is enabled before bundling.</p> <p>The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.</p> <p>Password generation and encryption takes a few moments. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.</p>"]
    fn get_password_data(&self,
                         input: &GetPasswordDataRequest)
                         -> Result<GetPasswordDataResult, GetPasswordDataError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "GetPasswordData");
        params.put("Version", "2016-11-15");
        GetPasswordDataRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = GetPasswordDataResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(GetPasswordDataResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetPasswordDataError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Returns details about the values and term of your specified Convertible Reserved Instances. When a target configuration is specified, it returns information about whether the exchange is valid and can be performed.</p>"]
    fn get_reserved_instances_exchange_quote
        (&self,
         input: &GetReservedInstancesExchangeQuoteRequest)
         -> Result<GetReservedInstancesExchangeQuoteResult, GetReservedInstancesExchangeQuoteError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "GetReservedInstancesExchangeQuote");
        params.put("Version", "2016-11-15");
        GetReservedInstancesExchangeQuoteRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = GetReservedInstancesExchangeQuoteResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(GetReservedInstancesExchangeQuoteResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetReservedInstancesExchangeQuoteError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI). For more information, see <a href=\"http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html\">Importing a VM as an Image Using VM Import/Export</a> in the <i>VM Import/Export User Guide</i>.</p>"]
    fn import_image(&self,
                    input: &ImportImageRequest)
                    -> Result<ImportImageResult, ImportImageError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ImportImage");
        params.put("Version", "2016-11-15");
        ImportImageRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ImportImageResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ImportImageResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ImportImageError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates an import instance task using metadata from the specified disk image. <code>ImportInstance</code> only supports single-volume VMs. To import multi-volume VMs, use <a>ImportImage</a>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html\">Importing a Virtual Machine Using the Amazon EC2 CLI</a>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    fn import_instance(&self,
                       input: &ImportInstanceRequest)
                       -> Result<ImportInstanceResult, ImportInstanceError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ImportInstance");
        params.put("Version", "2016-11-15");
        ImportInstanceRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ImportInstanceResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ImportInstanceResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ImportInstanceError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with <a>CreateKeyPair</a>, in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.</p> <p>For more information about key pairs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn import_key_pair(&self,
                       input: &ImportKeyPairRequest)
                       -> Result<ImportKeyPairResult, ImportKeyPairError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ImportKeyPair");
        params.put("Version", "2016-11-15");
        ImportKeyPairRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ImportKeyPairResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ImportKeyPairResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ImportKeyPairError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Imports a disk into an EBS snapshot.</p>"]
    fn import_snapshot(&self,
                       input: &ImportSnapshotRequest)
                       -> Result<ImportSnapshotResult, ImportSnapshotError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ImportSnapshot");
        params.put("Version", "2016-11-15");
        ImportSnapshotRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ImportSnapshotResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ImportSnapshotResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ImportSnapshotError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates an import volume task using metadata from the specified disk image.For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/importing-your-volumes-into-amazon-ebs.html\">Importing Disks to Amazon EBS</a>.</p> <p>For information about the import manifest referenced by this API action, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html\">VM Import Manifest</a>.</p>"]
    fn import_volume(&self,
                     input: &ImportVolumeRequest)
                     -> Result<ImportVolumeResult, ImportVolumeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ImportVolume");
        params.put("Version", "2016-11-15");
        ImportVolumeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ImportVolumeResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ImportVolumeResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ImportVolumeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, AWS will place instances that you launch with a tenancy of <code>host</code>, but without targeting a specific host ID, onto any available Dedicated Host in your account which has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID if you want the instance to launch onto a specific host. If no host ID is provided, the instance will be launched onto a suitable host which has auto-placement enabled.</p>"]
    fn modify_hosts(&self,
                    input: &ModifyHostsRequest)
                    -> Result<ModifyHostsResult, ModifyHostsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyHosts");
        params.put("Version", "2016-11-15");
        ModifyHostsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ModifyHostsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ModifyHostsResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyHostsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the ID format for the specified resource on a per-region basis. You can specify that resources should receive longer IDs (17-character IDs) when they are created. The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>.</p> <p>This setting applies to the IAM user who makes the request; it does not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user. If you're using this action as the root user, then these settings apply to the entire account, unless an IAM user explicitly overrides these settings for themselves. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html\">Resource IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p> <p>Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant <code>Describe</code> command for the resource type.</p>"]
    fn modify_id_format(&self, input: &ModifyIdFormatRequest) -> Result<(), ModifyIdFormatError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyIdFormat");
        params.put("Version", "2016-11-15");
        ModifyIdFormatRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyIdFormatError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account. You can specify that resources should receive longer IDs (17-character IDs) when they are created. </p> <p>The following resource types support longer IDs: <code>instance</code> | <code>reservation</code> | <code>snapshot</code> | <code>volume</code>. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html\">Resource IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. </p> <p>This setting applies to the principal specified in the request; it does not apply to the principal that makes the request. </p> <p>Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant <code>Describe</code> command for the resource type.</p>"]
    fn modify_identity_id_format(&self,
                                 input: &ModifyIdentityIdFormatRequest)
                                 -> Result<(), ModifyIdentityIdFormatError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyIdentityIdFormat");
        params.put("Version", "2016-11-15");
        ModifyIdentityIdFormatRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyIdentityIdFormatError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.</p> <note> <p>AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.</p> </note> <note> <p>The SriovNetSupport enhanced networking attribute cannot be changed using this command. Instead, enable SriovNetSupport on an instance and create an AMI from the instance. This will result in an image with SriovNetSupport enabled.</p> </note>"]
    fn modify_image_attribute(&self,
                              input: &ModifyImageAttributeRequest)
                              -> Result<(), ModifyImageAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyImageAttribute");
        params.put("Version", "2016-11-15");
        ModifyImageAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyImageAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.</p> <p>To modify some attributes, the instance must be stopped. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html\">Modifying Attributes of a Stopped Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn modify_instance_attribute(&self,
                                 input: &ModifyInstanceAttributeRequest)
                                 -> Result<(), ModifyInstanceAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyInstanceAttribute");
        params.put("Version", "2016-11-15");
        ModifyInstanceAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyInstanceAttributeError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Set the instance affinity value for a specific stopped instance and modify the instance tenancy setting.</p> <p>Instance affinity is disabled by default. When instance affinity is <code>host</code> and it is not associated with a specific Dedicated Host, the next time it is launched it will automatically be associated with the host it lands on. This relationship will persist if the instance is stopped/started, or rebooted.</p> <p>You can modify the host ID associated with a stopped instance. If a stopped instance has a new host ID association, the instance will target that host when restarted.</p> <p>You can modify the tenancy of a stopped instance with a tenancy of <code>host</code> or <code>dedicated</code>.</p> <p>Affinity, hostID, and tenancy are not required parameters, but at least one of them must be specified in the request. Affinity and tenancy can be modified in the same request, but tenancy can only be modified on instances that are stopped.</p>"]
    fn modify_instance_placement
        (&self,
         input: &ModifyInstancePlacementRequest)
         -> Result<ModifyInstancePlacementResult, ModifyInstancePlacementError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyInstancePlacement");
        params.put("Version", "2016-11-15");
        ModifyInstancePlacementRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ModifyInstancePlacementResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ModifyInstancePlacementResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyInstancePlacementError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the specified network interface attribute. You can specify only one attribute at a time.</p>"]
    fn modify_network_interface_attribute(&self,
                                          input: &ModifyNetworkInterfaceAttributeRequest)
                                          -> Result<(), ModifyNetworkInterfaceAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyNetworkInterfaceAttribute");
        params.put("Version", "2016-11-15");
        ModifyNetworkInterfaceAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyNetworkInterfaceAttributeError::from_body(String::from_utf8_lossy(&body)
                                                                        .as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Standard Reserved Instances. The Reserved Instances to be modified must be identical, except for Availability Zone, network platform, and instance type.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html\">Modifying Reserved Instances</a> in the Amazon Elastic Compute Cloud User Guide.</p>"]
    fn modify_reserved_instances
        (&self,
         input: &ModifyReservedInstancesRequest)
         -> Result<ModifyReservedInstancesResult, ModifyReservedInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyReservedInstances");
        params.put("Version", "2016-11-15");
        ModifyReservedInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ModifyReservedInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ModifyReservedInstancesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyReservedInstancesError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single API call. If you need to both add and remove account IDs for a snapshot, you must use multiple API calls.</p> <note> <p>Encrypted snapshots and snapshots with AWS Marketplace product codes cannot be made public. Snapshots encrypted with your default CMK cannot be shared with other accounts.</p> </note> <p>For more information on modifying snapshot permissions, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html\">Sharing Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn modify_snapshot_attribute(&self,
                                 input: &ModifySnapshotAttributeRequest)
                                 -> Result<(), ModifySnapshotAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifySnapshotAttribute");
        params.put("Version", "2016-11-15");
        ModifySnapshotAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifySnapshotAttributeError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the specified Spot fleet request.</p> <p>While the Spot fleet request is being modified, it is in the <code>modifying</code> state.</p> <p>To scale up your Spot fleet, increase its target capacity. The Spot fleet launches the additional Spot instances according to the allocation strategy for the Spot fleet request. If the allocation strategy is <code>lowestPrice</code>, the Spot fleet launches instances using the Spot pool with the lowest price. If the allocation strategy is <code>diversified</code>, the Spot fleet distributes the instances across the Spot pools.</p> <p>To scale down your Spot fleet, decrease its target capacity. First, the Spot fleet cancels any open bids that exceed the new target capacity. You can request that the Spot fleet terminate Spot instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is <code>lowestPrice</code>, the Spot fleet terminates the instances with the highest price per unit. If the allocation strategy is <code>diversified</code>, the Spot fleet terminates instances across the Spot pools. Alternatively, you can request that the Spot fleet keep the fleet at its current size, but not replace any Spot instances that are interrupted or that you terminate manually.</p>"]
    fn modify_spot_fleet_request
        (&self,
         input: &ModifySpotFleetRequestRequest)
         -> Result<ModifySpotFleetRequestResponse, ModifySpotFleetRequestError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifySpotFleetRequest");
        params.put("Version", "2016-11-15");
        ModifySpotFleetRequestRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ModifySpotFleetRequestResponse::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ModifySpotFleetRequestResponseDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifySpotFleetRequestError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies a subnet attribute. You can only modify one attribute at a time.</p>"]
    fn modify_subnet_attribute(&self,
                               input: &ModifySubnetAttributeRequest)
                               -> Result<(), ModifySubnetAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifySubnetAttribute");
        params.put("Version", "2016-11-15");
        ModifySubnetAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifySubnetAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>You can modify several parameters of an existing EBS volume, including volume size, volume type, and IOPS capacity. If your EBS volume is attached to a current-generation EC2 instance type, you may be able to apply these changes without stopping the instance or detaching the volume from it. For more information about modifying an EBS volume running Linux, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Linux</a>. For more information about modifying an EBS volume running Windows, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Windows</a>. </p> <p> When you complete a resize operation on your volume, you need to extend the volume's file-system size to take advantage of the new storage capacity. For information about extending a Linux file system, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux\">Extending a Linux File System</a>. For information about extending a Windows file system, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows\">Extending a Windows File System</a>. </p> <p> You can use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the <a href=\"http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/\">Amazon CloudWatch Events User Guide</a>. You can also track the status of a modification using the <a>DescribeVolumesModifications</a> API. For information about tracking status changes using either method, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods\">Monitoring Volume Modifications</a>. </p> <note> <p>With previous-generation instance types, resizing an EBS volume may require detaching and reattaching the volume or stopping and restarting the instance. For more information about modifying an EBS volume running Linux, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Linux</a>. For more information about modifying an EBS volume running Windows, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html\">Modifying the Size, IOPS, or Type of an EBS Volume on Windows</a>.</p> </note> <note> <p>If you reach the maximum volume modification rate per volume limit, you will need to wait at least six hours before applying further modifications to the affected EBS volume.</p> </note>"]
    fn modify_volume(&self,
                     input: &ModifyVolumeRequest)
                     -> Result<ModifyVolumeResult, ModifyVolumeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyVolume");
        params.put("Version", "2016-11-15");
        ModifyVolumeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ModifyVolumeResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ModifyVolumeResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyVolumeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies a volume attribute.</p> <p>By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.</p> <p>You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.</p>"]
    fn modify_volume_attribute(&self,
                               input: &ModifyVolumeAttributeRequest)
                               -> Result<(), ModifyVolumeAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyVolumeAttribute");
        params.put("Version", "2016-11-15");
        ModifyVolumeAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyVolumeAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the specified attribute of the specified VPC.</p>"]
    fn modify_vpc_attribute(&self,
                            input: &ModifyVpcAttributeRequest)
                            -> Result<(), ModifyVpcAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyVpcAttribute");
        params.put("Version", "2016-11-15");
        ModifyVpcAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyVpcAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies attributes of a specified VPC endpoint. You can modify the policy associated with the endpoint, and you can add and remove route tables associated with the endpoint.</p>"]
    fn modify_vpc_endpoint(&self,
                           input: &ModifyVpcEndpointRequest)
                           -> Result<ModifyVpcEndpointResult, ModifyVpcEndpointError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyVpcEndpoint");
        params.put("Version", "2016-11-15");
        ModifyVpcEndpointRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ModifyVpcEndpointResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(ModifyVpcEndpointResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyVpcEndpointError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:</p> <ul> <li> <p>Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC.</p> </li> <li> <p>Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC.</p> </li> <li> <p>Enable/disable a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.</p> </li> </ul> <p>If the peered VPCs are in different accounts, each owner must initiate a separate request to modify the peering connection options, depending on whether their VPC was the requester or accepter for the VPC peering connection. If the peered VPCs are in the same account, you can modify the requester and accepter options in the same request. To confirm which VPC is the accepter and requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a> command.</p>"]
    fn modify_vpc_peering_connection_options
        (&self,
         input: &ModifyVpcPeeringConnectionOptionsRequest)
         -> Result<ModifyVpcPeeringConnectionOptionsResult, ModifyVpcPeeringConnectionOptionsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ModifyVpcPeeringConnectionOptions");
        params.put("Version", "2016-11-15");
        ModifyVpcPeeringConnectionOptionsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ModifyVpcPeeringConnectionOptionsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ModifyVpcPeeringConnectionOptionsResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ModifyVpcPeeringConnectionOptionsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html\">Monitoring Your Instances and Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>To disable detailed monitoring, see .</p>"]
    fn monitor_instances(&self,
                         input: &MonitorInstancesRequest)
                         -> Result<MonitorInstancesResult, MonitorInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "MonitorInstances");
        params.put("Version", "2016-11-15");
        MonitorInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = MonitorInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(MonitorInstancesResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(MonitorInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the <a>RestoreAddressToClassic</a> request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform. </p>"]
    fn move_address_to_vpc(&self,
                           input: &MoveAddressToVpcRequest)
                           -> Result<MoveAddressToVpcResult, MoveAddressToVpcError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "MoveAddressToVpc");
        params.put("Version", "2016-11-15");
        MoveAddressToVpcRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = MoveAddressToVpcResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(MoveAddressToVpcResultDeserializer::deserialize(&actual_tag_name,
                                                                             &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(MoveAddressToVpcError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.</p>"]
    fn purchase_host_reservation
        (&self,
         input: &PurchaseHostReservationRequest)
         -> Result<PurchaseHostReservationResult, PurchaseHostReservationError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "PurchaseHostReservation");
        params.put("Version", "2016-11-15");
        PurchaseHostReservationRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = PurchaseHostReservationResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(PurchaseHostReservationResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(PurchaseHostReservationError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.</p> <p>Use <a>DescribeReservedInstancesOfferings</a> to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with <a>DescribeReservedInstances</a>.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html\">Reserved Instances</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html\">Reserved Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn purchase_reserved_instances_offering
        (&self,
         input: &PurchaseReservedInstancesOfferingRequest)
         -> Result<PurchaseReservedInstancesOfferingResult, PurchaseReservedInstancesOfferingError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "PurchaseReservedInstancesOffering");
        params.put("Version", "2016-11-15");
        PurchaseReservedInstancesOfferingRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = PurchaseReservedInstancesOfferingResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(PurchaseReservedInstancesOfferingResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(PurchaseReservedInstancesOfferingError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Purchases one or more Scheduled Instances with the specified schedule.</p> <p>Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call <a>DescribeScheduledInstanceAvailability</a> to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call <a>RunScheduledInstances</a> during each scheduled time period.</p> <p>After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.</p>"]
    fn purchase_scheduled_instances
        (&self,
         input: &PurchaseScheduledInstancesRequest)
         -> Result<PurchaseScheduledInstancesResult, PurchaseScheduledInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "PurchaseScheduledInstances");
        params.put("Version", "2016-11-15");
        PurchaseScheduledInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = PurchaseScheduledInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(PurchaseScheduledInstancesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(PurchaseScheduledInstancesError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.</p> <p>If an instance does not cleanly shut down within four minutes, Amazon EC2 performs a hard reboot.</p> <p>For more information about troubleshooting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html\">Getting Console Output and Rebooting Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn reboot_instances(&self, input: &RebootInstancesRequest) -> Result<(), RebootInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RebootInstances");
        params.put("Version", "2016-11-15");
        RebootInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RebootInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html\">Creating Your Own AMIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <note> <p>For Amazon EBS-backed instances, <a>CreateImage</a> creates and registers the AMI in a single request, so you don't have to register the AMI yourself.</p> </note> <p>You can also use <code>RegisterImage</code> to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html\">Launching a Linux Instance from a Backup</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.</p> <p>Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure. To create an AMI that must retain billing codes, see <a>CreateImage</a>.</p> <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.</p>"]
    fn register_image(&self,
                      input: &RegisterImageRequest)
                      -> Result<RegisterImageResult, RegisterImageError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RegisterImage");
        params.put("Version", "2016-11-15");
        RegisterImageRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = RegisterImageResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(RegisterImageResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RegisterImageError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Rejects a VPC peering connection request. The VPC peering connection must be in the <code>pending-acceptance</code> state. Use the <a>DescribeVpcPeeringConnections</a> request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use <a>DeleteVpcPeeringConnection</a>.</p>"]
    fn reject_vpc_peering_connection
        (&self,
         input: &RejectVpcPeeringConnectionRequest)
         -> Result<RejectVpcPeeringConnectionResult, RejectVpcPeeringConnectionError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RejectVpcPeeringConnection");
        params.put("Version", "2016-11-15");
        RejectVpcPeeringConnectionRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = RejectVpcPeeringConnectionResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(RejectVpcPeeringConnectionResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RejectVpcPeeringConnectionError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Releases the specified Elastic IP address.</p> <p>[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use <a>DisassociateAddress</a>.</p> <p>[Nondefault VPC] You must use <a>DisassociateAddress</a> to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (<code>InvalidIPAddress.InUse</code>).</p> <p>After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an <code>AuthFailure</code> error if the address is already allocated to another AWS account.</p> <p>[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see <a>AllocateAddress</a>.</p>"]
    fn release_address(&self, input: &ReleaseAddressRequest) -> Result<(), ReleaseAddressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReleaseAddress");
        params.put("Version", "2016-11-15");
        ReleaseAddressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReleaseAddressError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand billing is stopped and the host goes into <code>released</code> state. The host ID of Dedicated Hosts that have been released can no longer be specified in another request, e.g., ModifyHosts. You must stop or terminate all instances on a host before it can be released.</p> <p>When Dedicated Hosts are released, it make take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated hosts. Try waiting a few minutes, and then try again.</p> <p>Released hosts will still appear in a <a>DescribeHosts</a> response.</p>"]
    fn release_hosts(&self,
                     input: &ReleaseHostsRequest)
                     -> Result<ReleaseHostsResult, ReleaseHostsError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReleaseHosts");
        params.put("Version", "2016-11-15");
        ReleaseHostsRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ReleaseHostsResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ReleaseHostsResultDeserializer::deserialize(&actual_tag_name,
                                                                              &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReleaseHostsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.</p> <p>Use <a>DescribeIamInstanceProfileAssociations</a> to get the association ID.</p>"]
    fn replace_iam_instance_profile_association
        (&self,
         input: &ReplaceIamInstanceProfileAssociationRequest)
         -> Result<ReplaceIamInstanceProfileAssociationResult,
                   ReplaceIamInstanceProfileAssociationError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReplaceIamInstanceProfileAssociation");
        params.put("Version", "2016-11-15");
        ReplaceIamInstanceProfileAssociationRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ReplaceIamInstanceProfileAssociationResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ReplaceIamInstanceProfileAssociationResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReplaceIamInstanceProfileAssociationError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn replace_network_acl_association
        (&self,
         input: &ReplaceNetworkAclAssociationRequest)
         -> Result<ReplaceNetworkAclAssociationResult, ReplaceNetworkAclAssociationError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReplaceNetworkAclAssociation");
        params.put("Version", "2016-11-15");
        ReplaceNetworkAclAssociationRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ReplaceNetworkAclAssociationResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ReplaceNetworkAclAssociationResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReplaceNetworkAclAssociationError::from_body(String::from_utf8_lossy(&body)
                                                                     .as_ref()))
            }
        }
    }


    #[doc="<p>Replaces an entry (rule) in a network ACL. For more information about network ACLs, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html\">Network ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn replace_network_acl_entry(&self,
                                 input: &ReplaceNetworkAclEntryRequest)
                                 -> Result<(), ReplaceNetworkAclEntryError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReplaceNetworkAclEntry");
        params.put("Version", "2016-11-15");
        ReplaceNetworkAclEntryRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReplaceNetworkAclEntryError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.</p> <p>For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn replace_route(&self, input: &ReplaceRouteRequest) -> Result<(), ReplaceRouteError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReplaceRoute");
        params.put("Version", "2016-11-15");
        ReplaceRouteRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReplaceRouteError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Changes the route table associated with a given subnet in a VPC. After the operation completes, the subnet uses the routes in the new route table it's associated with. For more information about route tables, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html\">Route Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p> <p>You can also use ReplaceRouteTableAssociation to change which table is the main route table in the VPC. You just specify the main route table's association ID and the route table to be the new main route table.</p>"]
    fn replace_route_table_association
        (&self,
         input: &ReplaceRouteTableAssociationRequest)
         -> Result<ReplaceRouteTableAssociationResult, ReplaceRouteTableAssociationError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReplaceRouteTableAssociation");
        params.put("Version", "2016-11-15");
        ReplaceRouteTableAssociationRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = ReplaceRouteTableAssociationResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ReplaceRouteTableAssociationResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReplaceRouteTableAssociationError::from_body(String::from_utf8_lossy(&body)
                                                                     .as_ref()))
            }
        }
    }


    #[doc="<p>Submits feedback about the status of an instance. The instance must be in the <code>running</code> state. If your experience with the instance differs from the instance status returned by <a>DescribeInstanceStatus</a>, use <a>ReportInstanceStatus</a> to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.</p> <p>Use of this action does not change the value returned by <a>DescribeInstanceStatus</a>.</p>"]
    fn report_instance_status(&self,
                              input: &ReportInstanceStatusRequest)
                              -> Result<(), ReportInstanceStatusError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ReportInstanceStatus");
        params.put("Version", "2016-11-15");
        ReportInstanceStatusRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ReportInstanceStatusError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a Spot fleet request.</p> <p>You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.</p> <p>By default, the Spot fleet requests Spot instances in the Spot pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.</p> <p>Alternatively, you can specify that the Spot fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot instances in your Spot fleet are in different Spot pools, you can improve the availability of your fleet.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html\">Spot Fleet Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn request_spot_fleet(&self,
                          input: &RequestSpotFleetRequest)
                          -> Result<RequestSpotFleetResponse, RequestSpotFleetError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RequestSpotFleet");
        params.put("Version", "2016-11-15");
        RequestSpotFleetRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = RequestSpotFleetResponse::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(RequestSpotFleetResponseDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RequestSpotFleetError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a Spot instance request. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot Instance capacity and current Spot instance requests. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html\">Spot Instance Requests</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn request_spot_instances(&self,
                              input: &RequestSpotInstancesRequest)
                              -> Result<RequestSpotInstancesResult, RequestSpotInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RequestSpotInstances");
        params.put("Version", "2016-11-15");
        RequestSpotInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = RequestSpotInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(RequestSpotInstancesResultDeserializer::deserialize(&actual_tag_name,
                                                                                 &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RequestSpotInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Resets an attribute of an AMI to its default value.</p> <note> <p>The productCodes attribute can't be reset.</p> </note>"]
    fn reset_image_attribute(&self,
                             input: &ResetImageAttributeRequest)
                             -> Result<(), ResetImageAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ResetImageAttribute");
        params.put("Version", "2016-11-15");
        ResetImageAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ResetImageAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Resets an attribute of an instance to its default value. To reset the <code>kernel</code> or <code>ramdisk</code>, the instance must be in a stopped state. To reset the <code>sourceDestCheck</code>, the instance can be either running or stopped.</p> <p>The <code>sourceDestCheck</code> attribute controls whether source/destination checking is enabled. The default value is <code>true</code>, which means checking is enabled. This value must be <code>false</code> for a NAT instance to perform NAT. For more information, see <a href=\"http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html\">NAT Instances</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>"]
    fn reset_instance_attribute(&self,
                                input: &ResetInstanceAttributeRequest)
                                -> Result<(), ResetInstanceAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ResetInstanceAttribute");
        params.put("Version", "2016-11-15");
        ResetInstanceAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ResetInstanceAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Resets a network interface attribute. You can specify only one attribute at a time.</p>"]
    fn reset_network_interface_attribute(&self,
                                         input: &ResetNetworkInterfaceAttributeRequest)
                                         -> Result<(), ResetNetworkInterfaceAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ResetNetworkInterfaceAttribute");
        params.put("Version", "2016-11-15");
        ResetNetworkInterfaceAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ResetNetworkInterfaceAttributeError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Resets permission settings for the specified snapshot.</p> <p>For more information on modifying snapshot permissions, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html\">Sharing Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn reset_snapshot_attribute(&self,
                                input: &ResetSnapshotAttributeRequest)
                                -> Result<(), ResetSnapshotAttributeError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "ResetSnapshotAttribute");
        params.put("Version", "2016-11-15");
        ResetSnapshotAttributeRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ResetSnapshotAttributeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.</p>"]
    fn restore_address_to_classic
        (&self,
         input: &RestoreAddressToClassicRequest)
         -> Result<RestoreAddressToClassicResult, RestoreAddressToClassicError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RestoreAddressToClassic");
        params.put("Version", "2016-11-15");
        RestoreAddressToClassicRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = RestoreAddressToClassicResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(RestoreAddressToClassicResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RestoreAddressToClassicError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>[EC2-VPC only] Removes one or more egress rules from a security group for EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be revoked.</p> <p>Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.</p> <p>Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.</p>"]
    fn revoke_security_group_egress(&self,
                                    input: &RevokeSecurityGroupEgressRequest)
                                    -> Result<(), RevokeSecurityGroupEgressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RevokeSecurityGroupEgress");
        params.put("Version", "2016-11-15");
        RevokeSecurityGroupEgressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RevokeSecurityGroupEgressError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }


    #[doc="<p>Removes one or more ingress rules from a security group. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be removed.</p> <note> <p>[EC2-Classic security groups only] If the values you specify do not match the existing rule's values, no error is returned. Use <a>DescribeSecurityGroups</a> to verify that the rule has been removed.</p> </note> <p>Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.</p> <p>Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.</p>"]
    fn revoke_security_group_ingress(&self,
                                     input: &RevokeSecurityGroupIngressRequest)
                                     -> Result<(), RevokeSecurityGroupIngressError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RevokeSecurityGroupIngress");
        params.put("Version", "2016-11-15");
        RevokeSecurityGroupIngressRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RevokeSecurityGroupIngressError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Launches the specified number of instances using an AMI for which you have permissions. </p> <p>You can specify a number of options, or leave the default options. The following rules apply:</p> <ul> <li> <p>[EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.</p> </li> <li> <p>[EC2-Classic] If don't specify an Availability Zone, we choose one for you.</p> </li> <li> <p>Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types\">Instance Types Available Only in a VPC</a>.</p> </li> <li> <p>[EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet.</p> </li> <li> <p>Not all instance types support IPv6 addresses. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html\">Instance Types</a>.</p> </li> <li> <p>If you don't specify a security group ID, we use the default security group. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html\">Security Groups</a>.</p> </li> <li> <p>If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.</p> </li> </ul> <p>To ensure faster instance launches, break up large requests into smaller batches. For example, create 5 separate launch requests for 100 instances each instead of 1 launch request for 500 instances.</p> <p>An instance is ready for you to use when it's in the <code>running</code> state. You can check the state of your instance using <a>DescribeInstances</a>. You can tag instances and EBS volumes during launch, after launch, or both. For more information, see <a>CreateTags</a> and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html\">Tagging Your Amazon EC2 Resources</a>.</p> <p>Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html\">Key Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>For troubleshooting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html\">What To Do If An Instance Immediately Terminates</a>, and <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html\">Troubleshooting Connecting to Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn run_instances(&self, input: &RunInstancesRequest) -> Result<Reservation, RunInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RunInstances");
        params.put("Version", "2016-11-15");
        RunInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = Reservation::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(ReservationDeserializer::deserialize(&actual_tag_name,
                                                                       &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RunInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Launches the specified Scheduled Instances.</p> <p>Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using <a>PurchaseScheduledInstances</a>.</p> <p>You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html\">Scheduled Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn run_scheduled_instances
        (&self,
         input: &RunScheduledInstancesRequest)
         -> Result<RunScheduledInstancesResult, RunScheduledInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "RunScheduledInstances");
        params.put("Version", "2016-11-15");
        RunScheduledInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = RunScheduledInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(RunScheduledInstancesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(RunScheduledInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Starts an Amazon EBS-backed AMI that you've previously stopped.</p> <p>Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.</p> <p>Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.</p> <p>Performing this operation on an instance that uses an instance store as its root device returns an error.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html\">Stopping Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn start_instances(&self,
                       input: &StartInstancesRequest)
                       -> Result<StartInstancesResult, StartInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "StartInstances");
        params.put("Version", "2016-11-15");
        StartInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = StartInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(StartInstancesResultDeserializer::deserialize(&actual_tag_name,
                                                                                &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(StartInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Stops an Amazon EBS-backed instance.</p> <p>We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.</p> <p>You can't start or stop Spot instances, and you can't stop instance store-backed instances.</p> <p>When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.</p> <p>Stopping an instance is different to rebooting or terminating it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html\">Instance Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html\">Troubleshooting Stopping Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn stop_instances(&self,
                      input: &StopInstancesRequest)
                      -> Result<StopInstancesResult, StopInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "StopInstances");
        params.put("Version", "2016-11-15");
        StopInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = StopInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(StopInstancesResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(StopInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds. </p> <p>If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.</p> <p>Terminated instances remain visible after termination (for approximately one hour).</p> <p>By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.</p> <p>You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the <code>DeleteOnTermination</code> block device mapping parameter set to <code>true</code> are automatically deleted. For more information about the differences between stopping and terminating instances, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html\">Instance Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> <p>For more information about troubleshooting, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html\">Troubleshooting Terminating Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn terminate_instances(&self,
                           input: &TerminateInstancesRequest)
                           -> Result<TerminateInstancesResult, TerminateInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "TerminateInstances");
        params.put("Version", "2016-11-15");
        TerminateInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = TerminateInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(TerminateInstancesResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(TerminateInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Unassigns one or more IPv6 addresses from a network interface.</p>"]
    fn unassign_ipv_6_addresses
        (&self,
         input: &UnassignIpv6AddressesRequest)
         -> Result<UnassignIpv6AddressesResult, UnassignIpv6AddressesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "UnassignIpv6Addresses");
        params.put("Version", "2016-11-15");
        UnassignIpv6AddressesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = UnassignIpv6AddressesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result = try!(UnassignIpv6AddressesResultDeserializer::deserialize(&actual_tag_name, &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(UnassignIpv6AddressesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Unassigns one or more secondary private IP addresses from a network interface.</p>"]
    fn unassign_private_ip_addresses(&self,
                                     input: &UnassignPrivateIpAddressesRequest)
                                     -> Result<(), UnassignPrivateIpAddressesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "UnassignPrivateIpAddresses");
        params.put("Version", "2016-11-15");
        UnassignPrivateIpAddressesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {
                let result = ();
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(UnassignPrivateIpAddressesError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Disables detailed monitoring for a running instance. For more information, see <a href=\"http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html\">Monitoring Your Instances and Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"]
    fn unmonitor_instances(&self,
                           input: &UnmonitorInstancesRequest)
                           -> Result<UnmonitorInstancesResult, UnmonitorInstancesError> {
        let mut request = SignedRequest::new("POST", "ec2", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "UnmonitorInstances");
        params.put("Version", "2016-11-15");
        UnmonitorInstancesRequestSerializer::serialize(&mut params, "", &input);
        request.set_params(params);

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);
        let mut response = try!(self.dispatcher.dispatch(&request));
        match response.status {
            StatusCode::Ok => {

                let result;
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));

                if body.is_empty() {
                    result = UnmonitorInstancesResult::default();
                } else {
                    let reader = EventReader::new_with_config(body.as_slice(),
                                                              ParserConfig::new()
                                                                  .trim_whitespace(true));
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = try!(peek_at_name(&mut stack));
                    result =
                        try!(UnmonitorInstancesResultDeserializer::deserialize(&actual_tag_name,
                                                                               &mut stack));
                }
                Ok(result)
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(UnmonitorInstancesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }
}

#[cfg(test)]
mod protocol_tests {

    extern crate rusoto_mock;

    use super::*;
    use self::rusoto_mock::*;
    use rusoto_core::Region as rusoto_region;


    #[test]
    fn test_parse_error_ec_2_describe_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/error",
                                                              "ec2-describe-instances.xml");
        let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeInstancesRequest::default();
        let result = client.describe_instances(&request);
        assert!(!result.is_ok(), "parse error: {:?}", result);
    }

    #[test]
    fn test_parse_valid_ec_2_allocate_address() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-allocate-address.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = AllocateAddressRequest::default();
        let result = client.allocate_address(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_assign_private_ip_addresses() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-assign-private-ip-addresses.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = AssignPrivateIpAddressesRequest::default();
        let result = client.assign_private_ip_addresses(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_associate_address() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-associate-address.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = AssociateAddressRequest::default();
        let result = client.associate_address(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_associate_route_table() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-associate-route-table.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = AssociateRouteTableRequest::default();
        let result = client.associate_route_table(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_attach_volume() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-attach-volume.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = AttachVolumeRequest::default();
        let result = client.attach_volume(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_attach_vpn_gateway() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-attach-vpn-gateway.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = AttachVpnGatewayRequest::default();
        let result = client.attach_vpn_gateway(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_bundle_instance() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-bundle-instance.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = BundleInstanceRequest::default();
        let result = client.bundle_instance(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_cancel_bundle_task() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-cancel-bundle-task.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CancelBundleTaskRequest::default();
        let result = client.cancel_bundle_task(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_cancel_reserved_instances_listing() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-cancel-reserved-instances-listing.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CancelReservedInstancesListingRequest::default();
        let result = client.cancel_reserved_instances_listing(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_cancel_spot_instance_requests() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-cancel-spot-instance-requests.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CancelSpotInstanceRequestsRequest::default();
        let result = client.cancel_spot_instance_requests(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_confirm_product_instance() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-confirm-product-instance.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = ConfirmProductInstanceRequest::default();
        let result = client.confirm_product_instance(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_copy_snapshot() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-copy-snapshot.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CopySnapshotRequest::default();
        let result = client.copy_snapshot(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_customer_gateway() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-customer-gateway.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateCustomerGatewayRequest::default();
        let result = client.create_customer_gateway(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_dhcp_options() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-dhcp-options.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateDhcpOptionsRequest::default();
        let result = client.create_dhcp_options(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_instance_export_task() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-instance-export-task.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateInstanceExportTaskRequest::default();
        let result = client.create_instance_export_task(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_key_pair() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-key-pair.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateKeyPairRequest::default();
        let result = client.create_key_pair(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_network_acl() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-network-acl.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateNetworkAclRequest::default();
        let result = client.create_network_acl(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_network_interface() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-network-interface.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateNetworkInterfaceRequest::default();
        let result = client.create_network_interface(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_reserved_instances_listing() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-reserved-instances-listing.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateReservedInstancesListingRequest::default();
        let result = client.create_reserved_instances_listing(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_route_table() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-route-table.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateRouteTableRequest::default();
        let result = client.create_route_table(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_snapshot() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-snapshot.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateSnapshotRequest::default();
        let result = client.create_snapshot(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_spot_datafeed_subscription() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-spot-datafeed-subscription.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateSpotDatafeedSubscriptionRequest::default();
        let result = client.create_spot_datafeed_subscription(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_subnet() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-subnet.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateSubnetRequest::default();
        let result = client.create_subnet(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_volume() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-volume.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateVolumeRequest::default();
        let result = client.create_volume(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_vpc() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-vpc.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateVpcRequest::default();
        let result = client.create_vpc(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_create_vpn_gateway() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-create-vpn-gateway.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = CreateVpnGatewayRequest::default();
        let result = client.create_vpn_gateway(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_delete_internet_gateway() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-delete-internet-gateway.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DeleteInternetGatewayRequest::default();
        let result = client.delete_internet_gateway(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_account_attributes() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-account-attributes.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeAccountAttributesRequest::default();
        let result = client.describe_account_attributes(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_addresses() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-addresses.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeAddressesRequest::default();
        let result = client.describe_addresses(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_availability_zones() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-availability-zones.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeAvailabilityZonesRequest::default();
        let result = client.describe_availability_zones(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_bundle_tasks() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-bundle-tasks.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeBundleTasksRequest::default();
        let result = client.describe_bundle_tasks(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_customer_gateways() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-customer-gateways.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeCustomerGatewaysRequest::default();
        let result = client.describe_customer_gateways(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_dhcp_options() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-dhcp-options.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeDhcpOptionsRequest::default();
        let result = client.describe_dhcp_options(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_export_tasks() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-export-tasks.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeExportTasksRequest::default();
        let result = client.describe_export_tasks(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_instance_attribute() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-instance-attribute.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeInstanceAttributeRequest::default();
        let result = client.describe_instance_attribute(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_instance_status() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-instance-status.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeInstanceStatusRequest::default();
        let result = client.describe_instance_status(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeInstancesRequest::default();
        let result = client.describe_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_internet_gateways() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-internet-gateways.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeInternetGatewaysRequest::default();
        let result = client.describe_internet_gateways(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_key_pairs() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-key-pairs.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeKeyPairsRequest::default();
        let result = client.describe_key_pairs(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_network_acls() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-network-acls.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeNetworkAclsRequest::default();
        let result = client.describe_network_acls(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_network_interfaces() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-network-interfaces.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeNetworkInterfacesRequest::default();
        let result = client.describe_network_interfaces(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_placement_groups() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-placement-groups.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribePlacementGroupsRequest::default();
        let result = client.describe_placement_groups(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_regions() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-regions.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeRegionsRequest::default();
        let result = client.describe_regions(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_reserved_instances_offerings() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-reserved-instances-offerings.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeReservedInstancesOfferingsRequest::default();
        let result = client.describe_reserved_instances_offerings(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_reserved_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-reserved-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeReservedInstancesRequest::default();
        let result = client.describe_reserved_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_route_tables() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-route-tables.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeRouteTablesRequest::default();
        let result = client.describe_route_tables(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_security_groups() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-security-groups.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeSecurityGroupsRequest::default();
        let result = client.describe_security_groups(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_snapshots() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-snapshots.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeSnapshotsRequest::default();
        let result = client.describe_snapshots(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_spot_instance_requests() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-spot-instance-requests.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeSpotInstanceRequestsRequest::default();
        let result = client.describe_spot_instance_requests(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_spot_price_history() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-spot-price-history.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeSpotPriceHistoryRequest::default();
        let result = client.describe_spot_price_history(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_subnets() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-subnets.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeSubnetsRequest::default();
        let result = client.describe_subnets(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_tags() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-tags.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeTagsRequest::default();
        let result = client.describe_tags(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_volume_status() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-volume-status.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeVolumeStatusRequest::default();
        let result = client.describe_volume_status(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_volumes() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-volumes.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeVolumesRequest::default();
        let result = client.describe_volumes(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_vpcs() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-vpcs.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeVpcsRequest::default();
        let result = client.describe_vpcs(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_vpn_connections() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-vpn-connections.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeVpnConnectionsRequest::default();
        let result = client.describe_vpn_connections(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_describe_vpn_gateways() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-describe-vpn-gateways.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DescribeVpnGatewaysRequest::default();
        let result = client.describe_vpn_gateways(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_detach_network_interface() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-detach-network-interface.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DetachNetworkInterfaceRequest::default();
        let result = client.detach_network_interface(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_detach_volume() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-detach-volume.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = DetachVolumeRequest::default();
        let result = client.detach_volume(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_get_password_data() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-get-password-data.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = GetPasswordDataRequest::default();
        let result = client.get_password_data(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_import_instance() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-import-instance.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = ImportInstanceRequest::default();
        let result = client.import_instance(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_import_key_pair() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-import-key-pair.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = ImportKeyPairRequest::default();
        let result = client.import_key_pair(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_import_volume() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-import-volume.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = ImportVolumeRequest::default();
        let result = client.import_volume(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_modify_snapshot_attribute() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-modify-snapshot-attribute.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = ModifySnapshotAttributeRequest::default();
        let result = client.modify_snapshot_attribute(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_monitor_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-monitor-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = MonitorInstancesRequest::default();
        let result = client.monitor_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_register_image() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-register-image.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = RegisterImageRequest::default();
        let result = client.register_image(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_replace_network_acl_association() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-replace-network-acl-association.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = ReplaceNetworkAclAssociationRequest::default();
        let result = client.replace_network_acl_association(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_request_spot_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-request-spot-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = RequestSpotInstancesRequest::default();
        let result = client.request_spot_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_run_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-run-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = RunInstancesRequest::default();
        let result = client.run_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_start_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-start-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = StartInstancesRequest::default();
        let result = client.start_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_stop_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-stop-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = StopInstancesRequest::default();
        let result = client.stop_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }


    #[test]
    fn test_parse_valid_ec_2_unmonitor_instances() {
        let mock_response = MockResponseReader::read_response("test_resources/generated/valid",
                                                              "ec2-unmonitor-instances.xml");
        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
        let client = Ec2Client::new(mock, MockCredentialsProvider, rusoto_region::UsEast1);
        let request = UnmonitorInstancesRequest::default();
        let result = client.unmonitor_instances(&request);
        assert!(result.is_ok(), "parse error: {:?}", result);
    }
}