use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto::xml::error::*;
use rusoto_core::proto::xml::util::{
characters, deserialize_elements, end_element, find_start_element, peek_at_name, skip_tree,
start_element,
};
use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
use rusoto_core::signature::SignedRequest;
use serde_urlencoded;
use std::str::FromStr;
use xml::reader::ParserConfig;
use xml::EventReader;
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccessLog {
pub emit_interval: Option<i64>,
pub enabled: bool,
pub s3_bucket_name: Option<String>,
pub s3_bucket_prefix: Option<String>,
}
struct AccessLogDeserializer;
impl AccessLogDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccessLog, XmlParseError> {
deserialize_elements::<_, AccessLog, _>(tag_name, stack, |name, stack, obj| {
match name {
"EmitInterval" => {
obj.emit_interval = Some(AccessLogIntervalDeserializer::deserialize(
"EmitInterval",
stack,
)?);
}
"Enabled" => {
obj.enabled = AccessLogEnabledDeserializer::deserialize("Enabled", stack)?;
}
"S3BucketName" => {
obj.s3_bucket_name = Some(S3BucketNameDeserializer::deserialize(
"S3BucketName",
stack,
)?);
}
"S3BucketPrefix" => {
obj.s3_bucket_prefix = Some(AccessLogPrefixDeserializer::deserialize(
"S3BucketPrefix",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AccessLogSerializer;
impl AccessLogSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AccessLog) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.emit_interval {
params.put(&format!("{}{}", prefix, "EmitInterval"), &field_value);
}
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
if let Some(ref field_value) = obj.s3_bucket_name {
params.put(&format!("{}{}", prefix, "S3BucketName"), &field_value);
}
if let Some(ref field_value) = obj.s3_bucket_prefix {
params.put(&format!("{}{}", prefix, "S3BucketPrefix"), &field_value);
}
}
}
struct AccessLogEnabledDeserializer;
impl AccessLogEnabledDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AccessLogIntervalDeserializer;
impl AccessLogIntervalDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AccessLogPrefixDeserializer;
impl AccessLogPrefixDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AccessPointNameDeserializer;
impl AccessPointNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AccessPointPortDeserializer;
impl AccessPointPortDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddAvailabilityZonesInput {
pub availability_zones: Vec<String>,
pub load_balancer_name: String,
}
struct AddAvailabilityZonesInputSerializer;
impl AddAvailabilityZonesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddAvailabilityZonesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
AvailabilityZonesSerializer::serialize(
params,
&format!("{}{}", prefix, "AvailabilityZones"),
&obj.availability_zones,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddAvailabilityZonesOutput {
pub availability_zones: Option<Vec<String>>,
}
struct AddAvailabilityZonesOutputDeserializer;
impl AddAvailabilityZonesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AddAvailabilityZonesOutput, XmlParseError> {
deserialize_elements::<_, AddAvailabilityZonesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddTagsInput {
pub load_balancer_names: Vec<String>,
pub tags: Vec<Tag>,
}
struct AddTagsInputSerializer;
impl AddTagsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddTagsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
LoadBalancerNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "LoadBalancerNames"),
&obj.load_balancer_names,
);
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), &obj.tags);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddTagsOutput {}
struct AddTagsOutputDeserializer;
impl AddTagsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AddTagsOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = AddTagsOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AdditionalAttribute {
pub key: Option<String>,
pub value: Option<String>,
}
struct AdditionalAttributeDeserializer;
impl AdditionalAttributeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AdditionalAttribute, XmlParseError> {
deserialize_elements::<_, AdditionalAttribute, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = Some(AdditionalAttributeKeyDeserializer::deserialize(
"Key", stack,
)?);
}
"Value" => {
obj.value = Some(AdditionalAttributeValueDeserializer::deserialize(
"Value", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AdditionalAttributeSerializer;
impl AdditionalAttributeSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AdditionalAttribute) {
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);
}
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
struct AdditionalAttributeKeyDeserializer;
impl AdditionalAttributeKeyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AdditionalAttributeValueDeserializer;
impl AdditionalAttributeValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AdditionalAttributesDeserializer;
impl AdditionalAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AdditionalAttribute>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AdditionalAttributeDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AdditionalAttributesSerializer;
impl AdditionalAttributesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<AdditionalAttribute>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
AdditionalAttributeSerializer::serialize(params, &key, obj);
}
}
}
struct AppCookieStickinessPoliciesDeserializer;
impl AppCookieStickinessPoliciesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AppCookieStickinessPolicy>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AppCookieStickinessPolicyDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AppCookieStickinessPolicy {
pub cookie_name: Option<String>,
pub policy_name: Option<String>,
}
struct AppCookieStickinessPolicyDeserializer;
impl AppCookieStickinessPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AppCookieStickinessPolicy, XmlParseError> {
deserialize_elements::<_, AppCookieStickinessPolicy, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CookieName" => {
obj.cookie_name =
Some(CookieNameDeserializer::deserialize("CookieName", stack)?);
}
"PolicyName" => {
obj.policy_name =
Some(PolicyNameDeserializer::deserialize("PolicyName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplySecurityGroupsToLoadBalancerInput {
pub load_balancer_name: String,
pub security_groups: Vec<String>,
}
struct ApplySecurityGroupsToLoadBalancerInputSerializer;
impl ApplySecurityGroupsToLoadBalancerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ApplySecurityGroupsToLoadBalancerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
SecurityGroupsSerializer::serialize(
params,
&format!("{}{}", prefix, "SecurityGroups"),
&obj.security_groups,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplySecurityGroupsToLoadBalancerOutput {
pub security_groups: Option<Vec<String>>,
}
struct ApplySecurityGroupsToLoadBalancerOutputDeserializer;
impl ApplySecurityGroupsToLoadBalancerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplySecurityGroupsToLoadBalancerOutput, XmlParseError> {
deserialize_elements::<_, ApplySecurityGroupsToLoadBalancerOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SecurityGroups" => {
obj.security_groups.get_or_insert(vec![]).extend(
SecurityGroupsDeserializer::deserialize("SecurityGroups", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AttachLoadBalancerToSubnetsInput {
pub load_balancer_name: String,
pub subnets: Vec<String>,
}
struct AttachLoadBalancerToSubnetsInputSerializer;
impl AttachLoadBalancerToSubnetsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AttachLoadBalancerToSubnetsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), &obj.subnets);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AttachLoadBalancerToSubnetsOutput {
pub subnets: Option<Vec<String>>,
}
struct AttachLoadBalancerToSubnetsOutputDeserializer;
impl AttachLoadBalancerToSubnetsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AttachLoadBalancerToSubnetsOutput, XmlParseError> {
deserialize_elements::<_, AttachLoadBalancerToSubnetsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Subnets" => {
obj.subnets
.get_or_insert(vec![])
.extend(SubnetsDeserializer::deserialize("Subnets", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AttributeNameDeserializer;
impl AttributeNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AttributeTypeDeserializer;
impl AttributeTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AttributeValueDeserializer;
impl AttributeValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AvailabilityZoneDeserializer;
impl AvailabilityZoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AvailabilityZonesDeserializer;
impl AvailabilityZonesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AvailabilityZoneDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AvailabilityZonesSerializer;
impl AvailabilityZonesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BackendServerDescription {
pub instance_port: Option<i64>,
pub policy_names: Option<Vec<String>>,
}
struct BackendServerDescriptionDeserializer;
impl BackendServerDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<BackendServerDescription, XmlParseError> {
deserialize_elements::<_, BackendServerDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"InstancePort" => {
obj.instance_port = Some(InstancePortDeserializer::deserialize(
"InstancePort",
stack,
)?);
}
"PolicyNames" => {
obj.policy_names
.get_or_insert(vec![])
.extend(PolicyNamesDeserializer::deserialize("PolicyNames", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct BackendServerDescriptionsDeserializer;
impl BackendServerDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<BackendServerDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(BackendServerDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct CardinalityDeserializer;
impl CardinalityDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigureHealthCheckInput {
pub health_check: HealthCheck,
pub load_balancer_name: String,
}
struct ConfigureHealthCheckInputSerializer;
impl ConfigureHealthCheckInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ConfigureHealthCheckInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
HealthCheckSerializer::serialize(
params,
&format!("{}{}", prefix, "HealthCheck"),
&obj.health_check,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigureHealthCheckOutput {
pub health_check: Option<HealthCheck>,
}
struct ConfigureHealthCheckOutputDeserializer;
impl ConfigureHealthCheckOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigureHealthCheckOutput, XmlParseError> {
deserialize_elements::<_, ConfigureHealthCheckOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthCheck" => {
obj.health_check =
Some(HealthCheckDeserializer::deserialize("HealthCheck", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConnectionDraining {
pub enabled: bool,
pub timeout: Option<i64>,
}
struct ConnectionDrainingDeserializer;
impl ConnectionDrainingDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConnectionDraining, XmlParseError> {
deserialize_elements::<_, ConnectionDraining, _>(tag_name, stack, |name, stack, obj| {
match name {
"Enabled" => {
obj.enabled =
ConnectionDrainingEnabledDeserializer::deserialize("Enabled", stack)?;
}
"Timeout" => {
obj.timeout = Some(ConnectionDrainingTimeoutDeserializer::deserialize(
"Timeout", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ConnectionDrainingSerializer;
impl ConnectionDrainingSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ConnectionDraining) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
if let Some(ref field_value) = obj.timeout {
params.put(&format!("{}{}", prefix, "Timeout"), &field_value);
}
}
}
struct ConnectionDrainingEnabledDeserializer;
impl ConnectionDrainingEnabledDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConnectionDrainingTimeoutDeserializer;
impl ConnectionDrainingTimeoutDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConnectionSettings {
pub idle_timeout: i64,
}
struct ConnectionSettingsDeserializer;
impl ConnectionSettingsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConnectionSettings, XmlParseError> {
deserialize_elements::<_, ConnectionSettings, _>(tag_name, stack, |name, stack, obj| {
match name {
"IdleTimeout" => {
obj.idle_timeout = IdleTimeoutDeserializer::deserialize("IdleTimeout", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ConnectionSettingsSerializer;
impl ConnectionSettingsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ConnectionSettings) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "IdleTimeout"), &obj.idle_timeout);
}
}
struct CookieExpirationPeriodDeserializer;
impl CookieExpirationPeriodDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CookieNameDeserializer;
impl CookieNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateAccessPointInput {
pub availability_zones: Option<Vec<String>>,
pub listeners: Vec<Listener>,
pub load_balancer_name: String,
pub scheme: Option<String>,
pub security_groups: Option<Vec<String>>,
pub subnets: Option<Vec<String>>,
pub tags: Option<Vec<Tag>>,
}
struct CreateAccessPointInputSerializer;
impl CreateAccessPointInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateAccessPointInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.availability_zones {
AvailabilityZonesSerializer::serialize(
params,
&format!("{}{}", prefix, "AvailabilityZones"),
field_value,
);
}
ListenersSerializer::serialize(
params,
&format!("{}{}", prefix, "Listeners"),
&obj.listeners,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
if let Some(ref field_value) = obj.scheme {
params.put(&format!("{}{}", prefix, "Scheme"), &field_value);
}
if let Some(ref field_value) = obj.security_groups {
SecurityGroupsSerializer::serialize(
params,
&format!("{}{}", prefix, "SecurityGroups"),
field_value,
);
}
if let Some(ref field_value) = obj.subnets {
SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateAccessPointOutput {
pub dns_name: Option<String>,
}
struct CreateAccessPointOutputDeserializer;
impl CreateAccessPointOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateAccessPointOutput, XmlParseError> {
deserialize_elements::<_, CreateAccessPointOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DNSName" => {
obj.dns_name = Some(DNSNameDeserializer::deserialize("DNSName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateAppCookieStickinessPolicyInput {
pub cookie_name: String,
pub load_balancer_name: String,
pub policy_name: String,
}
struct CreateAppCookieStickinessPolicyInputSerializer;
impl CreateAppCookieStickinessPolicyInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateAppCookieStickinessPolicyInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "CookieName"), &obj.cookie_name);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateAppCookieStickinessPolicyOutput {}
struct CreateAppCookieStickinessPolicyOutputDeserializer;
impl CreateAppCookieStickinessPolicyOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateAppCookieStickinessPolicyOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateAppCookieStickinessPolicyOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLBCookieStickinessPolicyInput {
pub cookie_expiration_period: Option<i64>,
pub load_balancer_name: String,
pub policy_name: String,
}
struct CreateLBCookieStickinessPolicyInputSerializer;
impl CreateLBCookieStickinessPolicyInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateLBCookieStickinessPolicyInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cookie_expiration_period {
params.put(
&format!("{}{}", prefix, "CookieExpirationPeriod"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLBCookieStickinessPolicyOutput {}
struct CreateLBCookieStickinessPolicyOutputDeserializer;
impl CreateLBCookieStickinessPolicyOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateLBCookieStickinessPolicyOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateLBCookieStickinessPolicyOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoadBalancerListenerInput {
pub listeners: Vec<Listener>,
pub load_balancer_name: String,
}
struct CreateLoadBalancerListenerInputSerializer;
impl CreateLoadBalancerListenerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateLoadBalancerListenerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ListenersSerializer::serialize(
params,
&format!("{}{}", prefix, "Listeners"),
&obj.listeners,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoadBalancerListenerOutput {}
struct CreateLoadBalancerListenerOutputDeserializer;
impl CreateLoadBalancerListenerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateLoadBalancerListenerOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateLoadBalancerListenerOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoadBalancerPolicyInput {
pub load_balancer_name: String,
pub policy_attributes: Option<Vec<PolicyAttribute>>,
pub policy_name: String,
pub policy_type_name: String,
}
struct CreateLoadBalancerPolicyInputSerializer;
impl CreateLoadBalancerPolicyInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateLoadBalancerPolicyInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
if let Some(ref field_value) = obj.policy_attributes {
PolicyAttributesSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyAttributes"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
params.put(
&format!("{}{}", prefix, "PolicyTypeName"),
&obj.policy_type_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoadBalancerPolicyOutput {}
struct CreateLoadBalancerPolicyOutputDeserializer;
impl CreateLoadBalancerPolicyOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateLoadBalancerPolicyOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = CreateLoadBalancerPolicyOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CreatedTimeDeserializer;
impl CreatedTimeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CrossZoneLoadBalancing {
pub enabled: bool,
}
struct CrossZoneLoadBalancingDeserializer;
impl CrossZoneLoadBalancingDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CrossZoneLoadBalancing, XmlParseError> {
deserialize_elements::<_, CrossZoneLoadBalancing, _>(tag_name, stack, |name, stack, obj| {
match name {
"Enabled" => {
obj.enabled =
CrossZoneLoadBalancingEnabledDeserializer::deserialize("Enabled", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct CrossZoneLoadBalancingSerializer;
impl CrossZoneLoadBalancingSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CrossZoneLoadBalancing) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
}
}
struct CrossZoneLoadBalancingEnabledDeserializer;
impl CrossZoneLoadBalancingEnabledDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DNSNameDeserializer;
impl DNSNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DefaultValueDeserializer;
impl DefaultValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteAccessPointInput {
pub load_balancer_name: String,
}
struct DeleteAccessPointInputSerializer;
impl DeleteAccessPointInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteAccessPointInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteAccessPointOutput {}
struct DeleteAccessPointOutputDeserializer;
impl DeleteAccessPointOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteAccessPointOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteAccessPointOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteLoadBalancerListenerInput {
pub load_balancer_name: String,
pub load_balancer_ports: Vec<i64>,
}
struct DeleteLoadBalancerListenerInputSerializer;
impl DeleteLoadBalancerListenerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteLoadBalancerListenerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
PortsSerializer::serialize(
params,
&format!("{}{}", prefix, "LoadBalancerPorts"),
&obj.load_balancer_ports,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteLoadBalancerListenerOutput {}
struct DeleteLoadBalancerListenerOutputDeserializer;
impl DeleteLoadBalancerListenerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteLoadBalancerListenerOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteLoadBalancerListenerOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteLoadBalancerPolicyInput {
pub load_balancer_name: String,
pub policy_name: String,
}
struct DeleteLoadBalancerPolicyInputSerializer;
impl DeleteLoadBalancerPolicyInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteLoadBalancerPolicyInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteLoadBalancerPolicyOutput {}
struct DeleteLoadBalancerPolicyOutputDeserializer;
impl DeleteLoadBalancerPolicyOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteLoadBalancerPolicyOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteLoadBalancerPolicyOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeregisterEndPointsInput {
pub instances: Vec<Instance>,
pub load_balancer_name: String,
}
struct DeregisterEndPointsInputSerializer;
impl DeregisterEndPointsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeregisterEndPointsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
InstancesSerializer::serialize(
params,
&format!("{}{}", prefix, "Instances"),
&obj.instances,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeregisterEndPointsOutput {
pub instances: Option<Vec<Instance>>,
}
struct DeregisterEndPointsOutputDeserializer;
impl DeregisterEndPointsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeregisterEndPointsOutput, XmlParseError> {
deserialize_elements::<_, DeregisterEndPointsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Instances" => {
obj.instances
.get_or_insert(vec![])
.extend(InstancesDeserializer::deserialize("Instances", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccessPointsInput {
pub load_balancer_names: Option<Vec<String>>,
pub marker: Option<String>,
pub page_size: Option<i64>,
}
struct DescribeAccessPointsInputSerializer;
impl DescribeAccessPointsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeAccessPointsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.load_balancer_names {
LoadBalancerNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "LoadBalancerNames"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.page_size {
params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccessPointsOutput {
pub load_balancer_descriptions: Option<Vec<LoadBalancerDescription>>,
pub next_marker: Option<String>,
}
struct DescribeAccessPointsOutputDeserializer;
impl DescribeAccessPointsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeAccessPointsOutput, XmlParseError> {
deserialize_elements::<_, DescribeAccessPointsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoadBalancerDescriptions" => {
obj.load_balancer_descriptions.get_or_insert(vec![]).extend(
LoadBalancerDescriptionsDeserializer::deserialize(
"LoadBalancerDescriptions",
stack,
)?,
);
}
"NextMarker" => {
obj.next_marker =
Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccountLimitsInput {
pub marker: Option<String>,
pub page_size: Option<i64>,
}
struct DescribeAccountLimitsInputSerializer;
impl DescribeAccountLimitsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeAccountLimitsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.page_size {
params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccountLimitsOutput {
pub limits: Option<Vec<Limit>>,
pub next_marker: Option<String>,
}
struct DescribeAccountLimitsOutputDeserializer;
impl DescribeAccountLimitsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeAccountLimitsOutput, XmlParseError> {
deserialize_elements::<_, DescribeAccountLimitsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Limits" => {
obj.limits
.get_or_insert(vec![])
.extend(LimitsDeserializer::deserialize("Limits", stack)?);
}
"NextMarker" => {
obj.next_marker =
Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEndPointStateInput {
pub instances: Option<Vec<Instance>>,
pub load_balancer_name: String,
}
struct DescribeEndPointStateInputSerializer;
impl DescribeEndPointStateInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEndPointStateInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.instances {
InstancesSerializer::serialize(
params,
&format!("{}{}", prefix, "Instances"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEndPointStateOutput {
pub instance_states: Option<Vec<InstanceState>>,
}
struct DescribeEndPointStateOutputDeserializer;
impl DescribeEndPointStateOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEndPointStateOutput, XmlParseError> {
deserialize_elements::<_, DescribeEndPointStateOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"InstanceStates" => {
obj.instance_states.get_or_insert(vec![]).extend(
InstanceStatesDeserializer::deserialize("InstanceStates", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerAttributesInput {
pub load_balancer_name: String,
}
struct DescribeLoadBalancerAttributesInputSerializer;
impl DescribeLoadBalancerAttributesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancerAttributesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerAttributesOutput {
pub load_balancer_attributes: Option<LoadBalancerAttributes>,
}
struct DescribeLoadBalancerAttributesOutputDeserializer;
impl DescribeLoadBalancerAttributesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeLoadBalancerAttributesOutput, XmlParseError> {
deserialize_elements::<_, DescribeLoadBalancerAttributesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoadBalancerAttributes" => {
obj.load_balancer_attributes =
Some(LoadBalancerAttributesDeserializer::deserialize(
"LoadBalancerAttributes",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerPoliciesInput {
pub load_balancer_name: Option<String>,
pub policy_names: Option<Vec<String>>,
}
struct DescribeLoadBalancerPoliciesInputSerializer;
impl DescribeLoadBalancerPoliciesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancerPoliciesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.load_balancer_name {
params.put(&format!("{}{}", prefix, "LoadBalancerName"), &field_value);
}
if let Some(ref field_value) = obj.policy_names {
PolicyNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyNames"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerPoliciesOutput {
pub policy_descriptions: Option<Vec<PolicyDescription>>,
}
struct DescribeLoadBalancerPoliciesOutputDeserializer;
impl DescribeLoadBalancerPoliciesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeLoadBalancerPoliciesOutput, XmlParseError> {
deserialize_elements::<_, DescribeLoadBalancerPoliciesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PolicyDescriptions" => {
obj.policy_descriptions.get_or_insert(vec![]).extend(
PolicyDescriptionsDeserializer::deserialize(
"PolicyDescriptions",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerPolicyTypesInput {
pub policy_type_names: Option<Vec<String>>,
}
struct DescribeLoadBalancerPolicyTypesInputSerializer;
impl DescribeLoadBalancerPolicyTypesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancerPolicyTypesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.policy_type_names {
PolicyTypeNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyTypeNames"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerPolicyTypesOutput {
pub policy_type_descriptions: Option<Vec<PolicyTypeDescription>>,
}
struct DescribeLoadBalancerPolicyTypesOutputDeserializer;
impl DescribeLoadBalancerPolicyTypesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeLoadBalancerPolicyTypesOutput, XmlParseError> {
deserialize_elements::<_, DescribeLoadBalancerPolicyTypesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PolicyTypeDescriptions" => {
obj.policy_type_descriptions.get_or_insert(vec![]).extend(
PolicyTypeDescriptionsDeserializer::deserialize(
"PolicyTypeDescriptions",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTagsInput {
pub load_balancer_names: Vec<String>,
}
struct DescribeTagsInputSerializer;
impl DescribeTagsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeTagsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
LoadBalancerNamesMax20Serializer::serialize(
params,
&format!("{}{}", prefix, "LoadBalancerNames"),
&obj.load_balancer_names,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTagsOutput {
pub tag_descriptions: Option<Vec<TagDescription>>,
}
struct DescribeTagsOutputDeserializer;
impl DescribeTagsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeTagsOutput, XmlParseError> {
deserialize_elements::<_, DescribeTagsOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"TagDescriptions" => {
obj.tag_descriptions.get_or_insert(vec![]).extend(
TagDescriptionsDeserializer::deserialize("TagDescriptions", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DescriptionDeserializer;
impl DescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetachLoadBalancerFromSubnetsInput {
pub load_balancer_name: String,
pub subnets: Vec<String>,
}
struct DetachLoadBalancerFromSubnetsInputSerializer;
impl DetachLoadBalancerFromSubnetsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DetachLoadBalancerFromSubnetsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), &obj.subnets);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetachLoadBalancerFromSubnetsOutput {
pub subnets: Option<Vec<String>>,
}
struct DetachLoadBalancerFromSubnetsOutputDeserializer;
impl DetachLoadBalancerFromSubnetsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DetachLoadBalancerFromSubnetsOutput, XmlParseError> {
deserialize_elements::<_, DetachLoadBalancerFromSubnetsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Subnets" => {
obj.subnets
.get_or_insert(vec![])
.extend(SubnetsDeserializer::deserialize("Subnets", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HealthCheck {
pub healthy_threshold: i64,
pub interval: i64,
pub target: String,
pub timeout: i64,
pub unhealthy_threshold: i64,
}
struct HealthCheckDeserializer;
impl HealthCheckDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HealthCheck, XmlParseError> {
deserialize_elements::<_, HealthCheck, _>(tag_name, stack, |name, stack, obj| {
match name {
"HealthyThreshold" => {
obj.healthy_threshold =
HealthyThresholdDeserializer::deserialize("HealthyThreshold", stack)?;
}
"Interval" => {
obj.interval = HealthCheckIntervalDeserializer::deserialize("Interval", stack)?;
}
"Target" => {
obj.target = HealthCheckTargetDeserializer::deserialize("Target", stack)?;
}
"Timeout" => {
obj.timeout = HealthCheckTimeoutDeserializer::deserialize("Timeout", stack)?;
}
"UnhealthyThreshold" => {
obj.unhealthy_threshold =
UnhealthyThresholdDeserializer::deserialize("UnhealthyThreshold", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct HealthCheckSerializer;
impl HealthCheckSerializer {
fn serialize(params: &mut Params, name: &str, obj: &HealthCheck) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "HealthyThreshold"),
&obj.healthy_threshold,
);
params.put(&format!("{}{}", prefix, "Interval"), &obj.interval);
params.put(&format!("{}{}", prefix, "Target"), &obj.target);
params.put(&format!("{}{}", prefix, "Timeout"), &obj.timeout);
params.put(
&format!("{}{}", prefix, "UnhealthyThreshold"),
&obj.unhealthy_threshold,
);
}
}
struct HealthCheckIntervalDeserializer;
impl HealthCheckIntervalDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct HealthCheckTargetDeserializer;
impl HealthCheckTargetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct HealthCheckTimeoutDeserializer;
impl HealthCheckTimeoutDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct HealthyThresholdDeserializer;
impl HealthyThresholdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct IdleTimeoutDeserializer;
impl IdleTimeoutDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Instance {
pub instance_id: Option<String>,
}
struct InstanceDeserializer;
impl InstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Instance, XmlParseError> {
deserialize_elements::<_, Instance, _>(tag_name, stack, |name, stack, obj| {
match name {
"InstanceId" => {
obj.instance_id =
Some(InstanceIdDeserializer::deserialize("InstanceId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct InstanceSerializer;
impl InstanceSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Instance) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.instance_id {
params.put(&format!("{}{}", prefix, "InstanceId"), &field_value);
}
}
}
struct InstanceIdDeserializer;
impl InstanceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct InstancePortDeserializer;
impl InstancePortDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct InstanceState {
pub description: Option<String>,
pub instance_id: Option<String>,
pub reason_code: Option<String>,
pub state: Option<String>,
}
struct InstanceStateDeserializer;
impl InstanceStateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<InstanceState, XmlParseError> {
deserialize_elements::<_, InstanceState, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"InstanceId" => {
obj.instance_id =
Some(InstanceIdDeserializer::deserialize("InstanceId", stack)?);
}
"ReasonCode" => {
obj.reason_code =
Some(ReasonCodeDeserializer::deserialize("ReasonCode", stack)?);
}
"State" => {
obj.state = Some(StateDeserializer::deserialize("State", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct InstanceStatesDeserializer;
impl InstanceStatesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<InstanceState>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(InstanceStateDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct InstancesDeserializer;
impl InstancesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Instance>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(InstanceDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct InstancesSerializer;
impl InstancesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Instance>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
InstanceSerializer::serialize(params, &key, obj);
}
}
}
struct LBCookieStickinessPoliciesDeserializer;
impl LBCookieStickinessPoliciesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LBCookieStickinessPolicy>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LBCookieStickinessPolicyDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LBCookieStickinessPolicy {
pub cookie_expiration_period: Option<i64>,
pub policy_name: Option<String>,
}
struct LBCookieStickinessPolicyDeserializer;
impl LBCookieStickinessPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LBCookieStickinessPolicy, XmlParseError> {
deserialize_elements::<_, LBCookieStickinessPolicy, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CookieExpirationPeriod" => {
obj.cookie_expiration_period =
Some(CookieExpirationPeriodDeserializer::deserialize(
"CookieExpirationPeriod",
stack,
)?);
}
"PolicyName" => {
obj.policy_name =
Some(PolicyNameDeserializer::deserialize("PolicyName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Limit {
pub max: Option<String>,
pub name: Option<String>,
}
struct LimitDeserializer;
impl LimitDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Limit, XmlParseError> {
deserialize_elements::<_, Limit, _>(tag_name, stack, |name, stack, obj| {
match name {
"Max" => {
obj.max = Some(MaxDeserializer::deserialize("Max", stack)?);
}
"Name" => {
obj.name = Some(NameDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LimitsDeserializer;
impl LimitsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Limit>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LimitDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Listener {
pub instance_port: i64,
pub instance_protocol: Option<String>,
pub load_balancer_port: i64,
pub protocol: String,
pub ssl_certificate_id: Option<String>,
}
struct ListenerDeserializer;
impl ListenerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Listener, XmlParseError> {
deserialize_elements::<_, Listener, _>(tag_name, stack, |name, stack, obj| {
match name {
"InstancePort" => {
obj.instance_port =
InstancePortDeserializer::deserialize("InstancePort", stack)?;
}
"InstanceProtocol" => {
obj.instance_protocol = Some(ProtocolDeserializer::deserialize(
"InstanceProtocol",
stack,
)?);
}
"LoadBalancerPort" => {
obj.load_balancer_port =
AccessPointPortDeserializer::deserialize("LoadBalancerPort", stack)?;
}
"Protocol" => {
obj.protocol = ProtocolDeserializer::deserialize("Protocol", stack)?;
}
"SSLCertificateId" => {
obj.ssl_certificate_id = Some(SSLCertificateIdDeserializer::deserialize(
"SSLCertificateId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ListenerSerializer;
impl ListenerSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Listener) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "InstancePort"), &obj.instance_port);
if let Some(ref field_value) = obj.instance_protocol {
params.put(&format!("{}{}", prefix, "InstanceProtocol"), &field_value);
}
params.put(
&format!("{}{}", prefix, "LoadBalancerPort"),
&obj.load_balancer_port,
);
params.put(&format!("{}{}", prefix, "Protocol"), &obj.protocol);
if let Some(ref field_value) = obj.ssl_certificate_id {
params.put(&format!("{}{}", prefix, "SSLCertificateId"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListenerDescription {
pub listener: Option<Listener>,
pub policy_names: Option<Vec<String>>,
}
struct ListenerDescriptionDeserializer;
impl ListenerDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListenerDescription, XmlParseError> {
deserialize_elements::<_, ListenerDescription, _>(tag_name, stack, |name, stack, obj| {
match name {
"Listener" => {
obj.listener = Some(ListenerDeserializer::deserialize("Listener", stack)?);
}
"PolicyNames" => {
obj.policy_names
.get_or_insert(vec![])
.extend(PolicyNamesDeserializer::deserialize("PolicyNames", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ListenerDescriptionsDeserializer;
impl ListenerDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ListenerDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ListenerDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ListenersSerializer;
impl ListenersSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Listener>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ListenerSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoadBalancerAttributes {
pub access_log: Option<AccessLog>,
pub additional_attributes: Option<Vec<AdditionalAttribute>>,
pub connection_draining: Option<ConnectionDraining>,
pub connection_settings: Option<ConnectionSettings>,
pub cross_zone_load_balancing: Option<CrossZoneLoadBalancing>,
}
struct LoadBalancerAttributesDeserializer;
impl LoadBalancerAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancerAttributes, XmlParseError> {
deserialize_elements::<_, LoadBalancerAttributes, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccessLog" => {
obj.access_log = Some(AccessLogDeserializer::deserialize("AccessLog", stack)?);
}
"AdditionalAttributes" => {
obj.additional_attributes.get_or_insert(vec![]).extend(
AdditionalAttributesDeserializer::deserialize(
"AdditionalAttributes",
stack,
)?,
);
}
"ConnectionDraining" => {
obj.connection_draining = Some(ConnectionDrainingDeserializer::deserialize(
"ConnectionDraining",
stack,
)?);
}
"ConnectionSettings" => {
obj.connection_settings = Some(ConnectionSettingsDeserializer::deserialize(
"ConnectionSettings",
stack,
)?);
}
"CrossZoneLoadBalancing" => {
obj.cross_zone_load_balancing =
Some(CrossZoneLoadBalancingDeserializer::deserialize(
"CrossZoneLoadBalancing",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LoadBalancerAttributesSerializer;
impl LoadBalancerAttributesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &LoadBalancerAttributes) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.access_log {
AccessLogSerializer::serialize(
params,
&format!("{}{}", prefix, "AccessLog"),
field_value,
);
}
if let Some(ref field_value) = obj.additional_attributes {
AdditionalAttributesSerializer::serialize(
params,
&format!("{}{}", prefix, "AdditionalAttributes"),
field_value,
);
}
if let Some(ref field_value) = obj.connection_draining {
ConnectionDrainingSerializer::serialize(
params,
&format!("{}{}", prefix, "ConnectionDraining"),
field_value,
);
}
if let Some(ref field_value) = obj.connection_settings {
ConnectionSettingsSerializer::serialize(
params,
&format!("{}{}", prefix, "ConnectionSettings"),
field_value,
);
}
if let Some(ref field_value) = obj.cross_zone_load_balancing {
CrossZoneLoadBalancingSerializer::serialize(
params,
&format!("{}{}", prefix, "CrossZoneLoadBalancing"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoadBalancerDescription {
pub availability_zones: Option<Vec<String>>,
pub backend_server_descriptions: Option<Vec<BackendServerDescription>>,
pub canonical_hosted_zone_name: Option<String>,
pub canonical_hosted_zone_name_id: Option<String>,
pub created_time: Option<String>,
pub dns_name: Option<String>,
pub health_check: Option<HealthCheck>,
pub instances: Option<Vec<Instance>>,
pub listener_descriptions: Option<Vec<ListenerDescription>>,
pub load_balancer_name: Option<String>,
pub policies: Option<Policies>,
pub scheme: Option<String>,
pub security_groups: Option<Vec<String>>,
pub source_security_group: Option<SourceSecurityGroup>,
pub subnets: Option<Vec<String>>,
pub vpc_id: Option<String>,
}
struct LoadBalancerDescriptionDeserializer;
impl LoadBalancerDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancerDescription, XmlParseError> {
deserialize_elements::<_, LoadBalancerDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
"BackendServerDescriptions" => {
obj.backend_server_descriptions
.get_or_insert(vec![])
.extend(BackendServerDescriptionsDeserializer::deserialize(
"BackendServerDescriptions",
stack,
)?);
}
"CanonicalHostedZoneName" => {
obj.canonical_hosted_zone_name = Some(DNSNameDeserializer::deserialize(
"CanonicalHostedZoneName",
stack,
)?);
}
"CanonicalHostedZoneNameID" => {
obj.canonical_hosted_zone_name_id = Some(DNSNameDeserializer::deserialize(
"CanonicalHostedZoneNameID",
stack,
)?);
}
"CreatedTime" => {
obj.created_time =
Some(CreatedTimeDeserializer::deserialize("CreatedTime", stack)?);
}
"DNSName" => {
obj.dns_name = Some(DNSNameDeserializer::deserialize("DNSName", stack)?);
}
"HealthCheck" => {
obj.health_check =
Some(HealthCheckDeserializer::deserialize("HealthCheck", stack)?);
}
"Instances" => {
obj.instances
.get_or_insert(vec![])
.extend(InstancesDeserializer::deserialize("Instances", stack)?);
}
"ListenerDescriptions" => {
obj.listener_descriptions.get_or_insert(vec![]).extend(
ListenerDescriptionsDeserializer::deserialize(
"ListenerDescriptions",
stack,
)?,
);
}
"LoadBalancerName" => {
obj.load_balancer_name = Some(AccessPointNameDeserializer::deserialize(
"LoadBalancerName",
stack,
)?);
}
"Policies" => {
obj.policies = Some(PoliciesDeserializer::deserialize("Policies", stack)?);
}
"Scheme" => {
obj.scheme = Some(LoadBalancerSchemeDeserializer::deserialize(
"Scheme", stack,
)?);
}
"SecurityGroups" => {
obj.security_groups.get_or_insert(vec![]).extend(
SecurityGroupsDeserializer::deserialize("SecurityGroups", stack)?,
);
}
"SourceSecurityGroup" => {
obj.source_security_group =
Some(SourceSecurityGroupDeserializer::deserialize(
"SourceSecurityGroup",
stack,
)?);
}
"Subnets" => {
obj.subnets
.get_or_insert(vec![])
.extend(SubnetsDeserializer::deserialize("Subnets", stack)?);
}
"VPCId" => {
obj.vpc_id = Some(VPCIdDeserializer::deserialize("VPCId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct LoadBalancerDescriptionsDeserializer;
impl LoadBalancerDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LoadBalancerDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LoadBalancerDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct LoadBalancerNamesSerializer;
impl LoadBalancerNamesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct LoadBalancerNamesMax20Serializer;
impl LoadBalancerNamesMax20Serializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct LoadBalancerSchemeDeserializer;
impl LoadBalancerSchemeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct MarkerDeserializer;
impl MarkerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct MaxDeserializer;
impl MaxDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyLoadBalancerAttributesInput {
pub load_balancer_attributes: LoadBalancerAttributes,
pub load_balancer_name: String,
}
struct ModifyLoadBalancerAttributesInputSerializer;
impl ModifyLoadBalancerAttributesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyLoadBalancerAttributesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
LoadBalancerAttributesSerializer::serialize(
params,
&format!("{}{}", prefix, "LoadBalancerAttributes"),
&obj.load_balancer_attributes,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyLoadBalancerAttributesOutput {
pub load_balancer_attributes: Option<LoadBalancerAttributes>,
pub load_balancer_name: Option<String>,
}
struct ModifyLoadBalancerAttributesOutputDeserializer;
impl ModifyLoadBalancerAttributesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyLoadBalancerAttributesOutput, XmlParseError> {
deserialize_elements::<_, ModifyLoadBalancerAttributesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoadBalancerAttributes" => {
obj.load_balancer_attributes =
Some(LoadBalancerAttributesDeserializer::deserialize(
"LoadBalancerAttributes",
stack,
)?);
}
"LoadBalancerName" => {
obj.load_balancer_name = Some(AccessPointNameDeserializer::deserialize(
"LoadBalancerName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct NameDeserializer;
impl NameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Policies {
pub app_cookie_stickiness_policies: Option<Vec<AppCookieStickinessPolicy>>,
pub lb_cookie_stickiness_policies: Option<Vec<LBCookieStickinessPolicy>>,
pub other_policies: Option<Vec<String>>,
}
struct PoliciesDeserializer;
impl PoliciesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Policies, XmlParseError> {
deserialize_elements::<_, Policies, _>(tag_name, stack, |name, stack, obj| {
match name {
"AppCookieStickinessPolicies" => {
obj.app_cookie_stickiness_policies
.get_or_insert(vec![])
.extend(AppCookieStickinessPoliciesDeserializer::deserialize(
"AppCookieStickinessPolicies",
stack,
)?);
}
"LBCookieStickinessPolicies" => {
obj.lb_cookie_stickiness_policies
.get_or_insert(vec![])
.extend(LBCookieStickinessPoliciesDeserializer::deserialize(
"LBCookieStickinessPolicies",
stack,
)?);
}
"OtherPolicies" => {
obj.other_policies.get_or_insert(vec![]).extend(
PolicyNamesDeserializer::deserialize("OtherPolicies", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PolicyAttribute {
pub attribute_name: Option<String>,
pub attribute_value: Option<String>,
}
struct PolicyAttributeSerializer;
impl PolicyAttributeSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PolicyAttribute) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.attribute_name {
params.put(&format!("{}{}", prefix, "AttributeName"), &field_value);
}
if let Some(ref field_value) = obj.attribute_value {
params.put(&format!("{}{}", prefix, "AttributeValue"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PolicyAttributeDescription {
pub attribute_name: Option<String>,
pub attribute_value: Option<String>,
}
struct PolicyAttributeDescriptionDeserializer;
impl PolicyAttributeDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyAttributeDescription, XmlParseError> {
deserialize_elements::<_, PolicyAttributeDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AttributeName" => {
obj.attribute_name = Some(AttributeNameDeserializer::deserialize(
"AttributeName",
stack,
)?);
}
"AttributeValue" => {
obj.attribute_value = Some(AttributeValueDeserializer::deserialize(
"AttributeValue",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct PolicyAttributeDescriptionsDeserializer;
impl PolicyAttributeDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyAttributeDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyAttributeDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PolicyAttributeTypeDescription {
pub attribute_name: Option<String>,
pub attribute_type: Option<String>,
pub cardinality: Option<String>,
pub default_value: Option<String>,
pub description: Option<String>,
}
struct PolicyAttributeTypeDescriptionDeserializer;
impl PolicyAttributeTypeDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyAttributeTypeDescription, XmlParseError> {
deserialize_elements::<_, PolicyAttributeTypeDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AttributeName" => {
obj.attribute_name = Some(AttributeNameDeserializer::deserialize(
"AttributeName",
stack,
)?);
}
"AttributeType" => {
obj.attribute_type = Some(AttributeTypeDeserializer::deserialize(
"AttributeType",
stack,
)?);
}
"Cardinality" => {
obj.cardinality =
Some(CardinalityDeserializer::deserialize("Cardinality", stack)?);
}
"DefaultValue" => {
obj.default_value = Some(DefaultValueDeserializer::deserialize(
"DefaultValue",
stack,
)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct PolicyAttributeTypeDescriptionsDeserializer;
impl PolicyAttributeTypeDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyAttributeTypeDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyAttributeTypeDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyAttributesSerializer;
impl PolicyAttributesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<PolicyAttribute>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
PolicyAttributeSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PolicyDescription {
pub policy_attribute_descriptions: Option<Vec<PolicyAttributeDescription>>,
pub policy_name: Option<String>,
pub policy_type_name: Option<String>,
}
struct PolicyDescriptionDeserializer;
impl PolicyDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyDescription, XmlParseError> {
deserialize_elements::<_, PolicyDescription, _>(tag_name, stack, |name, stack, obj| {
match name {
"PolicyAttributeDescriptions" => {
obj.policy_attribute_descriptions
.get_or_insert(vec![])
.extend(PolicyAttributeDescriptionsDeserializer::deserialize(
"PolicyAttributeDescriptions",
stack,
)?);
}
"PolicyName" => {
obj.policy_name =
Some(PolicyNameDeserializer::deserialize("PolicyName", stack)?);
}
"PolicyTypeName" => {
obj.policy_type_name = Some(PolicyTypeNameDeserializer::deserialize(
"PolicyTypeName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyDescriptionsDeserializer;
impl PolicyDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyDescriptionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyNameDeserializer;
impl PolicyNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PolicyNamesDeserializer;
impl PolicyNamesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyNameDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyNamesSerializer;
impl PolicyNamesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PolicyTypeDescription {
pub description: Option<String>,
pub policy_attribute_type_descriptions: Option<Vec<PolicyAttributeTypeDescription>>,
pub policy_type_name: Option<String>,
}
struct PolicyTypeDescriptionDeserializer;
impl PolicyTypeDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PolicyTypeDescription, XmlParseError> {
deserialize_elements::<_, PolicyTypeDescription, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"PolicyAttributeTypeDescriptions" => {
obj.policy_attribute_type_descriptions
.get_or_insert(vec![])
.extend(PolicyAttributeTypeDescriptionsDeserializer::deserialize(
"PolicyAttributeTypeDescriptions",
stack,
)?);
}
"PolicyTypeName" => {
obj.policy_type_name = Some(PolicyTypeNameDeserializer::deserialize(
"PolicyTypeName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PolicyTypeDescriptionsDeserializer;
impl PolicyTypeDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PolicyTypeDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PolicyTypeDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PolicyTypeNameDeserializer;
impl PolicyTypeNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PolicyTypeNamesSerializer;
impl PolicyTypeNamesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct PortsSerializer;
impl PortsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<i64>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct ProtocolDeserializer;
impl ProtocolDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ReasonCodeDeserializer;
impl ReasonCodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RegisterEndPointsInput {
pub instances: Vec<Instance>,
pub load_balancer_name: String,
}
struct RegisterEndPointsInputSerializer;
impl RegisterEndPointsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RegisterEndPointsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
InstancesSerializer::serialize(
params,
&format!("{}{}", prefix, "Instances"),
&obj.instances,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RegisterEndPointsOutput {
pub instances: Option<Vec<Instance>>,
}
struct RegisterEndPointsOutputDeserializer;
impl RegisterEndPointsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RegisterEndPointsOutput, XmlParseError> {
deserialize_elements::<_, RegisterEndPointsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Instances" => {
obj.instances
.get_or_insert(vec![])
.extend(InstancesDeserializer::deserialize("Instances", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveAvailabilityZonesInput {
pub availability_zones: Vec<String>,
pub load_balancer_name: String,
}
struct RemoveAvailabilityZonesInputSerializer;
impl RemoveAvailabilityZonesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveAvailabilityZonesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
AvailabilityZonesSerializer::serialize(
params,
&format!("{}{}", prefix, "AvailabilityZones"),
&obj.availability_zones,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveAvailabilityZonesOutput {
pub availability_zones: Option<Vec<String>>,
}
struct RemoveAvailabilityZonesOutputDeserializer;
impl RemoveAvailabilityZonesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RemoveAvailabilityZonesOutput, XmlParseError> {
deserialize_elements::<_, RemoveAvailabilityZonesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveTagsInput {
pub load_balancer_names: Vec<String>,
pub tags: Vec<TagKeyOnly>,
}
struct RemoveTagsInputSerializer;
impl RemoveTagsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveTagsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
LoadBalancerNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "LoadBalancerNames"),
&obj.load_balancer_names,
);
TagKeyListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), &obj.tags);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveTagsOutput {}
struct RemoveTagsOutputDeserializer;
impl RemoveTagsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RemoveTagsOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = RemoveTagsOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct S3BucketNameDeserializer;
impl S3BucketNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SSLCertificateIdDeserializer;
impl SSLCertificateIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SecurityGroupIdDeserializer;
impl SecurityGroupIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SecurityGroupNameDeserializer;
impl SecurityGroupNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SecurityGroupOwnerAliasDeserializer;
impl SecurityGroupOwnerAliasDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SecurityGroupsDeserializer;
impl SecurityGroupsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SecurityGroupIdDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SecurityGroupsSerializer;
impl SecurityGroupsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetLoadBalancerListenerSSLCertificateInput {
pub load_balancer_name: String,
pub load_balancer_port: i64,
pub ssl_certificate_id: String,
}
struct SetLoadBalancerListenerSSLCertificateInputSerializer;
impl SetLoadBalancerListenerSSLCertificateInputSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &SetLoadBalancerListenerSSLCertificateInput,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerPort"),
&obj.load_balancer_port,
);
params.put(
&format!("{}{}", prefix, "SSLCertificateId"),
&obj.ssl_certificate_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetLoadBalancerListenerSSLCertificateOutput {}
struct SetLoadBalancerListenerSSLCertificateOutputDeserializer;
impl SetLoadBalancerListenerSSLCertificateOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetLoadBalancerListenerSSLCertificateOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetLoadBalancerListenerSSLCertificateOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetLoadBalancerPoliciesForBackendServerInput {
pub instance_port: i64,
pub load_balancer_name: String,
pub policy_names: Vec<String>,
}
struct SetLoadBalancerPoliciesForBackendServerInputSerializer;
impl SetLoadBalancerPoliciesForBackendServerInputSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &SetLoadBalancerPoliciesForBackendServerInput,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "InstancePort"), &obj.instance_port);
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
PolicyNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyNames"),
&obj.policy_names,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetLoadBalancerPoliciesForBackendServerOutput {}
struct SetLoadBalancerPoliciesForBackendServerOutputDeserializer;
impl SetLoadBalancerPoliciesForBackendServerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetLoadBalancerPoliciesForBackendServerOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetLoadBalancerPoliciesForBackendServerOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetLoadBalancerPoliciesOfListenerInput {
pub load_balancer_name: String,
pub load_balancer_port: i64,
pub policy_names: Vec<String>,
}
struct SetLoadBalancerPoliciesOfListenerInputSerializer;
impl SetLoadBalancerPoliciesOfListenerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetLoadBalancerPoliciesOfListenerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerName"),
&obj.load_balancer_name,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerPort"),
&obj.load_balancer_port,
);
PolicyNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "PolicyNames"),
&obj.policy_names,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetLoadBalancerPoliciesOfListenerOutput {}
struct SetLoadBalancerPoliciesOfListenerOutputDeserializer;
impl SetLoadBalancerPoliciesOfListenerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetLoadBalancerPoliciesOfListenerOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = SetLoadBalancerPoliciesOfListenerOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SourceSecurityGroup {
pub group_name: Option<String>,
pub owner_alias: Option<String>,
}
struct SourceSecurityGroupDeserializer;
impl SourceSecurityGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SourceSecurityGroup, XmlParseError> {
deserialize_elements::<_, SourceSecurityGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"GroupName" => {
obj.group_name = Some(SecurityGroupNameDeserializer::deserialize(
"GroupName",
stack,
)?);
}
"OwnerAlias" => {
obj.owner_alias = Some(SecurityGroupOwnerAliasDeserializer::deserialize(
"OwnerAlias",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StateDeserializer;
impl StateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SubnetIdDeserializer;
impl SubnetIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SubnetsDeserializer;
impl SubnetsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SubnetIdDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SubnetsSerializer;
impl SubnetsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Tag {
pub key: String,
pub value: Option<String>,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = TagKeyDeserializer::deserialize("Key", stack)?;
}
"Value" => {
obj.value = Some(TagValueDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TagSerializer;
impl TagSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Tag) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Key"), &obj.key);
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TagDescription {
pub load_balancer_name: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct TagDescriptionDeserializer;
impl TagDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TagDescription, XmlParseError> {
deserialize_elements::<_, TagDescription, _>(tag_name, stack, |name, stack, obj| {
match name {
"LoadBalancerName" => {
obj.load_balancer_name = Some(AccessPointNameDeserializer::deserialize(
"LoadBalancerName",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TagDescriptionsDeserializer;
impl TagDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TagDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TagDescriptionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TagKeyDeserializer;
impl TagKeyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TagKeyListSerializer;
impl TagKeyListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<TagKeyOnly>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TagKeyOnlySerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TagKeyOnly {
pub key: Option<String>,
}
struct TagKeyOnlySerializer;
impl TagKeyOnlySerializer {
fn serialize(params: &mut Params, name: &str, obj: &TagKeyOnly) {
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);
}
}
}
struct TagListDeserializer;
impl TagListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Tag>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TagDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TagListSerializer;
impl TagListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TagSerializer::serialize(params, &key, obj);
}
}
}
struct TagValueDeserializer;
impl TagValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct UnhealthyThresholdDeserializer;
impl UnhealthyThresholdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct VPCIdDeserializer;
impl VPCIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Debug, PartialEq)]
pub enum AddTagsError {
AccessPointNotFound(String),
DuplicateTagKeys(String),
TooManyTags(String),
}
impl AddTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(AddTagsError::AccessPointNotFound(
parsed_error.message,
))
}
"DuplicateTagKeys" => {
return RusotoError::Service(AddTagsError::DuplicateTagKeys(
parsed_error.message,
))
}
"TooManyTags" => {
return RusotoError::Service(AddTagsError::TooManyTags(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for AddTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddTagsError {
fn description(&self) -> &str {
match *self {
AddTagsError::AccessPointNotFound(ref cause) => cause,
AddTagsError::DuplicateTagKeys(ref cause) => cause,
AddTagsError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ApplySecurityGroupsToLoadBalancerError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
InvalidSecurityGroup(String),
}
impl ApplySecurityGroupsToLoadBalancerError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ApplySecurityGroupsToLoadBalancerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
ApplySecurityGroupsToLoadBalancerError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
ApplySecurityGroupsToLoadBalancerError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"InvalidSecurityGroup" => {
return RusotoError::Service(
ApplySecurityGroupsToLoadBalancerError::InvalidSecurityGroup(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ApplySecurityGroupsToLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ApplySecurityGroupsToLoadBalancerError {
fn description(&self) -> &str {
match *self {
ApplySecurityGroupsToLoadBalancerError::AccessPointNotFound(ref cause) => cause,
ApplySecurityGroupsToLoadBalancerError::InvalidConfigurationRequest(ref cause) => cause,
ApplySecurityGroupsToLoadBalancerError::InvalidSecurityGroup(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachLoadBalancerToSubnetsError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
InvalidSubnet(String),
SubnetNotFound(String),
}
impl AttachLoadBalancerToSubnetsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AttachLoadBalancerToSubnetsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
AttachLoadBalancerToSubnetsError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
AttachLoadBalancerToSubnetsError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
AttachLoadBalancerToSubnetsError::InvalidSubnet(parsed_error.message),
)
}
"SubnetNotFound" => {
return RusotoError::Service(
AttachLoadBalancerToSubnetsError::SubnetNotFound(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for AttachLoadBalancerToSubnetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachLoadBalancerToSubnetsError {
fn description(&self) -> &str {
match *self {
AttachLoadBalancerToSubnetsError::AccessPointNotFound(ref cause) => cause,
AttachLoadBalancerToSubnetsError::InvalidConfigurationRequest(ref cause) => cause,
AttachLoadBalancerToSubnetsError::InvalidSubnet(ref cause) => cause,
AttachLoadBalancerToSubnetsError::SubnetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfigureHealthCheckError {
AccessPointNotFound(String),
}
impl ConfigureHealthCheckError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfigureHealthCheckError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
ConfigureHealthCheckError::AccessPointNotFound(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ConfigureHealthCheckError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfigureHealthCheckError {
fn description(&self) -> &str {
match *self {
ConfigureHealthCheckError::AccessPointNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAppCookieStickinessPolicyError {
AccessPointNotFound(String),
DuplicatePolicyName(String),
InvalidConfigurationRequest(String),
TooManyPolicies(String),
}
impl CreateAppCookieStickinessPolicyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateAppCookieStickinessPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
CreateAppCookieStickinessPolicyError::AccessPointNotFound(
parsed_error.message,
),
)
}
"DuplicatePolicyName" => {
return RusotoError::Service(
CreateAppCookieStickinessPolicyError::DuplicatePolicyName(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
CreateAppCookieStickinessPolicyError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"TooManyPolicies" => {
return RusotoError::Service(
CreateAppCookieStickinessPolicyError::TooManyPolicies(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateAppCookieStickinessPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAppCookieStickinessPolicyError {
fn description(&self) -> &str {
match *self {
CreateAppCookieStickinessPolicyError::AccessPointNotFound(ref cause) => cause,
CreateAppCookieStickinessPolicyError::DuplicatePolicyName(ref cause) => cause,
CreateAppCookieStickinessPolicyError::InvalidConfigurationRequest(ref cause) => cause,
CreateAppCookieStickinessPolicyError::TooManyPolicies(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLBCookieStickinessPolicyError {
AccessPointNotFound(String),
DuplicatePolicyName(String),
InvalidConfigurationRequest(String),
TooManyPolicies(String),
}
impl CreateLBCookieStickinessPolicyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateLBCookieStickinessPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
CreateLBCookieStickinessPolicyError::AccessPointNotFound(
parsed_error.message,
),
)
}
"DuplicatePolicyName" => {
return RusotoError::Service(
CreateLBCookieStickinessPolicyError::DuplicatePolicyName(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
CreateLBCookieStickinessPolicyError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"TooManyPolicies" => {
return RusotoError::Service(
CreateLBCookieStickinessPolicyError::TooManyPolicies(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateLBCookieStickinessPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLBCookieStickinessPolicyError {
fn description(&self) -> &str {
match *self {
CreateLBCookieStickinessPolicyError::AccessPointNotFound(ref cause) => cause,
CreateLBCookieStickinessPolicyError::DuplicatePolicyName(ref cause) => cause,
CreateLBCookieStickinessPolicyError::InvalidConfigurationRequest(ref cause) => cause,
CreateLBCookieStickinessPolicyError::TooManyPolicies(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLoadBalancerError {
CertificateNotFound(String),
DuplicateAccessPointName(String),
DuplicateTagKeys(String),
InvalidConfigurationRequest(String),
InvalidScheme(String),
InvalidSecurityGroup(String),
InvalidSubnet(String),
OperationNotPermitted(String),
SubnetNotFound(String),
TooManyAccessPoints(String),
TooManyTags(String),
UnsupportedProtocol(String),
}
impl CreateLoadBalancerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLoadBalancerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"CertificateNotFound" => {
return RusotoError::Service(CreateLoadBalancerError::CertificateNotFound(
parsed_error.message,
))
}
"DuplicateLoadBalancerName" => {
return RusotoError::Service(
CreateLoadBalancerError::DuplicateAccessPointName(parsed_error.message),
)
}
"DuplicateTagKeys" => {
return RusotoError::Service(CreateLoadBalancerError::DuplicateTagKeys(
parsed_error.message,
))
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
CreateLoadBalancerError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"InvalidScheme" => {
return RusotoError::Service(CreateLoadBalancerError::InvalidScheme(
parsed_error.message,
))
}
"InvalidSecurityGroup" => {
return RusotoError::Service(CreateLoadBalancerError::InvalidSecurityGroup(
parsed_error.message,
))
}
"InvalidSubnet" => {
return RusotoError::Service(CreateLoadBalancerError::InvalidSubnet(
parsed_error.message,
))
}
"OperationNotPermitted" => {
return RusotoError::Service(
CreateLoadBalancerError::OperationNotPermitted(parsed_error.message),
)
}
"SubnetNotFound" => {
return RusotoError::Service(CreateLoadBalancerError::SubnetNotFound(
parsed_error.message,
))
}
"TooManyLoadBalancers" => {
return RusotoError::Service(CreateLoadBalancerError::TooManyAccessPoints(
parsed_error.message,
))
}
"TooManyTags" => {
return RusotoError::Service(CreateLoadBalancerError::TooManyTags(
parsed_error.message,
))
}
"UnsupportedProtocol" => {
return RusotoError::Service(CreateLoadBalancerError::UnsupportedProtocol(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLoadBalancerError {
fn description(&self) -> &str {
match *self {
CreateLoadBalancerError::CertificateNotFound(ref cause) => cause,
CreateLoadBalancerError::DuplicateAccessPointName(ref cause) => cause,
CreateLoadBalancerError::DuplicateTagKeys(ref cause) => cause,
CreateLoadBalancerError::InvalidConfigurationRequest(ref cause) => cause,
CreateLoadBalancerError::InvalidScheme(ref cause) => cause,
CreateLoadBalancerError::InvalidSecurityGroup(ref cause) => cause,
CreateLoadBalancerError::InvalidSubnet(ref cause) => cause,
CreateLoadBalancerError::OperationNotPermitted(ref cause) => cause,
CreateLoadBalancerError::SubnetNotFound(ref cause) => cause,
CreateLoadBalancerError::TooManyAccessPoints(ref cause) => cause,
CreateLoadBalancerError::TooManyTags(ref cause) => cause,
CreateLoadBalancerError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLoadBalancerListenersError {
AccessPointNotFound(String),
CertificateNotFound(String),
DuplicateListener(String),
InvalidConfigurationRequest(String),
UnsupportedProtocol(String),
}
impl CreateLoadBalancerListenersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateLoadBalancerListenersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
CreateLoadBalancerListenersError::AccessPointNotFound(
parsed_error.message,
),
)
}
"CertificateNotFound" => {
return RusotoError::Service(
CreateLoadBalancerListenersError::CertificateNotFound(
parsed_error.message,
),
)
}
"DuplicateListener" => {
return RusotoError::Service(
CreateLoadBalancerListenersError::DuplicateListener(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
CreateLoadBalancerListenersError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"UnsupportedProtocol" => {
return RusotoError::Service(
CreateLoadBalancerListenersError::UnsupportedProtocol(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateLoadBalancerListenersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLoadBalancerListenersError {
fn description(&self) -> &str {
match *self {
CreateLoadBalancerListenersError::AccessPointNotFound(ref cause) => cause,
CreateLoadBalancerListenersError::CertificateNotFound(ref cause) => cause,
CreateLoadBalancerListenersError::DuplicateListener(ref cause) => cause,
CreateLoadBalancerListenersError::InvalidConfigurationRequest(ref cause) => cause,
CreateLoadBalancerListenersError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLoadBalancerPolicyError {
AccessPointNotFound(String),
DuplicatePolicyName(String),
InvalidConfigurationRequest(String),
PolicyTypeNotFound(String),
TooManyPolicies(String),
}
impl CreateLoadBalancerPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLoadBalancerPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
CreateLoadBalancerPolicyError::AccessPointNotFound(
parsed_error.message,
),
)
}
"DuplicatePolicyName" => {
return RusotoError::Service(
CreateLoadBalancerPolicyError::DuplicatePolicyName(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
CreateLoadBalancerPolicyError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"PolicyTypeNotFound" => {
return RusotoError::Service(
CreateLoadBalancerPolicyError::PolicyTypeNotFound(parsed_error.message),
)
}
"TooManyPolicies" => {
return RusotoError::Service(
CreateLoadBalancerPolicyError::TooManyPolicies(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateLoadBalancerPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLoadBalancerPolicyError {
fn description(&self) -> &str {
match *self {
CreateLoadBalancerPolicyError::AccessPointNotFound(ref cause) => cause,
CreateLoadBalancerPolicyError::DuplicatePolicyName(ref cause) => cause,
CreateLoadBalancerPolicyError::InvalidConfigurationRequest(ref cause) => cause,
CreateLoadBalancerPolicyError::PolicyTypeNotFound(ref cause) => cause,
CreateLoadBalancerPolicyError::TooManyPolicies(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLoadBalancerError {}
impl DeleteLoadBalancerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLoadBalancerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLoadBalancerError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLoadBalancerListenersError {
AccessPointNotFound(String),
}
impl DeleteLoadBalancerListenersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteLoadBalancerListenersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DeleteLoadBalancerListenersError::AccessPointNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteLoadBalancerListenersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLoadBalancerListenersError {
fn description(&self) -> &str {
match *self {
DeleteLoadBalancerListenersError::AccessPointNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLoadBalancerPolicyError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
}
impl DeleteLoadBalancerPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLoadBalancerPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DeleteLoadBalancerPolicyError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
DeleteLoadBalancerPolicyError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteLoadBalancerPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLoadBalancerPolicyError {
fn description(&self) -> &str {
match *self {
DeleteLoadBalancerPolicyError::AccessPointNotFound(ref cause) => cause,
DeleteLoadBalancerPolicyError::InvalidConfigurationRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeregisterInstancesFromLoadBalancerError {
AccessPointNotFound(String),
InvalidEndPoint(String),
}
impl DeregisterInstancesFromLoadBalancerError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeregisterInstancesFromLoadBalancerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DeregisterInstancesFromLoadBalancerError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidInstance" => {
return RusotoError::Service(
DeregisterInstancesFromLoadBalancerError::InvalidEndPoint(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeregisterInstancesFromLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeregisterInstancesFromLoadBalancerError {
fn description(&self) -> &str {
match *self {
DeregisterInstancesFromLoadBalancerError::AccessPointNotFound(ref cause) => cause,
DeregisterInstancesFromLoadBalancerError::InvalidEndPoint(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountLimitsError {}
impl DescribeAccountLimitsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountLimitsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeAccountLimitsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountLimitsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstanceHealthError {
AccessPointNotFound(String),
InvalidEndPoint(String),
}
impl DescribeInstanceHealthError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeInstanceHealthError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DescribeInstanceHealthError::AccessPointNotFound(parsed_error.message),
)
}
"InvalidInstance" => {
return RusotoError::Service(DescribeInstanceHealthError::InvalidEndPoint(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeInstanceHealthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInstanceHealthError {
fn description(&self) -> &str {
match *self {
DescribeInstanceHealthError::AccessPointNotFound(ref cause) => cause,
DescribeInstanceHealthError::InvalidEndPoint(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoadBalancerAttributesError {
AccessPointNotFound(String),
LoadBalancerAttributeNotFound(String),
}
impl DescribeLoadBalancerAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeLoadBalancerAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DescribeLoadBalancerAttributesError::AccessPointNotFound(
parsed_error.message,
),
)
}
"LoadBalancerAttributeNotFound" => {
return RusotoError::Service(
DescribeLoadBalancerAttributesError::LoadBalancerAttributeNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeLoadBalancerAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLoadBalancerAttributesError {
fn description(&self) -> &str {
match *self {
DescribeLoadBalancerAttributesError::AccessPointNotFound(ref cause) => cause,
DescribeLoadBalancerAttributesError::LoadBalancerAttributeNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoadBalancerPoliciesError {
AccessPointNotFound(String),
PolicyNotFound(String),
}
impl DescribeLoadBalancerPoliciesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeLoadBalancerPoliciesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DescribeLoadBalancerPoliciesError::AccessPointNotFound(
parsed_error.message,
),
)
}
"PolicyNotFound" => {
return RusotoError::Service(
DescribeLoadBalancerPoliciesError::PolicyNotFound(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeLoadBalancerPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLoadBalancerPoliciesError {
fn description(&self) -> &str {
match *self {
DescribeLoadBalancerPoliciesError::AccessPointNotFound(ref cause) => cause,
DescribeLoadBalancerPoliciesError::PolicyNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoadBalancerPolicyTypesError {
PolicyTypeNotFound(String),
}
impl DescribeLoadBalancerPolicyTypesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeLoadBalancerPolicyTypesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"PolicyTypeNotFound" => {
return RusotoError::Service(
DescribeLoadBalancerPolicyTypesError::PolicyTypeNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeLoadBalancerPolicyTypesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLoadBalancerPolicyTypesError {
fn description(&self) -> &str {
match *self {
DescribeLoadBalancerPolicyTypesError::PolicyTypeNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoadBalancersError {
AccessPointNotFound(String),
DependencyThrottle(String),
}
impl DescribeLoadBalancersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoadBalancersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DescribeLoadBalancersError::AccessPointNotFound(parsed_error.message),
)
}
"DependencyThrottle" => {
return RusotoError::Service(
DescribeLoadBalancersError::DependencyThrottle(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeLoadBalancersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLoadBalancersError {
fn description(&self) -> &str {
match *self {
DescribeLoadBalancersError::AccessPointNotFound(ref cause) => cause,
DescribeLoadBalancersError::DependencyThrottle(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
AccessPointNotFound(String),
}
impl DescribeTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(DescribeTagsError::AccessPointNotFound(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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::AccessPointNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachLoadBalancerFromSubnetsError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
}
impl DetachLoadBalancerFromSubnetsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DetachLoadBalancerFromSubnetsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DetachLoadBalancerFromSubnetsError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
DetachLoadBalancerFromSubnetsError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DetachLoadBalancerFromSubnetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachLoadBalancerFromSubnetsError {
fn description(&self) -> &str {
match *self {
DetachLoadBalancerFromSubnetsError::AccessPointNotFound(ref cause) => cause,
DetachLoadBalancerFromSubnetsError::InvalidConfigurationRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableAvailabilityZonesForLoadBalancerError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
}
impl DisableAvailabilityZonesForLoadBalancerError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisableAvailabilityZonesForLoadBalancerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
DisableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => return RusotoError::Service(
DisableAvailabilityZonesForLoadBalancerError::InvalidConfigurationRequest(
parsed_error.message,
),
),
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DisableAvailabilityZonesForLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableAvailabilityZonesForLoadBalancerError {
fn description(&self) -> &str {
match *self {
DisableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(ref cause) => cause,
DisableAvailabilityZonesForLoadBalancerError::InvalidConfigurationRequest(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableAvailabilityZonesForLoadBalancerError {
AccessPointNotFound(String),
}
impl EnableAvailabilityZonesForLoadBalancerError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<EnableAvailabilityZonesForLoadBalancerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
EnableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for EnableAvailabilityZonesForLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableAvailabilityZonesForLoadBalancerError {
fn description(&self) -> &str {
match *self {
EnableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyLoadBalancerAttributesError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
LoadBalancerAttributeNotFound(String),
}
impl ModifyLoadBalancerAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyLoadBalancerAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
ModifyLoadBalancerAttributesError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
ModifyLoadBalancerAttributesError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"LoadBalancerAttributeNotFound" => {
return RusotoError::Service(
ModifyLoadBalancerAttributesError::LoadBalancerAttributeNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ModifyLoadBalancerAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyLoadBalancerAttributesError {
fn description(&self) -> &str {
match *self {
ModifyLoadBalancerAttributesError::AccessPointNotFound(ref cause) => cause,
ModifyLoadBalancerAttributesError::InvalidConfigurationRequest(ref cause) => cause,
ModifyLoadBalancerAttributesError::LoadBalancerAttributeNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterInstancesWithLoadBalancerError {
AccessPointNotFound(String),
InvalidEndPoint(String),
}
impl RegisterInstancesWithLoadBalancerError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RegisterInstancesWithLoadBalancerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
RegisterInstancesWithLoadBalancerError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidInstance" => {
return RusotoError::Service(
RegisterInstancesWithLoadBalancerError::InvalidEndPoint(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RegisterInstancesWithLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterInstancesWithLoadBalancerError {
fn description(&self) -> &str {
match *self {
RegisterInstancesWithLoadBalancerError::AccessPointNotFound(ref cause) => cause,
RegisterInstancesWithLoadBalancerError::InvalidEndPoint(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsError {
AccessPointNotFound(String),
}
impl RemoveTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(RemoveTagsError::AccessPointNotFound(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RemoveTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveTagsError {
fn description(&self) -> &str {
match *self {
RemoveTagsError::AccessPointNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetLoadBalancerListenerSSLCertificateError {
AccessPointNotFound(String),
CertificateNotFound(String),
InvalidConfigurationRequest(String),
ListenerNotFound(String),
UnsupportedProtocol(String),
}
impl SetLoadBalancerListenerSSLCertificateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SetLoadBalancerListenerSSLCertificateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
SetLoadBalancerListenerSSLCertificateError::AccessPointNotFound(
parsed_error.message,
),
)
}
"CertificateNotFound" => {
return RusotoError::Service(
SetLoadBalancerListenerSSLCertificateError::CertificateNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
SetLoadBalancerListenerSSLCertificateError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"ListenerNotFound" => {
return RusotoError::Service(
SetLoadBalancerListenerSSLCertificateError::ListenerNotFound(
parsed_error.message,
),
)
}
"UnsupportedProtocol" => {
return RusotoError::Service(
SetLoadBalancerListenerSSLCertificateError::UnsupportedProtocol(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetLoadBalancerListenerSSLCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetLoadBalancerListenerSSLCertificateError {
fn description(&self) -> &str {
match *self {
SetLoadBalancerListenerSSLCertificateError::AccessPointNotFound(ref cause) => cause,
SetLoadBalancerListenerSSLCertificateError::CertificateNotFound(ref cause) => cause,
SetLoadBalancerListenerSSLCertificateError::InvalidConfigurationRequest(ref cause) => {
cause
}
SetLoadBalancerListenerSSLCertificateError::ListenerNotFound(ref cause) => cause,
SetLoadBalancerListenerSSLCertificateError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetLoadBalancerPoliciesForBackendServerError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
PolicyNotFound(String),
}
impl SetLoadBalancerPoliciesForBackendServerError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SetLoadBalancerPoliciesForBackendServerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
SetLoadBalancerPoliciesForBackendServerError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => return RusotoError::Service(
SetLoadBalancerPoliciesForBackendServerError::InvalidConfigurationRequest(
parsed_error.message,
),
),
"PolicyNotFound" => {
return RusotoError::Service(
SetLoadBalancerPoliciesForBackendServerError::PolicyNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetLoadBalancerPoliciesForBackendServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetLoadBalancerPoliciesForBackendServerError {
fn description(&self) -> &str {
match *self {
SetLoadBalancerPoliciesForBackendServerError::AccessPointNotFound(ref cause) => cause,
SetLoadBalancerPoliciesForBackendServerError::InvalidConfigurationRequest(
ref cause,
) => cause,
SetLoadBalancerPoliciesForBackendServerError::PolicyNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetLoadBalancerPoliciesOfListenerError {
AccessPointNotFound(String),
InvalidConfigurationRequest(String),
ListenerNotFound(String),
PolicyNotFound(String),
}
impl SetLoadBalancerPoliciesOfListenerError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<SetLoadBalancerPoliciesOfListenerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(
SetLoadBalancerPoliciesOfListenerError::AccessPointNotFound(
parsed_error.message,
),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
SetLoadBalancerPoliciesOfListenerError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"ListenerNotFound" => {
return RusotoError::Service(
SetLoadBalancerPoliciesOfListenerError::ListenerNotFound(
parsed_error.message,
),
)
}
"PolicyNotFound" => {
return RusotoError::Service(
SetLoadBalancerPoliciesOfListenerError::PolicyNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SetLoadBalancerPoliciesOfListenerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetLoadBalancerPoliciesOfListenerError {
fn description(&self) -> &str {
match *self {
SetLoadBalancerPoliciesOfListenerError::AccessPointNotFound(ref cause) => cause,
SetLoadBalancerPoliciesOfListenerError::InvalidConfigurationRequest(ref cause) => cause,
SetLoadBalancerPoliciesOfListenerError::ListenerNotFound(ref cause) => cause,
SetLoadBalancerPoliciesOfListenerError::PolicyNotFound(ref cause) => cause,
}
}
}
pub trait Elb {
fn add_tags(&self, input: AddTagsInput) -> RusotoFuture<AddTagsOutput, AddTagsError>;
fn apply_security_groups_to_load_balancer(
&self,
input: ApplySecurityGroupsToLoadBalancerInput,
) -> RusotoFuture<ApplySecurityGroupsToLoadBalancerOutput, ApplySecurityGroupsToLoadBalancerError>;
fn attach_load_balancer_to_subnets(
&self,
input: AttachLoadBalancerToSubnetsInput,
) -> RusotoFuture<AttachLoadBalancerToSubnetsOutput, AttachLoadBalancerToSubnetsError>;
fn configure_health_check(
&self,
input: ConfigureHealthCheckInput,
) -> RusotoFuture<ConfigureHealthCheckOutput, ConfigureHealthCheckError>;
fn create_app_cookie_stickiness_policy(
&self,
input: CreateAppCookieStickinessPolicyInput,
) -> RusotoFuture<CreateAppCookieStickinessPolicyOutput, CreateAppCookieStickinessPolicyError>;
fn create_lb_cookie_stickiness_policy(
&self,
input: CreateLBCookieStickinessPolicyInput,
) -> RusotoFuture<CreateLBCookieStickinessPolicyOutput, CreateLBCookieStickinessPolicyError>;
fn create_load_balancer(
&self,
input: CreateAccessPointInput,
) -> RusotoFuture<CreateAccessPointOutput, CreateLoadBalancerError>;
fn create_load_balancer_listeners(
&self,
input: CreateLoadBalancerListenerInput,
) -> RusotoFuture<CreateLoadBalancerListenerOutput, CreateLoadBalancerListenersError>;
fn create_load_balancer_policy(
&self,
input: CreateLoadBalancerPolicyInput,
) -> RusotoFuture<CreateLoadBalancerPolicyOutput, CreateLoadBalancerPolicyError>;
fn delete_load_balancer(
&self,
input: DeleteAccessPointInput,
) -> RusotoFuture<DeleteAccessPointOutput, DeleteLoadBalancerError>;
fn delete_load_balancer_listeners(
&self,
input: DeleteLoadBalancerListenerInput,
) -> RusotoFuture<DeleteLoadBalancerListenerOutput, DeleteLoadBalancerListenersError>;
fn delete_load_balancer_policy(
&self,
input: DeleteLoadBalancerPolicyInput,
) -> RusotoFuture<DeleteLoadBalancerPolicyOutput, DeleteLoadBalancerPolicyError>;
fn deregister_instances_from_load_balancer(
&self,
input: DeregisterEndPointsInput,
) -> RusotoFuture<DeregisterEndPointsOutput, DeregisterInstancesFromLoadBalancerError>;
fn describe_account_limits(
&self,
input: DescribeAccountLimitsInput,
) -> RusotoFuture<DescribeAccountLimitsOutput, DescribeAccountLimitsError>;
fn describe_instance_health(
&self,
input: DescribeEndPointStateInput,
) -> RusotoFuture<DescribeEndPointStateOutput, DescribeInstanceHealthError>;
fn describe_load_balancer_attributes(
&self,
input: DescribeLoadBalancerAttributesInput,
) -> RusotoFuture<DescribeLoadBalancerAttributesOutput, DescribeLoadBalancerAttributesError>;
fn describe_load_balancer_policies(
&self,
input: DescribeLoadBalancerPoliciesInput,
) -> RusotoFuture<DescribeLoadBalancerPoliciesOutput, DescribeLoadBalancerPoliciesError>;
fn describe_load_balancer_policy_types(
&self,
input: DescribeLoadBalancerPolicyTypesInput,
) -> RusotoFuture<DescribeLoadBalancerPolicyTypesOutput, DescribeLoadBalancerPolicyTypesError>;
fn describe_load_balancers(
&self,
input: DescribeAccessPointsInput,
) -> RusotoFuture<DescribeAccessPointsOutput, DescribeLoadBalancersError>;
fn describe_tags(
&self,
input: DescribeTagsInput,
) -> RusotoFuture<DescribeTagsOutput, DescribeTagsError>;
fn detach_load_balancer_from_subnets(
&self,
input: DetachLoadBalancerFromSubnetsInput,
) -> RusotoFuture<DetachLoadBalancerFromSubnetsOutput, DetachLoadBalancerFromSubnetsError>;
fn disable_availability_zones_for_load_balancer(
&self,
input: RemoveAvailabilityZonesInput,
) -> RusotoFuture<RemoveAvailabilityZonesOutput, DisableAvailabilityZonesForLoadBalancerError>;
fn enable_availability_zones_for_load_balancer(
&self,
input: AddAvailabilityZonesInput,
) -> RusotoFuture<AddAvailabilityZonesOutput, EnableAvailabilityZonesForLoadBalancerError>;
fn modify_load_balancer_attributes(
&self,
input: ModifyLoadBalancerAttributesInput,
) -> RusotoFuture<ModifyLoadBalancerAttributesOutput, ModifyLoadBalancerAttributesError>;
fn register_instances_with_load_balancer(
&self,
input: RegisterEndPointsInput,
) -> RusotoFuture<RegisterEndPointsOutput, RegisterInstancesWithLoadBalancerError>;
fn remove_tags(
&self,
input: RemoveTagsInput,
) -> RusotoFuture<RemoveTagsOutput, RemoveTagsError>;
fn set_load_balancer_listener_ssl_certificate(
&self,
input: SetLoadBalancerListenerSSLCertificateInput,
) -> RusotoFuture<
SetLoadBalancerListenerSSLCertificateOutput,
SetLoadBalancerListenerSSLCertificateError,
>;
fn set_load_balancer_policies_for_backend_server(
&self,
input: SetLoadBalancerPoliciesForBackendServerInput,
) -> RusotoFuture<
SetLoadBalancerPoliciesForBackendServerOutput,
SetLoadBalancerPoliciesForBackendServerError,
>;
fn set_load_balancer_policies_of_listener(
&self,
input: SetLoadBalancerPoliciesOfListenerInput,
) -> RusotoFuture<SetLoadBalancerPoliciesOfListenerOutput, SetLoadBalancerPoliciesOfListenerError>;
}
#[derive(Clone)]
pub struct ElbClient {
client: Client,
region: region::Region,
}
impl ElbClient {
pub fn new(region: region::Region) -> ElbClient {
ElbClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> ElbClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
ElbClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Elb for ElbClient {
fn add_tags(&self, input: AddTagsInput) -> RusotoFuture<AddTagsOutput, AddTagsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddTags");
params.put("Version", "2012-06-01");
AddTagsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddTagsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AddTagsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = AddTagsOutputDeserializer::deserialize("AddTagsResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn apply_security_groups_to_load_balancer(
&self,
input: ApplySecurityGroupsToLoadBalancerInput,
) -> RusotoFuture<ApplySecurityGroupsToLoadBalancerOutput, ApplySecurityGroupsToLoadBalancerError>
{
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ApplySecurityGroupsToLoadBalancer");
params.put("Version", "2012-06-01");
ApplySecurityGroupsToLoadBalancerInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ApplySecurityGroupsToLoadBalancerError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplySecurityGroupsToLoadBalancerOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplySecurityGroupsToLoadBalancerOutputDeserializer::deserialize(
"ApplySecurityGroupsToLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn attach_load_balancer_to_subnets(
&self,
input: AttachLoadBalancerToSubnetsInput,
) -> RusotoFuture<AttachLoadBalancerToSubnetsOutput, AttachLoadBalancerToSubnetsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AttachLoadBalancerToSubnets");
params.put("Version", "2012-06-01");
AttachLoadBalancerToSubnetsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(AttachLoadBalancerToSubnetsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AttachLoadBalancerToSubnetsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = AttachLoadBalancerToSubnetsOutputDeserializer::deserialize(
"AttachLoadBalancerToSubnetsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn configure_health_check(
&self,
input: ConfigureHealthCheckInput,
) -> RusotoFuture<ConfigureHealthCheckOutput, ConfigureHealthCheckError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ConfigureHealthCheck");
params.put("Version", "2012-06-01");
ConfigureHealthCheckInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ConfigureHealthCheckError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ConfigureHealthCheckOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ConfigureHealthCheckOutputDeserializer::deserialize(
"ConfigureHealthCheckResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_app_cookie_stickiness_policy(
&self,
input: CreateAppCookieStickinessPolicyInput,
) -> RusotoFuture<CreateAppCookieStickinessPolicyOutput, CreateAppCookieStickinessPolicyError>
{
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateAppCookieStickinessPolicy");
params.put("Version", "2012-06-01");
CreateAppCookieStickinessPolicyInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateAppCookieStickinessPolicyError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateAppCookieStickinessPolicyOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateAppCookieStickinessPolicyOutputDeserializer::deserialize(
"CreateAppCookieStickinessPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_lb_cookie_stickiness_policy(
&self,
input: CreateLBCookieStickinessPolicyInput,
) -> RusotoFuture<CreateLBCookieStickinessPolicyOutput, CreateLBCookieStickinessPolicyError>
{
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateLBCookieStickinessPolicy");
params.put("Version", "2012-06-01");
CreateLBCookieStickinessPolicyInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateLBCookieStickinessPolicyError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateLBCookieStickinessPolicyOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateLBCookieStickinessPolicyOutputDeserializer::deserialize(
"CreateLBCookieStickinessPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_load_balancer(
&self,
input: CreateAccessPointInput,
) -> RusotoFuture<CreateAccessPointOutput, CreateLoadBalancerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateLoadBalancer");
params.put("Version", "2012-06-01");
CreateAccessPointInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateLoadBalancerError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateAccessPointOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateAccessPointOutputDeserializer::deserialize(
"CreateLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_load_balancer_listeners(
&self,
input: CreateLoadBalancerListenerInput,
) -> RusotoFuture<CreateLoadBalancerListenerOutput, CreateLoadBalancerListenersError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateLoadBalancerListeners");
params.put("Version", "2012-06-01");
CreateLoadBalancerListenerInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateLoadBalancerListenersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateLoadBalancerListenerOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateLoadBalancerListenerOutputDeserializer::deserialize(
"CreateLoadBalancerListenersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_load_balancer_policy(
&self,
input: CreateLoadBalancerPolicyInput,
) -> RusotoFuture<CreateLoadBalancerPolicyOutput, CreateLoadBalancerPolicyError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateLoadBalancerPolicy");
params.put("Version", "2012-06-01");
CreateLoadBalancerPolicyInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateLoadBalancerPolicyError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateLoadBalancerPolicyOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateLoadBalancerPolicyOutputDeserializer::deserialize(
"CreateLoadBalancerPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_load_balancer(
&self,
input: DeleteAccessPointInput,
) -> RusotoFuture<DeleteAccessPointOutput, DeleteLoadBalancerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteLoadBalancer");
params.put("Version", "2012-06-01");
DeleteAccessPointInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteLoadBalancerError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteAccessPointOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteAccessPointOutputDeserializer::deserialize(
"DeleteLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_load_balancer_listeners(
&self,
input: DeleteLoadBalancerListenerInput,
) -> RusotoFuture<DeleteLoadBalancerListenerOutput, DeleteLoadBalancerListenersError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteLoadBalancerListeners");
params.put("Version", "2012-06-01");
DeleteLoadBalancerListenerInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteLoadBalancerListenersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteLoadBalancerListenerOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteLoadBalancerListenerOutputDeserializer::deserialize(
"DeleteLoadBalancerListenersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_load_balancer_policy(
&self,
input: DeleteLoadBalancerPolicyInput,
) -> RusotoFuture<DeleteLoadBalancerPolicyOutput, DeleteLoadBalancerPolicyError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteLoadBalancerPolicy");
params.put("Version", "2012-06-01");
DeleteLoadBalancerPolicyInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteLoadBalancerPolicyError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteLoadBalancerPolicyOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteLoadBalancerPolicyOutputDeserializer::deserialize(
"DeleteLoadBalancerPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn deregister_instances_from_load_balancer(
&self,
input: DeregisterEndPointsInput,
) -> RusotoFuture<DeregisterEndPointsOutput, DeregisterInstancesFromLoadBalancerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeregisterInstancesFromLoadBalancer");
params.put("Version", "2012-06-01");
DeregisterEndPointsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeregisterInstancesFromLoadBalancerError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeregisterEndPointsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeregisterEndPointsOutputDeserializer::deserialize(
"DeregisterInstancesFromLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_account_limits(
&self,
input: DescribeAccountLimitsInput,
) -> RusotoFuture<DescribeAccountLimitsOutput, DescribeAccountLimitsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeAccountLimits");
params.put("Version", "2012-06-01");
DescribeAccountLimitsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAccountLimitsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeAccountLimitsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeAccountLimitsOutputDeserializer::deserialize(
"DescribeAccountLimitsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_instance_health(
&self,
input: DescribeEndPointStateInput,
) -> RusotoFuture<DescribeEndPointStateOutput, DescribeInstanceHealthError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeInstanceHealth");
params.put("Version", "2012-06-01");
DescribeEndPointStateInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInstanceHealthError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEndPointStateOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeEndPointStateOutputDeserializer::deserialize(
"DescribeInstanceHealthResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_load_balancer_attributes(
&self,
input: DescribeLoadBalancerAttributesInput,
) -> RusotoFuture<DescribeLoadBalancerAttributesOutput, DescribeLoadBalancerAttributesError>
{
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeLoadBalancerAttributes");
params.put("Version", "2012-06-01");
DescribeLoadBalancerAttributesInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeLoadBalancerAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeLoadBalancerAttributesOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeLoadBalancerAttributesOutputDeserializer::deserialize(
"DescribeLoadBalancerAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_load_balancer_policies(
&self,
input: DescribeLoadBalancerPoliciesInput,
) -> RusotoFuture<DescribeLoadBalancerPoliciesOutput, DescribeLoadBalancerPoliciesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeLoadBalancerPolicies");
params.put("Version", "2012-06-01");
DescribeLoadBalancerPoliciesInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeLoadBalancerPoliciesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeLoadBalancerPoliciesOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeLoadBalancerPoliciesOutputDeserializer::deserialize(
"DescribeLoadBalancerPoliciesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_load_balancer_policy_types(
&self,
input: DescribeLoadBalancerPolicyTypesInput,
) -> RusotoFuture<DescribeLoadBalancerPolicyTypesOutput, DescribeLoadBalancerPolicyTypesError>
{
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeLoadBalancerPolicyTypes");
params.put("Version", "2012-06-01");
DescribeLoadBalancerPolicyTypesInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeLoadBalancerPolicyTypesError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeLoadBalancerPolicyTypesOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeLoadBalancerPolicyTypesOutputDeserializer::deserialize(
"DescribeLoadBalancerPolicyTypesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_load_balancers(
&self,
input: DescribeAccessPointsInput,
) -> RusotoFuture<DescribeAccessPointsOutput, DescribeLoadBalancersError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeLoadBalancers");
params.put("Version", "2012-06-01");
DescribeAccessPointsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeLoadBalancersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeAccessPointsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeAccessPointsOutputDeserializer::deserialize(
"DescribeLoadBalancersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_tags(
&self,
input: DescribeTagsInput,
) -> RusotoFuture<DescribeTagsOutput, DescribeTagsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeTags");
params.put("Version", "2012-06-01");
DescribeTagsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeTagsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeTagsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeTagsOutputDeserializer::deserialize(
"DescribeTagsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn detach_load_balancer_from_subnets(
&self,
input: DetachLoadBalancerFromSubnetsInput,
) -> RusotoFuture<DetachLoadBalancerFromSubnetsOutput, DetachLoadBalancerFromSubnetsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DetachLoadBalancerFromSubnets");
params.put("Version", "2012-06-01");
DetachLoadBalancerFromSubnetsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DetachLoadBalancerFromSubnetsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DetachLoadBalancerFromSubnetsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DetachLoadBalancerFromSubnetsOutputDeserializer::deserialize(
"DetachLoadBalancerFromSubnetsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn disable_availability_zones_for_load_balancer(
&self,
input: RemoveAvailabilityZonesInput,
) -> RusotoFuture<RemoveAvailabilityZonesOutput, DisableAvailabilityZonesForLoadBalancerError>
{
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DisableAvailabilityZonesForLoadBalancer");
params.put("Version", "2012-06-01");
RemoveAvailabilityZonesInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DisableAvailabilityZonesForLoadBalancerError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RemoveAvailabilityZonesOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = RemoveAvailabilityZonesOutputDeserializer::deserialize(
"DisableAvailabilityZonesForLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn enable_availability_zones_for_load_balancer(
&self,
input: AddAvailabilityZonesInput,
) -> RusotoFuture<AddAvailabilityZonesOutput, EnableAvailabilityZonesForLoadBalancerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "EnableAvailabilityZonesForLoadBalancer");
params.put("Version", "2012-06-01");
AddAvailabilityZonesInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(EnableAvailabilityZonesForLoadBalancerError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AddAvailabilityZonesOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = AddAvailabilityZonesOutputDeserializer::deserialize(
"EnableAvailabilityZonesForLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_load_balancer_attributes(
&self,
input: ModifyLoadBalancerAttributesInput,
) -> RusotoFuture<ModifyLoadBalancerAttributesOutput, ModifyLoadBalancerAttributesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyLoadBalancerAttributes");
params.put("Version", "2012-06-01");
ModifyLoadBalancerAttributesInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyLoadBalancerAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyLoadBalancerAttributesOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ModifyLoadBalancerAttributesOutputDeserializer::deserialize(
"ModifyLoadBalancerAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn register_instances_with_load_balancer(
&self,
input: RegisterEndPointsInput,
) -> RusotoFuture<RegisterEndPointsOutput, RegisterInstancesWithLoadBalancerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RegisterInstancesWithLoadBalancer");
params.put("Version", "2012-06-01");
RegisterEndPointsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RegisterInstancesWithLoadBalancerError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RegisterEndPointsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = RegisterEndPointsOutputDeserializer::deserialize(
"RegisterInstancesWithLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn remove_tags(
&self,
input: RemoveTagsInput,
) -> RusotoFuture<RemoveTagsOutput, RemoveTagsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveTags");
params.put("Version", "2012-06-01");
RemoveTagsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RemoveTagsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RemoveTagsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
RemoveTagsOutputDeserializer::deserialize("RemoveTagsResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_load_balancer_listener_ssl_certificate(
&self,
input: SetLoadBalancerListenerSSLCertificateInput,
) -> RusotoFuture<
SetLoadBalancerListenerSSLCertificateOutput,
SetLoadBalancerListenerSSLCertificateError,
> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetLoadBalancerListenerSSLCertificate");
params.put("Version", "2012-06-01");
SetLoadBalancerListenerSSLCertificateInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetLoadBalancerListenerSSLCertificateError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetLoadBalancerListenerSSLCertificateOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetLoadBalancerListenerSSLCertificateOutputDeserializer::deserialize(
"SetLoadBalancerListenerSSLCertificateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_load_balancer_policies_for_backend_server(
&self,
input: SetLoadBalancerPoliciesForBackendServerInput,
) -> RusotoFuture<
SetLoadBalancerPoliciesForBackendServerOutput,
SetLoadBalancerPoliciesForBackendServerError,
> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetLoadBalancerPoliciesForBackendServer");
params.put("Version", "2012-06-01");
SetLoadBalancerPoliciesForBackendServerInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetLoadBalancerPoliciesForBackendServerError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetLoadBalancerPoliciesForBackendServerOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
SetLoadBalancerPoliciesForBackendServerOutputDeserializer::deserialize(
"SetLoadBalancerPoliciesForBackendServerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_load_balancer_policies_of_listener(
&self,
input: SetLoadBalancerPoliciesOfListenerInput,
) -> RusotoFuture<SetLoadBalancerPoliciesOfListenerOutput, SetLoadBalancerPoliciesOfListenerError>
{
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetLoadBalancerPoliciesOfListener");
params.put("Version", "2012-06-01");
SetLoadBalancerPoliciesOfListenerInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(SetLoadBalancerPoliciesOfListenerError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetLoadBalancerPoliciesOfListenerOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = SetLoadBalancerPoliciesOfListenerOutputDeserializer::deserialize(
"SetLoadBalancerPoliciesOfListenerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
}
#[cfg(test)]
mod protocol_tests {
extern crate rusoto_mock;
use self::rusoto_mock::*;
use super::*;
use rusoto_core::Region as rusoto_region;
#[test]
fn test_parse_error_elb_describe_load_balancers() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"elb-describe-load-balancers.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeAccessPointsInput::default();
let result = client.describe_load_balancers(request).sync();
assert!(!result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elb_describe_load_balancer_policies() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elb-describe-load-balancer-policies.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeLoadBalancerPoliciesInput::default();
let result = client.describe_load_balancer_policies(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elb_describe_load_balancer_policy_types() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elb-describe-load-balancer-policy-types.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeLoadBalancerPolicyTypesInput::default();
let result = client.describe_load_balancer_policy_types(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elb_describe_load_balancers() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elb-describe-load-balancers.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeAccessPointsInput::default();
let result = client.describe_load_balancers(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}