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 Action {
pub authenticate_cognito_config: Option<AuthenticateCognitoActionConfig>,
pub authenticate_oidc_config: Option<AuthenticateOidcActionConfig>,
pub fixed_response_config: Option<FixedResponseActionConfig>,
pub order: Option<i64>,
pub redirect_config: Option<RedirectActionConfig>,
pub target_group_arn: Option<String>,
pub type_: String,
}
struct ActionDeserializer;
impl ActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Action, XmlParseError> {
deserialize_elements::<_, Action, _>(tag_name, stack, |name, stack, obj| {
match name {
"AuthenticateCognitoConfig" => {
obj.authenticate_cognito_config =
Some(AuthenticateCognitoActionConfigDeserializer::deserialize(
"AuthenticateCognitoConfig",
stack,
)?);
}
"AuthenticateOidcConfig" => {
obj.authenticate_oidc_config =
Some(AuthenticateOidcActionConfigDeserializer::deserialize(
"AuthenticateOidcConfig",
stack,
)?);
}
"FixedResponseConfig" => {
obj.fixed_response_config =
Some(FixedResponseActionConfigDeserializer::deserialize(
"FixedResponseConfig",
stack,
)?);
}
"Order" => {
obj.order = Some(ActionOrderDeserializer::deserialize("Order", stack)?);
}
"RedirectConfig" => {
obj.redirect_config = Some(RedirectActionConfigDeserializer::deserialize(
"RedirectConfig",
stack,
)?);
}
"TargetGroupArn" => {
obj.target_group_arn = Some(TargetGroupArnDeserializer::deserialize(
"TargetGroupArn",
stack,
)?);
}
"Type" => {
obj.type_ = ActionTypeEnumDeserializer::deserialize("Type", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ActionSerializer;
impl ActionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Action) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.authenticate_cognito_config {
AuthenticateCognitoActionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "AuthenticateCognitoConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.authenticate_oidc_config {
AuthenticateOidcActionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "AuthenticateOidcConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.fixed_response_config {
FixedResponseActionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "FixedResponseConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.order {
params.put(&format!("{}{}", prefix, "Order"), &field_value);
}
if let Some(ref field_value) = obj.redirect_config {
RedirectActionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "RedirectConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.target_group_arn {
params.put(&format!("{}{}", prefix, "TargetGroupArn"), &field_value);
}
params.put(&format!("{}{}", prefix, "Type"), &obj.type_);
}
}
struct ActionOrderDeserializer;
impl ActionOrderDeserializer {
#[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 ActionTypeEnumDeserializer;
impl ActionTypeEnumDeserializer {
#[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 ActionsDeserializer;
impl ActionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Action>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ActionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ActionsSerializer;
impl ActionsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Action>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ActionSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddListenerCertificatesInput {
pub certificates: Vec<Certificate>,
pub listener_arn: String,
}
struct AddListenerCertificatesInputSerializer;
impl AddListenerCertificatesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddListenerCertificatesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
CertificateListSerializer::serialize(
params,
&format!("{}{}", prefix, "Certificates"),
&obj.certificates,
);
params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddListenerCertificatesOutput {
pub certificates: Option<Vec<Certificate>>,
}
struct AddListenerCertificatesOutputDeserializer;
impl AddListenerCertificatesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AddListenerCertificatesOutput, XmlParseError> {
deserialize_elements::<_, AddListenerCertificatesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Certificates" => {
obj.certificates.get_or_insert(vec![]).extend(
CertificateListDeserializer::deserialize("Certificates", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddTagsInput {
pub resource_arns: 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(".");
}
ResourceArnsSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceArns"),
&obj.resource_arns,
);
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)
}
}
struct AllocationIdDeserializer;
impl AllocationIdDeserializer {
#[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 AuthenticateCognitoActionAuthenticationRequestExtraParamsDeserializer;
impl AuthenticateCognitoActionAuthenticationRequestExtraParamsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, String>, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ::std::collections::HashMap::new();
while peek_at_name(stack)? == "entry" {
start_element("entry", stack)?;
let key =
AuthenticateCognitoActionAuthenticationRequestParamNameDeserializer::deserialize(
"key", stack,
)?;
let value =
AuthenticateCognitoActionAuthenticationRequestParamValueDeserializer::deserialize(
"value", stack,
)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AuthenticateCognitoActionAuthenticationRequestExtraParamsSerializer;
impl AuthenticateCognitoActionAuthenticationRequestExtraParamsSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &::std::collections::HashMap<String, String>,
) {
for (index, (key, value)) in obj.iter().enumerate() {
let prefix = format!("{}.{}", name, index + 1);
params.put(&format!("{}.{}", prefix, "key"), &key);
params.put(&format!("{}.{}", prefix, "Value"), &value);
}
}
}
struct AuthenticateCognitoActionAuthenticationRequestParamNameDeserializer;
impl AuthenticateCognitoActionAuthenticationRequestParamNameDeserializer {
#[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 AuthenticateCognitoActionAuthenticationRequestParamValueDeserializer;
impl AuthenticateCognitoActionAuthenticationRequestParamValueDeserializer {
#[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 AuthenticateCognitoActionConditionalBehaviorEnumDeserializer;
impl AuthenticateCognitoActionConditionalBehaviorEnumDeserializer {
#[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 AuthenticateCognitoActionConfig {
pub authentication_request_extra_params: Option<::std::collections::HashMap<String, String>>,
pub on_unauthenticated_request: Option<String>,
pub scope: Option<String>,
pub session_cookie_name: Option<String>,
pub session_timeout: Option<i64>,
pub user_pool_arn: String,
pub user_pool_client_id: String,
pub user_pool_domain: String,
}
struct AuthenticateCognitoActionConfigDeserializer;
impl AuthenticateCognitoActionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AuthenticateCognitoActionConfig, XmlParseError> {
deserialize_elements::<_, AuthenticateCognitoActionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AuthenticationRequestExtraParams" => {
obj.authentication_request_extra_params = Some(AuthenticateCognitoActionAuthenticationRequestExtraParamsDeserializer::deserialize("AuthenticationRequestExtraParams", stack)?);
}
"OnUnauthenticatedRequest" => {
obj.on_unauthenticated_request = Some(AuthenticateCognitoActionConditionalBehaviorEnumDeserializer::deserialize("OnUnauthenticatedRequest", stack)?);
}
"Scope" => {
obj.scope = Some(AuthenticateCognitoActionScopeDeserializer::deserialize(
"Scope", stack,
)?);
}
"SessionCookieName" => {
obj.session_cookie_name = Some(
AuthenticateCognitoActionSessionCookieNameDeserializer::deserialize(
"SessionCookieName",
stack,
)?,
);
}
"SessionTimeout" => {
obj.session_timeout = Some(
AuthenticateCognitoActionSessionTimeoutDeserializer::deserialize(
"SessionTimeout",
stack,
)?,
);
}
"UserPoolArn" => {
obj.user_pool_arn =
AuthenticateCognitoActionUserPoolArnDeserializer::deserialize(
"UserPoolArn",
stack,
)?;
}
"UserPoolClientId" => {
obj.user_pool_client_id =
AuthenticateCognitoActionUserPoolClientIdDeserializer::deserialize(
"UserPoolClientId",
stack,
)?;
}
"UserPoolDomain" => {
obj.user_pool_domain =
AuthenticateCognitoActionUserPoolDomainDeserializer::deserialize(
"UserPoolDomain",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AuthenticateCognitoActionConfigSerializer;
impl AuthenticateCognitoActionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AuthenticateCognitoActionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.authentication_request_extra_params {
AuthenticateCognitoActionAuthenticationRequestExtraParamsSerializer::serialize(
params,
&format!("{}{}", prefix, "AuthenticationRequestExtraParams"),
field_value,
);
}
if let Some(ref field_value) = obj.on_unauthenticated_request {
params.put(
&format!("{}{}", prefix, "OnUnauthenticatedRequest"),
&field_value,
);
}
if let Some(ref field_value) = obj.scope {
params.put(&format!("{}{}", prefix, "Scope"), &field_value);
}
if let Some(ref field_value) = obj.session_cookie_name {
params.put(&format!("{}{}", prefix, "SessionCookieName"), &field_value);
}
if let Some(ref field_value) = obj.session_timeout {
params.put(&format!("{}{}", prefix, "SessionTimeout"), &field_value);
}
params.put(&format!("{}{}", prefix, "UserPoolArn"), &obj.user_pool_arn);
params.put(
&format!("{}{}", prefix, "UserPoolClientId"),
&obj.user_pool_client_id,
);
params.put(
&format!("{}{}", prefix, "UserPoolDomain"),
&obj.user_pool_domain,
);
}
}
struct AuthenticateCognitoActionScopeDeserializer;
impl AuthenticateCognitoActionScopeDeserializer {
#[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 AuthenticateCognitoActionSessionCookieNameDeserializer;
impl AuthenticateCognitoActionSessionCookieNameDeserializer {
#[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 AuthenticateCognitoActionSessionTimeoutDeserializer;
impl AuthenticateCognitoActionSessionTimeoutDeserializer {
#[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 AuthenticateCognitoActionUserPoolArnDeserializer;
impl AuthenticateCognitoActionUserPoolArnDeserializer {
#[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 AuthenticateCognitoActionUserPoolClientIdDeserializer;
impl AuthenticateCognitoActionUserPoolClientIdDeserializer {
#[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 AuthenticateCognitoActionUserPoolDomainDeserializer;
impl AuthenticateCognitoActionUserPoolDomainDeserializer {
#[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 AuthenticateOidcActionAuthenticationRequestExtraParamsDeserializer;
impl AuthenticateOidcActionAuthenticationRequestExtraParamsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<::std::collections::HashMap<String, String>, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ::std::collections::HashMap::new();
while peek_at_name(stack)? == "entry" {
start_element("entry", stack)?;
let key =
AuthenticateOidcActionAuthenticationRequestParamNameDeserializer::deserialize(
"key", stack,
)?;
let value =
AuthenticateOidcActionAuthenticationRequestParamValueDeserializer::deserialize(
"value", stack,
)?;
obj.insert(key, value);
end_element("entry", stack)?;
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AuthenticateOidcActionAuthenticationRequestExtraParamsSerializer;
impl AuthenticateOidcActionAuthenticationRequestExtraParamsSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &::std::collections::HashMap<String, String>,
) {
for (index, (key, value)) in obj.iter().enumerate() {
let prefix = format!("{}.{}", name, index + 1);
params.put(&format!("{}.{}", prefix, "key"), &key);
params.put(&format!("{}.{}", prefix, "Value"), &value);
}
}
}
struct AuthenticateOidcActionAuthenticationRequestParamNameDeserializer;
impl AuthenticateOidcActionAuthenticationRequestParamNameDeserializer {
#[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 AuthenticateOidcActionAuthenticationRequestParamValueDeserializer;
impl AuthenticateOidcActionAuthenticationRequestParamValueDeserializer {
#[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 AuthenticateOidcActionAuthorizationEndpointDeserializer;
impl AuthenticateOidcActionAuthorizationEndpointDeserializer {
#[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 AuthenticateOidcActionClientIdDeserializer;
impl AuthenticateOidcActionClientIdDeserializer {
#[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 AuthenticateOidcActionClientSecretDeserializer;
impl AuthenticateOidcActionClientSecretDeserializer {
#[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 AuthenticateOidcActionConditionalBehaviorEnumDeserializer;
impl AuthenticateOidcActionConditionalBehaviorEnumDeserializer {
#[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 AuthenticateOidcActionConfig {
pub authentication_request_extra_params: Option<::std::collections::HashMap<String, String>>,
pub authorization_endpoint: String,
pub client_id: String,
pub client_secret: Option<String>,
pub issuer: String,
pub on_unauthenticated_request: Option<String>,
pub scope: Option<String>,
pub session_cookie_name: Option<String>,
pub session_timeout: Option<i64>,
pub token_endpoint: String,
pub use_existing_client_secret: Option<bool>,
pub user_info_endpoint: String,
}
struct AuthenticateOidcActionConfigDeserializer;
impl AuthenticateOidcActionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AuthenticateOidcActionConfig, XmlParseError> {
deserialize_elements::<_, AuthenticateOidcActionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AuthenticationRequestExtraParams" => {
obj.authentication_request_extra_params = Some(AuthenticateOidcActionAuthenticationRequestExtraParamsDeserializer::deserialize("AuthenticationRequestExtraParams", stack)?);
}
"AuthorizationEndpoint" => {
obj.authorization_endpoint =
AuthenticateOidcActionAuthorizationEndpointDeserializer::deserialize(
"AuthorizationEndpoint",
stack,
)?;
}
"ClientId" => {
obj.client_id = AuthenticateOidcActionClientIdDeserializer::deserialize(
"ClientId", stack,
)?;
}
"ClientSecret" => {
obj.client_secret =
Some(AuthenticateOidcActionClientSecretDeserializer::deserialize(
"ClientSecret",
stack,
)?);
}
"Issuer" => {
obj.issuer =
AuthenticateOidcActionIssuerDeserializer::deserialize("Issuer", stack)?;
}
"OnUnauthenticatedRequest" => {
obj.on_unauthenticated_request = Some(
AuthenticateOidcActionConditionalBehaviorEnumDeserializer::deserialize(
"OnUnauthenticatedRequest",
stack,
)?,
);
}
"Scope" => {
obj.scope = Some(AuthenticateOidcActionScopeDeserializer::deserialize(
"Scope", stack,
)?);
}
"SessionCookieName" => {
obj.session_cookie_name = Some(
AuthenticateOidcActionSessionCookieNameDeserializer::deserialize(
"SessionCookieName",
stack,
)?,
);
}
"SessionTimeout" => {
obj.session_timeout = Some(
AuthenticateOidcActionSessionTimeoutDeserializer::deserialize(
"SessionTimeout",
stack,
)?,
);
}
"TokenEndpoint" => {
obj.token_endpoint =
AuthenticateOidcActionTokenEndpointDeserializer::deserialize(
"TokenEndpoint",
stack,
)?;
}
"UseExistingClientSecret" => {
obj.use_existing_client_secret = Some(
AuthenticateOidcActionUseExistingClientSecretDeserializer::deserialize(
"UseExistingClientSecret",
stack,
)?,
);
}
"UserInfoEndpoint" => {
obj.user_info_endpoint =
AuthenticateOidcActionUserInfoEndpointDeserializer::deserialize(
"UserInfoEndpoint",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AuthenticateOidcActionConfigSerializer;
impl AuthenticateOidcActionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AuthenticateOidcActionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.authentication_request_extra_params {
AuthenticateOidcActionAuthenticationRequestExtraParamsSerializer::serialize(
params,
&format!("{}{}", prefix, "AuthenticationRequestExtraParams"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "AuthorizationEndpoint"),
&obj.authorization_endpoint,
);
params.put(&format!("{}{}", prefix, "ClientId"), &obj.client_id);
if let Some(ref field_value) = obj.client_secret {
params.put(&format!("{}{}", prefix, "ClientSecret"), &field_value);
}
params.put(&format!("{}{}", prefix, "Issuer"), &obj.issuer);
if let Some(ref field_value) = obj.on_unauthenticated_request {
params.put(
&format!("{}{}", prefix, "OnUnauthenticatedRequest"),
&field_value,
);
}
if let Some(ref field_value) = obj.scope {
params.put(&format!("{}{}", prefix, "Scope"), &field_value);
}
if let Some(ref field_value) = obj.session_cookie_name {
params.put(&format!("{}{}", prefix, "SessionCookieName"), &field_value);
}
if let Some(ref field_value) = obj.session_timeout {
params.put(&format!("{}{}", prefix, "SessionTimeout"), &field_value);
}
params.put(
&format!("{}{}", prefix, "TokenEndpoint"),
&obj.token_endpoint,
);
if let Some(ref field_value) = obj.use_existing_client_secret {
params.put(
&format!("{}{}", prefix, "UseExistingClientSecret"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "UserInfoEndpoint"),
&obj.user_info_endpoint,
);
}
}
struct AuthenticateOidcActionIssuerDeserializer;
impl AuthenticateOidcActionIssuerDeserializer {
#[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 AuthenticateOidcActionScopeDeserializer;
impl AuthenticateOidcActionScopeDeserializer {
#[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 AuthenticateOidcActionSessionCookieNameDeserializer;
impl AuthenticateOidcActionSessionCookieNameDeserializer {
#[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 AuthenticateOidcActionSessionTimeoutDeserializer;
impl AuthenticateOidcActionSessionTimeoutDeserializer {
#[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 AuthenticateOidcActionTokenEndpointDeserializer;
impl AuthenticateOidcActionTokenEndpointDeserializer {
#[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 AuthenticateOidcActionUseExistingClientSecretDeserializer;
impl AuthenticateOidcActionUseExistingClientSecretDeserializer {
#[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 AuthenticateOidcActionUserInfoEndpointDeserializer;
impl AuthenticateOidcActionUserInfoEndpointDeserializer {
#[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 AvailabilityZone {
pub load_balancer_addresses: Option<Vec<LoadBalancerAddress>>,
pub subnet_id: Option<String>,
pub zone_name: Option<String>,
}
struct AvailabilityZoneDeserializer;
impl AvailabilityZoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AvailabilityZone, XmlParseError> {
deserialize_elements::<_, AvailabilityZone, _>(tag_name, stack, |name, stack, obj| {
match name {
"LoadBalancerAddresses" => {
obj.load_balancer_addresses.get_or_insert(vec![]).extend(
LoadBalancerAddressesDeserializer::deserialize(
"LoadBalancerAddresses",
stack,
)?,
);
}
"SubnetId" => {
obj.subnet_id = Some(SubnetIdDeserializer::deserialize("SubnetId", stack)?);
}
"ZoneName" => {
obj.zone_name = Some(ZoneNameDeserializer::deserialize("ZoneName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AvailabilityZonesDeserializer;
impl AvailabilityZonesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AvailabilityZone>, 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 CanonicalHostedZoneIdDeserializer;
impl CanonicalHostedZoneIdDeserializer {
#[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 Certificate {
pub certificate_arn: Option<String>,
pub is_default: Option<bool>,
}
struct CertificateDeserializer;
impl CertificateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Certificate, XmlParseError> {
deserialize_elements::<_, Certificate, _>(tag_name, stack, |name, stack, obj| {
match name {
"CertificateArn" => {
obj.certificate_arn = Some(CertificateArnDeserializer::deserialize(
"CertificateArn",
stack,
)?);
}
"IsDefault" => {
obj.is_default = Some(DefaultDeserializer::deserialize("IsDefault", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct CertificateSerializer;
impl CertificateSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Certificate) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.certificate_arn {
params.put(&format!("{}{}", prefix, "CertificateArn"), &field_value);
}
if let Some(ref field_value) = obj.is_default {
params.put(&format!("{}{}", prefix, "IsDefault"), &field_value);
}
}
}
struct CertificateArnDeserializer;
impl CertificateArnDeserializer {
#[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 CertificateListDeserializer;
impl CertificateListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Certificate>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(CertificateDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct CertificateListSerializer;
impl CertificateListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Certificate>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
CertificateSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Cipher {
pub name: Option<String>,
pub priority: Option<i64>,
}
struct CipherDeserializer;
impl CipherDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Cipher, XmlParseError> {
deserialize_elements::<_, Cipher, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(CipherNameDeserializer::deserialize("Name", stack)?);
}
"Priority" => {
obj.priority =
Some(CipherPriorityDeserializer::deserialize("Priority", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct CipherNameDeserializer;
impl CipherNameDeserializer {
#[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 CipherPriorityDeserializer;
impl CipherPriorityDeserializer {
#[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 CiphersDeserializer;
impl CiphersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Cipher>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(CipherDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ConditionFieldNameDeserializer;
impl ConditionFieldNameDeserializer {
#[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 CreateListenerInput {
pub certificates: Option<Vec<Certificate>>,
pub default_actions: Vec<Action>,
pub load_balancer_arn: String,
pub port: i64,
pub protocol: String,
pub ssl_policy: Option<String>,
}
struct CreateListenerInputSerializer;
impl CreateListenerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateListenerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.certificates {
CertificateListSerializer::serialize(
params,
&format!("{}{}", prefix, "Certificates"),
field_value,
);
}
ActionsSerializer::serialize(
params,
&format!("{}{}", prefix, "DefaultActions"),
&obj.default_actions,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerArn"),
&obj.load_balancer_arn,
);
params.put(&format!("{}{}", prefix, "Port"), &obj.port);
params.put(&format!("{}{}", prefix, "Protocol"), &obj.protocol);
if let Some(ref field_value) = obj.ssl_policy {
params.put(&format!("{}{}", prefix, "SslPolicy"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateListenerOutput {
pub listeners: Option<Vec<Listener>>,
}
struct CreateListenerOutputDeserializer;
impl CreateListenerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateListenerOutput, XmlParseError> {
deserialize_elements::<_, CreateListenerOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Listeners" => {
obj.listeners
.get_or_insert(vec![])
.extend(ListenersDeserializer::deserialize("Listeners", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoadBalancerInput {
pub ip_address_type: Option<String>,
pub name: String,
pub scheme: Option<String>,
pub security_groups: Option<Vec<String>>,
pub subnet_mappings: Option<Vec<SubnetMapping>>,
pub subnets: Option<Vec<String>>,
pub tags: Option<Vec<Tag>>,
pub type_: Option<String>,
}
struct CreateLoadBalancerInputSerializer;
impl CreateLoadBalancerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateLoadBalancerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.ip_address_type {
params.put(&format!("{}{}", prefix, "IpAddressType"), &field_value);
}
params.put(&format!("{}{}", prefix, "Name"), &obj.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.subnet_mappings {
SubnetMappingsSerializer::serialize(
params,
&format!("{}{}", prefix, "SubnetMappings"),
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);
}
if let Some(ref field_value) = obj.type_ {
params.put(&format!("{}{}", prefix, "Type"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateLoadBalancerOutput {
pub load_balancers: Option<Vec<LoadBalancer>>,
}
struct CreateLoadBalancerOutputDeserializer;
impl CreateLoadBalancerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateLoadBalancerOutput, XmlParseError> {
deserialize_elements::<_, CreateLoadBalancerOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoadBalancers" => {
obj.load_balancers.get_or_insert(vec![]).extend(
LoadBalancersDeserializer::deserialize("LoadBalancers", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateRuleInput {
pub actions: Vec<Action>,
pub conditions: Vec<RuleCondition>,
pub listener_arn: String,
pub priority: i64,
}
struct CreateRuleInputSerializer;
impl CreateRuleInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateRuleInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ActionsSerializer::serialize(params, &format!("{}{}", prefix, "Actions"), &obj.actions);
RuleConditionListSerializer::serialize(
params,
&format!("{}{}", prefix, "Conditions"),
&obj.conditions,
);
params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
params.put(&format!("{}{}", prefix, "Priority"), &obj.priority);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateRuleOutput {
pub rules: Option<Vec<Rule>>,
}
struct CreateRuleOutputDeserializer;
impl CreateRuleOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateRuleOutput, XmlParseError> {
deserialize_elements::<_, CreateRuleOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Rules" => {
obj.rules
.get_or_insert(vec![])
.extend(RulesDeserializer::deserialize("Rules", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTargetGroupInput {
pub health_check_enabled: Option<bool>,
pub health_check_interval_seconds: Option<i64>,
pub health_check_path: Option<String>,
pub health_check_port: Option<String>,
pub health_check_protocol: Option<String>,
pub health_check_timeout_seconds: Option<i64>,
pub healthy_threshold_count: Option<i64>,
pub matcher: Option<Matcher>,
pub name: String,
pub port: Option<i64>,
pub protocol: Option<String>,
pub target_type: Option<String>,
pub unhealthy_threshold_count: Option<i64>,
pub vpc_id: Option<String>,
}
struct CreateTargetGroupInputSerializer;
impl CreateTargetGroupInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateTargetGroupInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.health_check_enabled {
params.put(&format!("{}{}", prefix, "HealthCheckEnabled"), &field_value);
}
if let Some(ref field_value) = obj.health_check_interval_seconds {
params.put(
&format!("{}{}", prefix, "HealthCheckIntervalSeconds"),
&field_value,
);
}
if let Some(ref field_value) = obj.health_check_path {
params.put(&format!("{}{}", prefix, "HealthCheckPath"), &field_value);
}
if let Some(ref field_value) = obj.health_check_port {
params.put(&format!("{}{}", prefix, "HealthCheckPort"), &field_value);
}
if let Some(ref field_value) = obj.health_check_protocol {
params.put(
&format!("{}{}", prefix, "HealthCheckProtocol"),
&field_value,
);
}
if let Some(ref field_value) = obj.health_check_timeout_seconds {
params.put(
&format!("{}{}", prefix, "HealthCheckTimeoutSeconds"),
&field_value,
);
}
if let Some(ref field_value) = obj.healthy_threshold_count {
params.put(
&format!("{}{}", prefix, "HealthyThresholdCount"),
&field_value,
);
}
if let Some(ref field_value) = obj.matcher {
MatcherSerializer::serialize(params, &format!("{}{}", prefix, "Matcher"), field_value);
}
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.protocol {
params.put(&format!("{}{}", prefix, "Protocol"), &field_value);
}
if let Some(ref field_value) = obj.target_type {
params.put(&format!("{}{}", prefix, "TargetType"), &field_value);
}
if let Some(ref field_value) = obj.unhealthy_threshold_count {
params.put(
&format!("{}{}", prefix, "UnhealthyThresholdCount"),
&field_value,
);
}
if let Some(ref field_value) = obj.vpc_id {
params.put(&format!("{}{}", prefix, "VpcId"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTargetGroupOutput {
pub target_groups: Option<Vec<TargetGroup>>,
}
struct CreateTargetGroupOutputDeserializer;
impl CreateTargetGroupOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateTargetGroupOutput, XmlParseError> {
deserialize_elements::<_, CreateTargetGroupOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TargetGroups" => {
obj.target_groups.get_or_insert(vec![]).extend(
TargetGroupsDeserializer::deserialize("TargetGroups", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
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)
}
}
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 DefaultDeserializer;
impl DefaultDeserializer {
#[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)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteListenerInput {
pub listener_arn: String,
}
struct DeleteListenerInputSerializer;
impl DeleteListenerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteListenerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteListenerOutput {}
struct DeleteListenerOutputDeserializer;
impl DeleteListenerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteListenerOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteListenerOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteLoadBalancerInput {
pub load_balancer_arn: String,
}
struct DeleteLoadBalancerInputSerializer;
impl DeleteLoadBalancerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteLoadBalancerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerArn"),
&obj.load_balancer_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteLoadBalancerOutput {}
struct DeleteLoadBalancerOutputDeserializer;
impl DeleteLoadBalancerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteLoadBalancerOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteLoadBalancerOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteRuleInput {
pub rule_arn: String,
}
struct DeleteRuleInputSerializer;
impl DeleteRuleInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteRuleInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "RuleArn"), &obj.rule_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteRuleOutput {}
struct DeleteRuleOutputDeserializer;
impl DeleteRuleOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteRuleOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteRuleOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTargetGroupInput {
pub target_group_arn: String,
}
struct DeleteTargetGroupInputSerializer;
impl DeleteTargetGroupInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteTargetGroupInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "TargetGroupArn"),
&obj.target_group_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTargetGroupOutput {}
struct DeleteTargetGroupOutputDeserializer;
impl DeleteTargetGroupOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteTargetGroupOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteTargetGroupOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeregisterTargetsInput {
pub target_group_arn: String,
pub targets: Vec<TargetDescription>,
}
struct DeregisterTargetsInputSerializer;
impl DeregisterTargetsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeregisterTargetsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "TargetGroupArn"),
&obj.target_group_arn,
);
TargetDescriptionsSerializer::serialize(
params,
&format!("{}{}", prefix, "Targets"),
&obj.targets,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeregisterTargetsOutput {}
struct DeregisterTargetsOutputDeserializer;
impl DeregisterTargetsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeregisterTargetsOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeregisterTargetsOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[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 DescribeListenerCertificatesInput {
pub listener_arn: String,
pub marker: Option<String>,
pub page_size: Option<i64>,
}
struct DescribeListenerCertificatesInputSerializer;
impl DescribeListenerCertificatesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeListenerCertificatesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
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 DescribeListenerCertificatesOutput {
pub certificates: Option<Vec<Certificate>>,
pub next_marker: Option<String>,
}
struct DescribeListenerCertificatesOutputDeserializer;
impl DescribeListenerCertificatesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeListenerCertificatesOutput, XmlParseError> {
deserialize_elements::<_, DescribeListenerCertificatesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Certificates" => {
obj.certificates.get_or_insert(vec![]).extend(
CertificateListDeserializer::deserialize("Certificates", stack)?,
);
}
"NextMarker" => {
obj.next_marker =
Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeListenersInput {
pub listener_arns: Option<Vec<String>>,
pub load_balancer_arn: Option<String>,
pub marker: Option<String>,
pub page_size: Option<i64>,
}
struct DescribeListenersInputSerializer;
impl DescribeListenersInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeListenersInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.listener_arns {
ListenerArnsSerializer::serialize(
params,
&format!("{}{}", prefix, "ListenerArns"),
field_value,
);
}
if let Some(ref field_value) = obj.load_balancer_arn {
params.put(&format!("{}{}", prefix, "LoadBalancerArn"), &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 DescribeListenersOutput {
pub listeners: Option<Vec<Listener>>,
pub next_marker: Option<String>,
}
struct DescribeListenersOutputDeserializer;
impl DescribeListenersOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeListenersOutput, XmlParseError> {
deserialize_elements::<_, DescribeListenersOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Listeners" => {
obj.listeners
.get_or_insert(vec![])
.extend(ListenersDeserializer::deserialize("Listeners", stack)?);
}
"NextMarker" => {
obj.next_marker =
Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerAttributesInput {
pub load_balancer_arn: 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, "LoadBalancerArn"),
&obj.load_balancer_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancerAttributesOutput {
pub attributes: Option<Vec<LoadBalancerAttribute>>,
}
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 {
"Attributes" => {
obj.attributes.get_or_insert(vec![]).extend(
LoadBalancerAttributesDeserializer::deserialize("Attributes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoadBalancersInput {
pub load_balancer_arns: Option<Vec<String>>,
pub marker: Option<String>,
pub names: Option<Vec<String>>,
pub page_size: Option<i64>,
}
struct DescribeLoadBalancersInputSerializer;
impl DescribeLoadBalancersInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancersInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.load_balancer_arns {
LoadBalancerArnsSerializer::serialize(
params,
&format!("{}{}", prefix, "LoadBalancerArns"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.names {
LoadBalancerNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "Names"),
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 DescribeLoadBalancersOutput {
pub load_balancers: Option<Vec<LoadBalancer>>,
pub next_marker: Option<String>,
}
struct DescribeLoadBalancersOutputDeserializer;
impl DescribeLoadBalancersOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeLoadBalancersOutput, XmlParseError> {
deserialize_elements::<_, DescribeLoadBalancersOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoadBalancers" => {
obj.load_balancers.get_or_insert(vec![]).extend(
LoadBalancersDeserializer::deserialize("LoadBalancers", stack)?,
);
}
"NextMarker" => {
obj.next_marker =
Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeRulesInput {
pub listener_arn: Option<String>,
pub marker: Option<String>,
pub page_size: Option<i64>,
pub rule_arns: Option<Vec<String>>,
}
struct DescribeRulesInputSerializer;
impl DescribeRulesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeRulesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.listener_arn {
params.put(&format!("{}{}", prefix, "ListenerArn"), &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);
}
if let Some(ref field_value) = obj.rule_arns {
RuleArnsSerializer::serialize(
params,
&format!("{}{}", prefix, "RuleArns"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeRulesOutput {
pub next_marker: Option<String>,
pub rules: Option<Vec<Rule>>,
}
struct DescribeRulesOutputDeserializer;
impl DescribeRulesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeRulesOutput, XmlParseError> {
deserialize_elements::<_, DescribeRulesOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"NextMarker" => {
obj.next_marker = Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
"Rules" => {
obj.rules
.get_or_insert(vec![])
.extend(RulesDeserializer::deserialize("Rules", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeSSLPoliciesInput {
pub marker: Option<String>,
pub names: Option<Vec<String>>,
pub page_size: Option<i64>,
}
struct DescribeSSLPoliciesInputSerializer;
impl DescribeSSLPoliciesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeSSLPoliciesInput) {
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.names {
SslPolicyNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "Names"),
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 DescribeSSLPoliciesOutput {
pub next_marker: Option<String>,
pub ssl_policies: Option<Vec<SslPolicy>>,
}
struct DescribeSSLPoliciesOutputDeserializer;
impl DescribeSSLPoliciesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeSSLPoliciesOutput, XmlParseError> {
deserialize_elements::<_, DescribeSSLPoliciesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextMarker" => {
obj.next_marker =
Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
"SslPolicies" => {
obj.ssl_policies
.get_or_insert(vec![])
.extend(SslPoliciesDeserializer::deserialize("SslPolicies", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTagsInput {
pub resource_arns: 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(".");
}
ResourceArnsSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceArns"),
&obj.resource_arns,
);
}
}
#[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(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTargetGroupAttributesInput {
pub target_group_arn: String,
}
struct DescribeTargetGroupAttributesInputSerializer;
impl DescribeTargetGroupAttributesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeTargetGroupAttributesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "TargetGroupArn"),
&obj.target_group_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTargetGroupAttributesOutput {
pub attributes: Option<Vec<TargetGroupAttribute>>,
}
struct DescribeTargetGroupAttributesOutputDeserializer;
impl DescribeTargetGroupAttributesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeTargetGroupAttributesOutput, XmlParseError> {
deserialize_elements::<_, DescribeTargetGroupAttributesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Attributes" => {
obj.attributes.get_or_insert(vec![]).extend(
TargetGroupAttributesDeserializer::deserialize("Attributes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTargetGroupsInput {
pub load_balancer_arn: Option<String>,
pub marker: Option<String>,
pub names: Option<Vec<String>>,
pub page_size: Option<i64>,
pub target_group_arns: Option<Vec<String>>,
}
struct DescribeTargetGroupsInputSerializer;
impl DescribeTargetGroupsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeTargetGroupsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.load_balancer_arn {
params.put(&format!("{}{}", prefix, "LoadBalancerArn"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.names {
TargetGroupNamesSerializer::serialize(
params,
&format!("{}{}", prefix, "Names"),
field_value,
);
}
if let Some(ref field_value) = obj.page_size {
params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
}
if let Some(ref field_value) = obj.target_group_arns {
TargetGroupArnsSerializer::serialize(
params,
&format!("{}{}", prefix, "TargetGroupArns"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTargetGroupsOutput {
pub next_marker: Option<String>,
pub target_groups: Option<Vec<TargetGroup>>,
}
struct DescribeTargetGroupsOutputDeserializer;
impl DescribeTargetGroupsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeTargetGroupsOutput, XmlParseError> {
deserialize_elements::<_, DescribeTargetGroupsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextMarker" => {
obj.next_marker =
Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
}
"TargetGroups" => {
obj.target_groups.get_or_insert(vec![]).extend(
TargetGroupsDeserializer::deserialize("TargetGroups", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTargetHealthInput {
pub target_group_arn: String,
pub targets: Option<Vec<TargetDescription>>,
}
struct DescribeTargetHealthInputSerializer;
impl DescribeTargetHealthInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeTargetHealthInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "TargetGroupArn"),
&obj.target_group_arn,
);
if let Some(ref field_value) = obj.targets {
TargetDescriptionsSerializer::serialize(
params,
&format!("{}{}", prefix, "Targets"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTargetHealthOutput {
pub target_health_descriptions: Option<Vec<TargetHealthDescription>>,
}
struct DescribeTargetHealthOutputDeserializer;
impl DescribeTargetHealthOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeTargetHealthOutput, XmlParseError> {
deserialize_elements::<_, DescribeTargetHealthOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TargetHealthDescriptions" => {
obj.target_health_descriptions.get_or_insert(vec![]).extend(
TargetHealthDescriptionsDeserializer::deserialize(
"TargetHealthDescriptions",
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 FixedResponseActionConfig {
pub content_type: Option<String>,
pub message_body: Option<String>,
pub status_code: String,
}
struct FixedResponseActionConfigDeserializer;
impl FixedResponseActionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<FixedResponseActionConfig, XmlParseError> {
deserialize_elements::<_, FixedResponseActionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ContentType" => {
obj.content_type =
Some(FixedResponseActionContentTypeDeserializer::deserialize(
"ContentType",
stack,
)?);
}
"MessageBody" => {
obj.message_body =
Some(FixedResponseActionMessageDeserializer::deserialize(
"MessageBody",
stack,
)?);
}
"StatusCode" => {
obj.status_code = FixedResponseActionStatusCodeDeserializer::deserialize(
"StatusCode",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct FixedResponseActionConfigSerializer;
impl FixedResponseActionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &FixedResponseActionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.content_type {
params.put(&format!("{}{}", prefix, "ContentType"), &field_value);
}
if let Some(ref field_value) = obj.message_body {
params.put(&format!("{}{}", prefix, "MessageBody"), &field_value);
}
params.put(&format!("{}{}", prefix, "StatusCode"), &obj.status_code);
}
}
struct FixedResponseActionContentTypeDeserializer;
impl FixedResponseActionContentTypeDeserializer {
#[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 FixedResponseActionMessageDeserializer;
impl FixedResponseActionMessageDeserializer {
#[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 FixedResponseActionStatusCodeDeserializer;
impl FixedResponseActionStatusCodeDeserializer {
#[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 HealthCheckEnabledDeserializer;
impl HealthCheckEnabledDeserializer {
#[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 HealthCheckIntervalSecondsDeserializer;
impl HealthCheckIntervalSecondsDeserializer {
#[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 HealthCheckPortDeserializer;
impl HealthCheckPortDeserializer {
#[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 HealthCheckThresholdCountDeserializer;
impl HealthCheckThresholdCountDeserializer {
#[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 HealthCheckTimeoutSecondsDeserializer;
impl HealthCheckTimeoutSecondsDeserializer {
#[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 HostHeaderConditionConfig {
pub values: Option<Vec<String>>,
}
struct HostHeaderConditionConfigDeserializer;
impl HostHeaderConditionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HostHeaderConditionConfig, XmlParseError> {
deserialize_elements::<_, HostHeaderConditionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Values" => {
obj.values
.get_or_insert(vec![])
.extend(ListOfStringDeserializer::deserialize("Values", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct HostHeaderConditionConfigSerializer;
impl HostHeaderConditionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &HostHeaderConditionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.values {
ListOfStringSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
struct HttpCodeDeserializer;
impl HttpCodeDeserializer {
#[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 HttpHeaderConditionConfig {
pub http_header_name: Option<String>,
pub values: Option<Vec<String>>,
}
struct HttpHeaderConditionConfigDeserializer;
impl HttpHeaderConditionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HttpHeaderConditionConfig, XmlParseError> {
deserialize_elements::<_, HttpHeaderConditionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HttpHeaderName" => {
obj.http_header_name =
Some(HttpHeaderConditionNameDeserializer::deserialize(
"HttpHeaderName",
stack,
)?);
}
"Values" => {
obj.values
.get_or_insert(vec![])
.extend(ListOfStringDeserializer::deserialize("Values", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct HttpHeaderConditionConfigSerializer;
impl HttpHeaderConditionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &HttpHeaderConditionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.http_header_name {
params.put(&format!("{}{}", prefix, "HttpHeaderName"), &field_value);
}
if let Some(ref field_value) = obj.values {
ListOfStringSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
struct HttpHeaderConditionNameDeserializer;
impl HttpHeaderConditionNameDeserializer {
#[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 HttpRequestMethodConditionConfig {
pub values: Option<Vec<String>>,
}
struct HttpRequestMethodConditionConfigDeserializer;
impl HttpRequestMethodConditionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HttpRequestMethodConditionConfig, XmlParseError> {
deserialize_elements::<_, HttpRequestMethodConditionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Values" => {
obj.values
.get_or_insert(vec![])
.extend(ListOfStringDeserializer::deserialize("Values", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct HttpRequestMethodConditionConfigSerializer;
impl HttpRequestMethodConditionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &HttpRequestMethodConditionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.values {
ListOfStringSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
struct IpAddressDeserializer;
impl IpAddressDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct IpAddressTypeDeserializer;
impl IpAddressTypeDeserializer {
#[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 IsDefaultDeserializer;
impl IsDefaultDeserializer {
#[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)
}
}
#[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(())
})
}
}
struct ListOfStringDeserializer;
impl ListOfStringDeserializer {
#[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(StringValueDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ListOfStringSerializer;
impl ListOfStringSerializer {
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 Listener {
pub certificates: Option<Vec<Certificate>>,
pub default_actions: Option<Vec<Action>>,
pub listener_arn: Option<String>,
pub load_balancer_arn: Option<String>,
pub port: Option<i64>,
pub protocol: Option<String>,
pub ssl_policy: 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 {
"Certificates" => {
obj.certificates.get_or_insert(vec![]).extend(
CertificateListDeserializer::deserialize("Certificates", stack)?,
);
}
"DefaultActions" => {
obj.default_actions
.get_or_insert(vec![])
.extend(ActionsDeserializer::deserialize("DefaultActions", stack)?);
}
"ListenerArn" => {
obj.listener_arn =
Some(ListenerArnDeserializer::deserialize("ListenerArn", stack)?);
}
"LoadBalancerArn" => {
obj.load_balancer_arn = Some(LoadBalancerArnDeserializer::deserialize(
"LoadBalancerArn",
stack,
)?);
}
"Port" => {
obj.port = Some(PortDeserializer::deserialize("Port", stack)?);
}
"Protocol" => {
obj.protocol = Some(ProtocolEnumDeserializer::deserialize("Protocol", stack)?);
}
"SslPolicy" => {
obj.ssl_policy =
Some(SslPolicyNameDeserializer::deserialize("SslPolicy", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ListenerArnDeserializer;
impl ListenerArnDeserializer {
#[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 ListenerArnsSerializer;
impl ListenerArnsSerializer {
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 ListenersDeserializer;
impl ListenersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Listener>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ListenerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoadBalancer {
pub availability_zones: Option<Vec<AvailabilityZone>>,
pub canonical_hosted_zone_id: Option<String>,
pub created_time: Option<String>,
pub dns_name: Option<String>,
pub ip_address_type: Option<String>,
pub load_balancer_arn: Option<String>,
pub load_balancer_name: Option<String>,
pub scheme: Option<String>,
pub security_groups: Option<Vec<String>>,
pub state: Option<LoadBalancerState>,
pub type_: Option<String>,
pub vpc_id: Option<String>,
}
struct LoadBalancerDeserializer;
impl LoadBalancerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancer, XmlParseError> {
deserialize_elements::<_, LoadBalancer, _>(tag_name, stack, |name, stack, obj| {
match name {
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
"CanonicalHostedZoneId" => {
obj.canonical_hosted_zone_id =
Some(CanonicalHostedZoneIdDeserializer::deserialize(
"CanonicalHostedZoneId",
stack,
)?);
}
"CreatedTime" => {
obj.created_time =
Some(CreatedTimeDeserializer::deserialize("CreatedTime", stack)?);
}
"DNSName" => {
obj.dns_name = Some(DNSNameDeserializer::deserialize("DNSName", stack)?);
}
"IpAddressType" => {
obj.ip_address_type = Some(IpAddressTypeDeserializer::deserialize(
"IpAddressType",
stack,
)?);
}
"LoadBalancerArn" => {
obj.load_balancer_arn = Some(LoadBalancerArnDeserializer::deserialize(
"LoadBalancerArn",
stack,
)?);
}
"LoadBalancerName" => {
obj.load_balancer_name = Some(LoadBalancerNameDeserializer::deserialize(
"LoadBalancerName",
stack,
)?);
}
"Scheme" => {
obj.scheme = Some(LoadBalancerSchemeEnumDeserializer::deserialize(
"Scheme", stack,
)?);
}
"SecurityGroups" => {
obj.security_groups.get_or_insert(vec![]).extend(
SecurityGroupsDeserializer::deserialize("SecurityGroups", stack)?,
);
}
"State" => {
obj.state = Some(LoadBalancerStateDeserializer::deserialize("State", stack)?);
}
"Type" => {
obj.type_ = Some(LoadBalancerTypeEnumDeserializer::deserialize(
"Type", stack,
)?);
}
"VpcId" => {
obj.vpc_id = Some(VpcIdDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoadBalancerAddress {
pub allocation_id: Option<String>,
pub ip_address: Option<String>,
}
struct LoadBalancerAddressDeserializer;
impl LoadBalancerAddressDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancerAddress, XmlParseError> {
deserialize_elements::<_, LoadBalancerAddress, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllocationId" => {
obj.allocation_id = Some(AllocationIdDeserializer::deserialize(
"AllocationId",
stack,
)?);
}
"IpAddress" => {
obj.ip_address = Some(IpAddressDeserializer::deserialize("IpAddress", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LoadBalancerAddressesDeserializer;
impl LoadBalancerAddressesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LoadBalancerAddress>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LoadBalancerAddressDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct LoadBalancerArnDeserializer;
impl LoadBalancerArnDeserializer {
#[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 LoadBalancerArnsDeserializer;
impl LoadBalancerArnsDeserializer {
#[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(LoadBalancerArnDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct LoadBalancerArnsSerializer;
impl LoadBalancerArnsSerializer {
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 LoadBalancerAttribute {
pub key: Option<String>,
pub value: Option<String>,
}
struct LoadBalancerAttributeDeserializer;
impl LoadBalancerAttributeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancerAttribute, XmlParseError> {
deserialize_elements::<_, LoadBalancerAttribute, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = Some(LoadBalancerAttributeKeyDeserializer::deserialize(
"Key", stack,
)?);
}
"Value" => {
obj.value = Some(LoadBalancerAttributeValueDeserializer::deserialize(
"Value", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LoadBalancerAttributeSerializer;
impl LoadBalancerAttributeSerializer {
fn serialize(params: &mut Params, name: &str, obj: &LoadBalancerAttribute) {
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 LoadBalancerAttributeKeyDeserializer;
impl LoadBalancerAttributeKeyDeserializer {
#[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 LoadBalancerAttributeValueDeserializer;
impl LoadBalancerAttributeValueDeserializer {
#[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 LoadBalancerAttributesDeserializer;
impl LoadBalancerAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LoadBalancerAttribute>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LoadBalancerAttributeDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct LoadBalancerAttributesSerializer;
impl LoadBalancerAttributesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<LoadBalancerAttribute>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
LoadBalancerAttributeSerializer::serialize(params, &key, obj);
}
}
}
struct LoadBalancerNameDeserializer;
impl LoadBalancerNameDeserializer {
#[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 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 LoadBalancerSchemeEnumDeserializer;
impl LoadBalancerSchemeEnumDeserializer {
#[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 LoadBalancerState {
pub code: Option<String>,
pub reason: Option<String>,
}
struct LoadBalancerStateDeserializer;
impl LoadBalancerStateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancerState, XmlParseError> {
deserialize_elements::<_, LoadBalancerState, _>(tag_name, stack, |name, stack, obj| {
match name {
"Code" => {
obj.code = Some(LoadBalancerStateEnumDeserializer::deserialize(
"Code", stack,
)?);
}
"Reason" => {
obj.reason = Some(StateReasonDeserializer::deserialize("Reason", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LoadBalancerStateEnumDeserializer;
impl LoadBalancerStateEnumDeserializer {
#[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 LoadBalancerTypeEnumDeserializer;
impl LoadBalancerTypeEnumDeserializer {
#[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 LoadBalancersDeserializer;
impl LoadBalancersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LoadBalancer>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LoadBalancerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
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)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Matcher {
pub http_code: String,
}
struct MatcherDeserializer;
impl MatcherDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Matcher, XmlParseError> {
deserialize_elements::<_, Matcher, _>(tag_name, stack, |name, stack, obj| {
match name {
"HttpCode" => {
obj.http_code = HttpCodeDeserializer::deserialize("HttpCode", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct MatcherSerializer;
impl MatcherSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Matcher) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "HttpCode"), &obj.http_code);
}
}
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 ModifyListenerInput {
pub certificates: Option<Vec<Certificate>>,
pub default_actions: Option<Vec<Action>>,
pub listener_arn: String,
pub port: Option<i64>,
pub protocol: Option<String>,
pub ssl_policy: Option<String>,
}
struct ModifyListenerInputSerializer;
impl ModifyListenerInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyListenerInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.certificates {
CertificateListSerializer::serialize(
params,
&format!("{}{}", prefix, "Certificates"),
field_value,
);
}
if let Some(ref field_value) = obj.default_actions {
ActionsSerializer::serialize(
params,
&format!("{}{}", prefix, "DefaultActions"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.protocol {
params.put(&format!("{}{}", prefix, "Protocol"), &field_value);
}
if let Some(ref field_value) = obj.ssl_policy {
params.put(&format!("{}{}", prefix, "SslPolicy"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyListenerOutput {
pub listeners: Option<Vec<Listener>>,
}
struct ModifyListenerOutputDeserializer;
impl ModifyListenerOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyListenerOutput, XmlParseError> {
deserialize_elements::<_, ModifyListenerOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Listeners" => {
obj.listeners
.get_or_insert(vec![])
.extend(ListenersDeserializer::deserialize("Listeners", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyLoadBalancerAttributesInput {
pub attributes: Vec<LoadBalancerAttribute>,
pub load_balancer_arn: 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, "Attributes"),
&obj.attributes,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerArn"),
&obj.load_balancer_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyLoadBalancerAttributesOutput {
pub attributes: Option<Vec<LoadBalancerAttribute>>,
}
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 {
"Attributes" => {
obj.attributes.get_or_insert(vec![]).extend(
LoadBalancerAttributesDeserializer::deserialize("Attributes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyRuleInput {
pub actions: Option<Vec<Action>>,
pub conditions: Option<Vec<RuleCondition>>,
pub rule_arn: String,
}
struct ModifyRuleInputSerializer;
impl ModifyRuleInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyRuleInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.actions {
ActionsSerializer::serialize(params, &format!("{}{}", prefix, "Actions"), field_value);
}
if let Some(ref field_value) = obj.conditions {
RuleConditionListSerializer::serialize(
params,
&format!("{}{}", prefix, "Conditions"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "RuleArn"), &obj.rule_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyRuleOutput {
pub rules: Option<Vec<Rule>>,
}
struct ModifyRuleOutputDeserializer;
impl ModifyRuleOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyRuleOutput, XmlParseError> {
deserialize_elements::<_, ModifyRuleOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Rules" => {
obj.rules
.get_or_insert(vec![])
.extend(RulesDeserializer::deserialize("Rules", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyTargetGroupAttributesInput {
pub attributes: Vec<TargetGroupAttribute>,
pub target_group_arn: String,
}
struct ModifyTargetGroupAttributesInputSerializer;
impl ModifyTargetGroupAttributesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyTargetGroupAttributesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
TargetGroupAttributesSerializer::serialize(
params,
&format!("{}{}", prefix, "Attributes"),
&obj.attributes,
);
params.put(
&format!("{}{}", prefix, "TargetGroupArn"),
&obj.target_group_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyTargetGroupAttributesOutput {
pub attributes: Option<Vec<TargetGroupAttribute>>,
}
struct ModifyTargetGroupAttributesOutputDeserializer;
impl ModifyTargetGroupAttributesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyTargetGroupAttributesOutput, XmlParseError> {
deserialize_elements::<_, ModifyTargetGroupAttributesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Attributes" => {
obj.attributes.get_or_insert(vec![]).extend(
TargetGroupAttributesDeserializer::deserialize("Attributes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyTargetGroupInput {
pub health_check_enabled: Option<bool>,
pub health_check_interval_seconds: Option<i64>,
pub health_check_path: Option<String>,
pub health_check_port: Option<String>,
pub health_check_protocol: Option<String>,
pub health_check_timeout_seconds: Option<i64>,
pub healthy_threshold_count: Option<i64>,
pub matcher: Option<Matcher>,
pub target_group_arn: String,
pub unhealthy_threshold_count: Option<i64>,
}
struct ModifyTargetGroupInputSerializer;
impl ModifyTargetGroupInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyTargetGroupInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.health_check_enabled {
params.put(&format!("{}{}", prefix, "HealthCheckEnabled"), &field_value);
}
if let Some(ref field_value) = obj.health_check_interval_seconds {
params.put(
&format!("{}{}", prefix, "HealthCheckIntervalSeconds"),
&field_value,
);
}
if let Some(ref field_value) = obj.health_check_path {
params.put(&format!("{}{}", prefix, "HealthCheckPath"), &field_value);
}
if let Some(ref field_value) = obj.health_check_port {
params.put(&format!("{}{}", prefix, "HealthCheckPort"), &field_value);
}
if let Some(ref field_value) = obj.health_check_protocol {
params.put(
&format!("{}{}", prefix, "HealthCheckProtocol"),
&field_value,
);
}
if let Some(ref field_value) = obj.health_check_timeout_seconds {
params.put(
&format!("{}{}", prefix, "HealthCheckTimeoutSeconds"),
&field_value,
);
}
if let Some(ref field_value) = obj.healthy_threshold_count {
params.put(
&format!("{}{}", prefix, "HealthyThresholdCount"),
&field_value,
);
}
if let Some(ref field_value) = obj.matcher {
MatcherSerializer::serialize(params, &format!("{}{}", prefix, "Matcher"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetGroupArn"),
&obj.target_group_arn,
);
if let Some(ref field_value) = obj.unhealthy_threshold_count {
params.put(
&format!("{}{}", prefix, "UnhealthyThresholdCount"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyTargetGroupOutput {
pub target_groups: Option<Vec<TargetGroup>>,
}
struct ModifyTargetGroupOutputDeserializer;
impl ModifyTargetGroupOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyTargetGroupOutput, XmlParseError> {
deserialize_elements::<_, ModifyTargetGroupOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TargetGroups" => {
obj.target_groups.get_or_insert(vec![]).extend(
TargetGroupsDeserializer::deserialize("TargetGroups", 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)
}
}
struct PathDeserializer;
impl PathDeserializer {
#[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 PathPatternConditionConfig {
pub values: Option<Vec<String>>,
}
struct PathPatternConditionConfigDeserializer;
impl PathPatternConditionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PathPatternConditionConfig, XmlParseError> {
deserialize_elements::<_, PathPatternConditionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Values" => {
obj.values
.get_or_insert(vec![])
.extend(ListOfStringDeserializer::deserialize("Values", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct PathPatternConditionConfigSerializer;
impl PathPatternConditionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PathPatternConditionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.values {
ListOfStringSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
struct PortDeserializer;
impl PortDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ProtocolEnumDeserializer;
impl ProtocolEnumDeserializer {
#[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 QueryStringConditionConfig {
pub values: Option<Vec<QueryStringKeyValuePair>>,
}
struct QueryStringConditionConfigDeserializer;
impl QueryStringConditionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<QueryStringConditionConfig, XmlParseError> {
deserialize_elements::<_, QueryStringConditionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Values" => {
obj.values.get_or_insert(vec![]).extend(
QueryStringKeyValuePairListDeserializer::deserialize("Values", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct QueryStringConditionConfigSerializer;
impl QueryStringConditionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &QueryStringConditionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.values {
QueryStringKeyValuePairListSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct QueryStringKeyValuePair {
pub key: Option<String>,
pub value: Option<String>,
}
struct QueryStringKeyValuePairDeserializer;
impl QueryStringKeyValuePairDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<QueryStringKeyValuePair, XmlParseError> {
deserialize_elements::<_, QueryStringKeyValuePair, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Key" => {
obj.key = Some(StringValueDeserializer::deserialize("Key", stack)?);
}
"Value" => {
obj.value = Some(StringValueDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct QueryStringKeyValuePairSerializer;
impl QueryStringKeyValuePairSerializer {
fn serialize(params: &mut Params, name: &str, obj: &QueryStringKeyValuePair) {
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 QueryStringKeyValuePairListDeserializer;
impl QueryStringKeyValuePairListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<QueryStringKeyValuePair>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(QueryStringKeyValuePairDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct QueryStringKeyValuePairListSerializer;
impl QueryStringKeyValuePairListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<QueryStringKeyValuePair>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
QueryStringKeyValuePairSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RedirectActionConfig {
pub host: Option<String>,
pub path: Option<String>,
pub port: Option<String>,
pub protocol: Option<String>,
pub query: Option<String>,
pub status_code: String,
}
struct RedirectActionConfigDeserializer;
impl RedirectActionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RedirectActionConfig, XmlParseError> {
deserialize_elements::<_, RedirectActionConfig, _>(tag_name, stack, |name, stack, obj| {
match name {
"Host" => {
obj.host = Some(RedirectActionHostDeserializer::deserialize("Host", stack)?);
}
"Path" => {
obj.path = Some(RedirectActionPathDeserializer::deserialize("Path", stack)?);
}
"Port" => {
obj.port = Some(RedirectActionPortDeserializer::deserialize("Port", stack)?);
}
"Protocol" => {
obj.protocol = Some(RedirectActionProtocolDeserializer::deserialize(
"Protocol", stack,
)?);
}
"Query" => {
obj.query = Some(RedirectActionQueryDeserializer::deserialize(
"Query", stack,
)?);
}
"StatusCode" => {
obj.status_code =
RedirectActionStatusCodeEnumDeserializer::deserialize("StatusCode", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RedirectActionConfigSerializer;
impl RedirectActionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RedirectActionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.host {
params.put(&format!("{}{}", prefix, "Host"), &field_value);
}
if let Some(ref field_value) = obj.path {
params.put(&format!("{}{}", prefix, "Path"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.protocol {
params.put(&format!("{}{}", prefix, "Protocol"), &field_value);
}
if let Some(ref field_value) = obj.query {
params.put(&format!("{}{}", prefix, "Query"), &field_value);
}
params.put(&format!("{}{}", prefix, "StatusCode"), &obj.status_code);
}
}
struct RedirectActionHostDeserializer;
impl RedirectActionHostDeserializer {
#[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 RedirectActionPathDeserializer;
impl RedirectActionPathDeserializer {
#[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 RedirectActionPortDeserializer;
impl RedirectActionPortDeserializer {
#[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 RedirectActionProtocolDeserializer;
impl RedirectActionProtocolDeserializer {
#[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 RedirectActionQueryDeserializer;
impl RedirectActionQueryDeserializer {
#[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 RedirectActionStatusCodeEnumDeserializer;
impl RedirectActionStatusCodeEnumDeserializer {
#[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 RegisterTargetsInput {
pub target_group_arn: String,
pub targets: Vec<TargetDescription>,
}
struct RegisterTargetsInputSerializer;
impl RegisterTargetsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RegisterTargetsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "TargetGroupArn"),
&obj.target_group_arn,
);
TargetDescriptionsSerializer::serialize(
params,
&format!("{}{}", prefix, "Targets"),
&obj.targets,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RegisterTargetsOutput {}
struct RegisterTargetsOutputDeserializer;
impl RegisterTargetsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RegisterTargetsOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = RegisterTargetsOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveListenerCertificatesInput {
pub certificates: Vec<Certificate>,
pub listener_arn: String,
}
struct RemoveListenerCertificatesInputSerializer;
impl RemoveListenerCertificatesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveListenerCertificatesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
CertificateListSerializer::serialize(
params,
&format!("{}{}", prefix, "Certificates"),
&obj.certificates,
);
params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveListenerCertificatesOutput {}
struct RemoveListenerCertificatesOutputDeserializer;
impl RemoveListenerCertificatesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RemoveListenerCertificatesOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = RemoveListenerCertificatesOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveTagsInput {
pub resource_arns: Vec<String>,
pub tag_keys: Vec<String>,
}
struct RemoveTagsInputSerializer;
impl RemoveTagsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveTagsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ResourceArnsSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceArns"),
&obj.resource_arns,
);
TagKeysSerializer::serialize(params, &format!("{}{}", prefix, "TagKeys"), &obj.tag_keys);
}
}
#[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 ResourceArnDeserializer;
impl ResourceArnDeserializer {
#[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 ResourceArnsSerializer;
impl ResourceArnsSerializer {
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 Rule {
pub actions: Option<Vec<Action>>,
pub conditions: Option<Vec<RuleCondition>>,
pub is_default: Option<bool>,
pub priority: Option<String>,
pub rule_arn: Option<String>,
}
struct RuleDeserializer;
impl RuleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Rule, XmlParseError> {
deserialize_elements::<_, Rule, _>(tag_name, stack, |name, stack, obj| {
match name {
"Actions" => {
obj.actions
.get_or_insert(vec![])
.extend(ActionsDeserializer::deserialize("Actions", stack)?);
}
"Conditions" => {
obj.conditions.get_or_insert(vec![]).extend(
RuleConditionListDeserializer::deserialize("Conditions", stack)?,
);
}
"IsDefault" => {
obj.is_default = Some(IsDefaultDeserializer::deserialize("IsDefault", stack)?);
}
"Priority" => {
obj.priority = Some(StringDeserializer::deserialize("Priority", stack)?);
}
"RuleArn" => {
obj.rule_arn = Some(RuleArnDeserializer::deserialize("RuleArn", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RuleArnDeserializer;
impl RuleArnDeserializer {
#[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 RuleArnsSerializer;
impl RuleArnsSerializer {
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 RuleCondition {
pub field: Option<String>,
pub host_header_config: Option<HostHeaderConditionConfig>,
pub http_header_config: Option<HttpHeaderConditionConfig>,
pub http_request_method_config: Option<HttpRequestMethodConditionConfig>,
pub path_pattern_config: Option<PathPatternConditionConfig>,
pub query_string_config: Option<QueryStringConditionConfig>,
pub source_ip_config: Option<SourceIpConditionConfig>,
pub values: Option<Vec<String>>,
}
struct RuleConditionDeserializer;
impl RuleConditionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RuleCondition, XmlParseError> {
deserialize_elements::<_, RuleCondition, _>(tag_name, stack, |name, stack, obj| {
match name {
"Field" => {
obj.field = Some(ConditionFieldNameDeserializer::deserialize("Field", stack)?);
}
"HostHeaderConfig" => {
obj.host_header_config =
Some(HostHeaderConditionConfigDeserializer::deserialize(
"HostHeaderConfig",
stack,
)?);
}
"HttpHeaderConfig" => {
obj.http_header_config =
Some(HttpHeaderConditionConfigDeserializer::deserialize(
"HttpHeaderConfig",
stack,
)?);
}
"HttpRequestMethodConfig" => {
obj.http_request_method_config =
Some(HttpRequestMethodConditionConfigDeserializer::deserialize(
"HttpRequestMethodConfig",
stack,
)?);
}
"PathPatternConfig" => {
obj.path_pattern_config =
Some(PathPatternConditionConfigDeserializer::deserialize(
"PathPatternConfig",
stack,
)?);
}
"QueryStringConfig" => {
obj.query_string_config =
Some(QueryStringConditionConfigDeserializer::deserialize(
"QueryStringConfig",
stack,
)?);
}
"SourceIpConfig" => {
obj.source_ip_config = Some(SourceIpConditionConfigDeserializer::deserialize(
"SourceIpConfig",
stack,
)?);
}
"Values" => {
obj.values
.get_or_insert(vec![])
.extend(ListOfStringDeserializer::deserialize("Values", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RuleConditionSerializer;
impl RuleConditionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RuleCondition) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.field {
params.put(&format!("{}{}", prefix, "Field"), &field_value);
}
if let Some(ref field_value) = obj.host_header_config {
HostHeaderConditionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "HostHeaderConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.http_header_config {
HttpHeaderConditionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "HttpHeaderConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.http_request_method_config {
HttpRequestMethodConditionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "HttpRequestMethodConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.path_pattern_config {
PathPatternConditionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "PathPatternConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.query_string_config {
QueryStringConditionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "QueryStringConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.source_ip_config {
SourceIpConditionConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "SourceIpConfig"),
field_value,
);
}
if let Some(ref field_value) = obj.values {
ListOfStringSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
struct RuleConditionListDeserializer;
impl RuleConditionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RuleCondition>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(RuleConditionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RuleConditionListSerializer;
impl RuleConditionListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<RuleCondition>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
RuleConditionSerializer::serialize(params, &key, obj);
}
}
}
struct RulePriorityListSerializer;
impl RulePriorityListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<RulePriorityPair>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
RulePriorityPairSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RulePriorityPair {
pub priority: Option<i64>,
pub rule_arn: Option<String>,
}
struct RulePriorityPairSerializer;
impl RulePriorityPairSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RulePriorityPair) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.priority {
params.put(&format!("{}{}", prefix, "Priority"), &field_value);
}
if let Some(ref field_value) = obj.rule_arn {
params.put(&format!("{}{}", prefix, "RuleArn"), &field_value);
}
}
}
struct RulesDeserializer;
impl RulesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Rule>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(RuleDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
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 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 SetIpAddressTypeInput {
pub ip_address_type: String,
pub load_balancer_arn: String,
}
struct SetIpAddressTypeInputSerializer;
impl SetIpAddressTypeInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetIpAddressTypeInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "IpAddressType"),
&obj.ip_address_type,
);
params.put(
&format!("{}{}", prefix, "LoadBalancerArn"),
&obj.load_balancer_arn,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetIpAddressTypeOutput {
pub ip_address_type: Option<String>,
}
struct SetIpAddressTypeOutputDeserializer;
impl SetIpAddressTypeOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetIpAddressTypeOutput, XmlParseError> {
deserialize_elements::<_, SetIpAddressTypeOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"IpAddressType" => {
obj.ip_address_type = Some(IpAddressTypeDeserializer::deserialize(
"IpAddressType",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetRulePrioritiesInput {
pub rule_priorities: Vec<RulePriorityPair>,
}
struct SetRulePrioritiesInputSerializer;
impl SetRulePrioritiesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetRulePrioritiesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
RulePriorityListSerializer::serialize(
params,
&format!("{}{}", prefix, "RulePriorities"),
&obj.rule_priorities,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetRulePrioritiesOutput {
pub rules: Option<Vec<Rule>>,
}
struct SetRulePrioritiesOutputDeserializer;
impl SetRulePrioritiesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetRulePrioritiesOutput, XmlParseError> {
deserialize_elements::<_, SetRulePrioritiesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Rules" => {
obj.rules
.get_or_insert(vec![])
.extend(RulesDeserializer::deserialize("Rules", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetSecurityGroupsInput {
pub load_balancer_arn: String,
pub security_groups: Vec<String>,
}
struct SetSecurityGroupsInputSerializer;
impl SetSecurityGroupsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetSecurityGroupsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerArn"),
&obj.load_balancer_arn,
);
SecurityGroupsSerializer::serialize(
params,
&format!("{}{}", prefix, "SecurityGroups"),
&obj.security_groups,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetSecurityGroupsOutput {
pub security_group_ids: Option<Vec<String>>,
}
struct SetSecurityGroupsOutputDeserializer;
impl SetSecurityGroupsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetSecurityGroupsOutput, XmlParseError> {
deserialize_elements::<_, SetSecurityGroupsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SecurityGroupIds" => {
obj.security_group_ids.get_or_insert(vec![]).extend(
SecurityGroupsDeserializer::deserialize("SecurityGroupIds", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetSubnetsInput {
pub load_balancer_arn: String,
pub subnet_mappings: Option<Vec<SubnetMapping>>,
pub subnets: Option<Vec<String>>,
}
struct SetSubnetsInputSerializer;
impl SetSubnetsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetSubnetsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LoadBalancerArn"),
&obj.load_balancer_arn,
);
if let Some(ref field_value) = obj.subnet_mappings {
SubnetMappingsSerializer::serialize(
params,
&format!("{}{}", prefix, "SubnetMappings"),
field_value,
);
}
if let Some(ref field_value) = obj.subnets {
SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetSubnetsOutput {
pub availability_zones: Option<Vec<AvailabilityZone>>,
}
struct SetSubnetsOutputDeserializer;
impl SetSubnetsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SetSubnetsOutput, XmlParseError> {
deserialize_elements::<_, SetSubnetsOutput, _>(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 SourceIpConditionConfig {
pub values: Option<Vec<String>>,
}
struct SourceIpConditionConfigDeserializer;
impl SourceIpConditionConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SourceIpConditionConfig, XmlParseError> {
deserialize_elements::<_, SourceIpConditionConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Values" => {
obj.values
.get_or_insert(vec![])
.extend(ListOfStringDeserializer::deserialize("Values", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct SourceIpConditionConfigSerializer;
impl SourceIpConditionConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SourceIpConditionConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.values {
ListOfStringSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
struct SslPoliciesDeserializer;
impl SslPoliciesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SslPolicy>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SslPolicyDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SslPolicy {
pub ciphers: Option<Vec<Cipher>>,
pub name: Option<String>,
pub ssl_protocols: Option<Vec<String>>,
}
struct SslPolicyDeserializer;
impl SslPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SslPolicy, XmlParseError> {
deserialize_elements::<_, SslPolicy, _>(tag_name, stack, |name, stack, obj| {
match name {
"Ciphers" => {
obj.ciphers
.get_or_insert(vec![])
.extend(CiphersDeserializer::deserialize("Ciphers", stack)?);
}
"Name" => {
obj.name = Some(SslPolicyNameDeserializer::deserialize("Name", stack)?);
}
"SslProtocols" => {
obj.ssl_protocols.get_or_insert(vec![]).extend(
SslProtocolsDeserializer::deserialize("SslProtocols", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SslPolicyNameDeserializer;
impl SslPolicyNameDeserializer {
#[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 SslPolicyNamesSerializer;
impl SslPolicyNamesSerializer {
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 SslProtocolDeserializer;
impl SslProtocolDeserializer {
#[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 SslProtocolsDeserializer;
impl SslProtocolsDeserializer {
#[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(SslProtocolDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct StateReasonDeserializer;
impl StateReasonDeserializer {
#[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 StringDeserializer;
impl StringDeserializer {
#[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 StringValueDeserializer;
impl StringValueDeserializer {
#[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)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SubnetMapping {
pub allocation_id: Option<String>,
pub subnet_id: Option<String>,
}
struct SubnetMappingSerializer;
impl SubnetMappingSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SubnetMapping) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allocation_id {
params.put(&format!("{}{}", prefix, "AllocationId"), &field_value);
}
if let Some(ref field_value) = obj.subnet_id {
params.put(&format!("{}{}", prefix, "SubnetId"), &field_value);
}
}
}
struct SubnetMappingsSerializer;
impl SubnetMappingsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<SubnetMapping>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
SubnetMappingSerializer::serialize(params, &key, obj);
}
}
}
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 resource_arn: 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 {
"ResourceArn" => {
obj.resource_arn =
Some(ResourceArnDeserializer::deserialize("ResourceArn", 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 TagKeysSerializer;
impl TagKeysSerializer {
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 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)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TargetDescription {
pub availability_zone: Option<String>,
pub id: String,
pub port: Option<i64>,
}
struct TargetDescriptionDeserializer;
impl TargetDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TargetDescription, XmlParseError> {
deserialize_elements::<_, TargetDescription, _>(tag_name, stack, |name, stack, obj| {
match name {
"AvailabilityZone" => {
obj.availability_zone = Some(ZoneNameDeserializer::deserialize(
"AvailabilityZone",
stack,
)?);
}
"Id" => {
obj.id = TargetIdDeserializer::deserialize("Id", stack)?;
}
"Port" => {
obj.port = Some(PortDeserializer::deserialize("Port", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TargetDescriptionSerializer;
impl TargetDescriptionSerializer {
fn serialize(params: &mut Params, name: &str, obj: &TargetDescription) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.availability_zone {
params.put(&format!("{}{}", prefix, "AvailabilityZone"), &field_value);
}
params.put(&format!("{}{}", prefix, "Id"), &obj.id);
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
}
}
struct TargetDescriptionsSerializer;
impl TargetDescriptionsSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<TargetDescription>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TargetDescriptionSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TargetGroup {
pub health_check_enabled: Option<bool>,
pub health_check_interval_seconds: Option<i64>,
pub health_check_path: Option<String>,
pub health_check_port: Option<String>,
pub health_check_protocol: Option<String>,
pub health_check_timeout_seconds: Option<i64>,
pub healthy_threshold_count: Option<i64>,
pub load_balancer_arns: Option<Vec<String>>,
pub matcher: Option<Matcher>,
pub port: Option<i64>,
pub protocol: Option<String>,
pub target_group_arn: Option<String>,
pub target_group_name: Option<String>,
pub target_type: Option<String>,
pub unhealthy_threshold_count: Option<i64>,
pub vpc_id: Option<String>,
}
struct TargetGroupDeserializer;
impl TargetGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TargetGroup, XmlParseError> {
deserialize_elements::<_, TargetGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"HealthCheckEnabled" => {
obj.health_check_enabled = Some(HealthCheckEnabledDeserializer::deserialize(
"HealthCheckEnabled",
stack,
)?);
}
"HealthCheckIntervalSeconds" => {
obj.health_check_interval_seconds =
Some(HealthCheckIntervalSecondsDeserializer::deserialize(
"HealthCheckIntervalSeconds",
stack,
)?);
}
"HealthCheckPath" => {
obj.health_check_path =
Some(PathDeserializer::deserialize("HealthCheckPath", stack)?);
}
"HealthCheckPort" => {
obj.health_check_port = Some(HealthCheckPortDeserializer::deserialize(
"HealthCheckPort",
stack,
)?);
}
"HealthCheckProtocol" => {
obj.health_check_protocol = Some(ProtocolEnumDeserializer::deserialize(
"HealthCheckProtocol",
stack,
)?);
}
"HealthCheckTimeoutSeconds" => {
obj.health_check_timeout_seconds =
Some(HealthCheckTimeoutSecondsDeserializer::deserialize(
"HealthCheckTimeoutSeconds",
stack,
)?);
}
"HealthyThresholdCount" => {
obj.healthy_threshold_count =
Some(HealthCheckThresholdCountDeserializer::deserialize(
"HealthyThresholdCount",
stack,
)?);
}
"LoadBalancerArns" => {
obj.load_balancer_arns.get_or_insert(vec![]).extend(
LoadBalancerArnsDeserializer::deserialize("LoadBalancerArns", stack)?,
);
}
"Matcher" => {
obj.matcher = Some(MatcherDeserializer::deserialize("Matcher", stack)?);
}
"Port" => {
obj.port = Some(PortDeserializer::deserialize("Port", stack)?);
}
"Protocol" => {
obj.protocol = Some(ProtocolEnumDeserializer::deserialize("Protocol", stack)?);
}
"TargetGroupArn" => {
obj.target_group_arn = Some(TargetGroupArnDeserializer::deserialize(
"TargetGroupArn",
stack,
)?);
}
"TargetGroupName" => {
obj.target_group_name = Some(TargetGroupNameDeserializer::deserialize(
"TargetGroupName",
stack,
)?);
}
"TargetType" => {
obj.target_type = Some(TargetTypeEnumDeserializer::deserialize(
"TargetType",
stack,
)?);
}
"UnhealthyThresholdCount" => {
obj.unhealthy_threshold_count =
Some(HealthCheckThresholdCountDeserializer::deserialize(
"UnhealthyThresholdCount",
stack,
)?);
}
"VpcId" => {
obj.vpc_id = Some(VpcIdDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TargetGroupArnDeserializer;
impl TargetGroupArnDeserializer {
#[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 TargetGroupArnsSerializer;
impl TargetGroupArnsSerializer {
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 TargetGroupAttribute {
pub key: Option<String>,
pub value: Option<String>,
}
struct TargetGroupAttributeDeserializer;
impl TargetGroupAttributeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TargetGroupAttribute, XmlParseError> {
deserialize_elements::<_, TargetGroupAttribute, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = Some(TargetGroupAttributeKeyDeserializer::deserialize(
"Key", stack,
)?);
}
"Value" => {
obj.value = Some(TargetGroupAttributeValueDeserializer::deserialize(
"Value", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TargetGroupAttributeSerializer;
impl TargetGroupAttributeSerializer {
fn serialize(params: &mut Params, name: &str, obj: &TargetGroupAttribute) {
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 TargetGroupAttributeKeyDeserializer;
impl TargetGroupAttributeKeyDeserializer {
#[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 TargetGroupAttributeValueDeserializer;
impl TargetGroupAttributeValueDeserializer {
#[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 TargetGroupAttributesDeserializer;
impl TargetGroupAttributesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TargetGroupAttribute>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TargetGroupAttributeDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TargetGroupAttributesSerializer;
impl TargetGroupAttributesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<TargetGroupAttribute>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TargetGroupAttributeSerializer::serialize(params, &key, obj);
}
}
}
struct TargetGroupNameDeserializer;
impl TargetGroupNameDeserializer {
#[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 TargetGroupNamesSerializer;
impl TargetGroupNamesSerializer {
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 TargetGroupsDeserializer;
impl TargetGroupsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TargetGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TargetGroupDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TargetHealth {
pub description: Option<String>,
pub reason: Option<String>,
pub state: Option<String>,
}
struct TargetHealthDeserializer;
impl TargetHealthDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TargetHealth, XmlParseError> {
deserialize_elements::<_, TargetHealth, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"Reason" => {
obj.reason = Some(TargetHealthReasonEnumDeserializer::deserialize(
"Reason", stack,
)?);
}
"State" => {
obj.state = Some(TargetHealthStateEnumDeserializer::deserialize(
"State", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TargetHealthDescription {
pub health_check_port: Option<String>,
pub target: Option<TargetDescription>,
pub target_health: Option<TargetHealth>,
}
struct TargetHealthDescriptionDeserializer;
impl TargetHealthDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TargetHealthDescription, XmlParseError> {
deserialize_elements::<_, TargetHealthDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthCheckPort" => {
obj.health_check_port = Some(HealthCheckPortDeserializer::deserialize(
"HealthCheckPort",
stack,
)?);
}
"Target" => {
obj.target =
Some(TargetDescriptionDeserializer::deserialize("Target", stack)?);
}
"TargetHealth" => {
obj.target_health = Some(TargetHealthDeserializer::deserialize(
"TargetHealth",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct TargetHealthDescriptionsDeserializer;
impl TargetHealthDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TargetHealthDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TargetHealthDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TargetHealthReasonEnumDeserializer;
impl TargetHealthReasonEnumDeserializer {
#[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 TargetHealthStateEnumDeserializer;
impl TargetHealthStateEnumDeserializer {
#[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 TargetIdDeserializer;
impl TargetIdDeserializer {
#[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 TargetTypeEnumDeserializer;
impl TargetTypeEnumDeserializer {
#[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 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)
}
}
struct ZoneNameDeserializer;
impl ZoneNameDeserializer {
#[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 AddListenerCertificatesError {
CertificateNotFound(String),
ListenerNotFound(String),
TooManyCertificates(String),
}
impl AddListenerCertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddListenerCertificatesError> {
{
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(
AddListenerCertificatesError::CertificateNotFound(parsed_error.message),
)
}
"ListenerNotFound" => {
return RusotoError::Service(
AddListenerCertificatesError::ListenerNotFound(parsed_error.message),
)
}
"TooManyCertificates" => {
return RusotoError::Service(
AddListenerCertificatesError::TooManyCertificates(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 AddListenerCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddListenerCertificatesError {
fn description(&self) -> &str {
match *self {
AddListenerCertificatesError::CertificateNotFound(ref cause) => cause,
AddListenerCertificatesError::ListenerNotFound(ref cause) => cause,
AddListenerCertificatesError::TooManyCertificates(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddTagsError {
DuplicateTagKeys(String),
LoadBalancerNotFound(String),
TargetGroupNotFound(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[..] {
"DuplicateTagKeys" => {
return RusotoError::Service(AddTagsError::DuplicateTagKeys(
parsed_error.message,
))
}
"LoadBalancerNotFound" => {
return RusotoError::Service(AddTagsError::LoadBalancerNotFound(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(AddTagsError::TargetGroupNotFound(
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::DuplicateTagKeys(ref cause) => cause,
AddTagsError::LoadBalancerNotFound(ref cause) => cause,
AddTagsError::TargetGroupNotFound(ref cause) => cause,
AddTagsError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateListenerError {
CertificateNotFound(String),
DuplicateListener(String),
IncompatibleProtocols(String),
InvalidConfigurationRequest(String),
InvalidLoadBalancerAction(String),
LoadBalancerNotFound(String),
SSLPolicyNotFound(String),
TargetGroupAssociationLimit(String),
TargetGroupNotFound(String),
TooManyActions(String),
TooManyCertificates(String),
TooManyListeners(String),
TooManyRegistrationsForTargetId(String),
TooManyTargets(String),
UnsupportedProtocol(String),
}
impl CreateListenerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateListenerError> {
{
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(CreateListenerError::CertificateNotFound(
parsed_error.message,
))
}
"DuplicateListener" => {
return RusotoError::Service(CreateListenerError::DuplicateListener(
parsed_error.message,
))
}
"IncompatibleProtocols" => {
return RusotoError::Service(CreateListenerError::IncompatibleProtocols(
parsed_error.message,
))
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
CreateListenerError::InvalidConfigurationRequest(parsed_error.message),
)
}
"InvalidLoadBalancerAction" => {
return RusotoError::Service(
CreateListenerError::InvalidLoadBalancerAction(parsed_error.message),
)
}
"LoadBalancerNotFound" => {
return RusotoError::Service(CreateListenerError::LoadBalancerNotFound(
parsed_error.message,
))
}
"SSLPolicyNotFound" => {
return RusotoError::Service(CreateListenerError::SSLPolicyNotFound(
parsed_error.message,
))
}
"TargetGroupAssociationLimit" => {
return RusotoError::Service(
CreateListenerError::TargetGroupAssociationLimit(parsed_error.message),
)
}
"TargetGroupNotFound" => {
return RusotoError::Service(CreateListenerError::TargetGroupNotFound(
parsed_error.message,
))
}
"TooManyActions" => {
return RusotoError::Service(CreateListenerError::TooManyActions(
parsed_error.message,
))
}
"TooManyCertificates" => {
return RusotoError::Service(CreateListenerError::TooManyCertificates(
parsed_error.message,
))
}
"TooManyListeners" => {
return RusotoError::Service(CreateListenerError::TooManyListeners(
parsed_error.message,
))
}
"TooManyRegistrationsForTargetId" => {
return RusotoError::Service(
CreateListenerError::TooManyRegistrationsForTargetId(
parsed_error.message,
),
)
}
"TooManyTargets" => {
return RusotoError::Service(CreateListenerError::TooManyTargets(
parsed_error.message,
))
}
"UnsupportedProtocol" => {
return RusotoError::Service(CreateListenerError::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 CreateListenerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateListenerError {
fn description(&self) -> &str {
match *self {
CreateListenerError::CertificateNotFound(ref cause) => cause,
CreateListenerError::DuplicateListener(ref cause) => cause,
CreateListenerError::IncompatibleProtocols(ref cause) => cause,
CreateListenerError::InvalidConfigurationRequest(ref cause) => cause,
CreateListenerError::InvalidLoadBalancerAction(ref cause) => cause,
CreateListenerError::LoadBalancerNotFound(ref cause) => cause,
CreateListenerError::SSLPolicyNotFound(ref cause) => cause,
CreateListenerError::TargetGroupAssociationLimit(ref cause) => cause,
CreateListenerError::TargetGroupNotFound(ref cause) => cause,
CreateListenerError::TooManyActions(ref cause) => cause,
CreateListenerError::TooManyCertificates(ref cause) => cause,
CreateListenerError::TooManyListeners(ref cause) => cause,
CreateListenerError::TooManyRegistrationsForTargetId(ref cause) => cause,
CreateListenerError::TooManyTargets(ref cause) => cause,
CreateListenerError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLoadBalancerError {
AllocationIdNotFound(String),
AvailabilityZoneNotSupported(String),
DuplicateLoadBalancerName(String),
DuplicateTagKeys(String),
InvalidConfigurationRequest(String),
InvalidScheme(String),
InvalidSecurityGroup(String),
InvalidSubnet(String),
OperationNotPermitted(String),
ResourceInUse(String),
SubnetNotFound(String),
TooManyLoadBalancers(String),
TooManyTags(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[..] {
"AllocationIdNotFound" => {
return RusotoError::Service(CreateLoadBalancerError::AllocationIdNotFound(
parsed_error.message,
))
}
"AvailabilityZoneNotSupported" => {
return RusotoError::Service(
CreateLoadBalancerError::AvailabilityZoneNotSupported(
parsed_error.message,
),
)
}
"DuplicateLoadBalancerName" => {
return RusotoError::Service(
CreateLoadBalancerError::DuplicateLoadBalancerName(
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),
)
}
"ResourceInUse" => {
return RusotoError::Service(CreateLoadBalancerError::ResourceInUse(
parsed_error.message,
))
}
"SubnetNotFound" => {
return RusotoError::Service(CreateLoadBalancerError::SubnetNotFound(
parsed_error.message,
))
}
"TooManyLoadBalancers" => {
return RusotoError::Service(CreateLoadBalancerError::TooManyLoadBalancers(
parsed_error.message,
))
}
"TooManyTags" => {
return RusotoError::Service(CreateLoadBalancerError::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 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::AllocationIdNotFound(ref cause) => cause,
CreateLoadBalancerError::AvailabilityZoneNotSupported(ref cause) => cause,
CreateLoadBalancerError::DuplicateLoadBalancerName(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::ResourceInUse(ref cause) => cause,
CreateLoadBalancerError::SubnetNotFound(ref cause) => cause,
CreateLoadBalancerError::TooManyLoadBalancers(ref cause) => cause,
CreateLoadBalancerError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateRuleError {
IncompatibleProtocols(String),
InvalidConfigurationRequest(String),
InvalidLoadBalancerAction(String),
ListenerNotFound(String),
PriorityInUse(String),
TargetGroupAssociationLimit(String),
TargetGroupNotFound(String),
TooManyActions(String),
TooManyRegistrationsForTargetId(String),
TooManyRules(String),
TooManyTargetGroups(String),
TooManyTargets(String),
UnsupportedProtocol(String),
}
impl CreateRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRuleError> {
{
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[..] {
"IncompatibleProtocols" => {
return RusotoError::Service(CreateRuleError::IncompatibleProtocols(
parsed_error.message,
))
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(CreateRuleError::InvalidConfigurationRequest(
parsed_error.message,
))
}
"InvalidLoadBalancerAction" => {
return RusotoError::Service(CreateRuleError::InvalidLoadBalancerAction(
parsed_error.message,
))
}
"ListenerNotFound" => {
return RusotoError::Service(CreateRuleError::ListenerNotFound(
parsed_error.message,
))
}
"PriorityInUse" => {
return RusotoError::Service(CreateRuleError::PriorityInUse(
parsed_error.message,
))
}
"TargetGroupAssociationLimit" => {
return RusotoError::Service(CreateRuleError::TargetGroupAssociationLimit(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(CreateRuleError::TargetGroupNotFound(
parsed_error.message,
))
}
"TooManyActions" => {
return RusotoError::Service(CreateRuleError::TooManyActions(
parsed_error.message,
))
}
"TooManyRegistrationsForTargetId" => {
return RusotoError::Service(
CreateRuleError::TooManyRegistrationsForTargetId(parsed_error.message),
)
}
"TooManyRules" => {
return RusotoError::Service(CreateRuleError::TooManyRules(
parsed_error.message,
))
}
"TooManyTargetGroups" => {
return RusotoError::Service(CreateRuleError::TooManyTargetGroups(
parsed_error.message,
))
}
"TooManyTargets" => {
return RusotoError::Service(CreateRuleError::TooManyTargets(
parsed_error.message,
))
}
"UnsupportedProtocol" => {
return RusotoError::Service(CreateRuleError::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 CreateRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRuleError {
fn description(&self) -> &str {
match *self {
CreateRuleError::IncompatibleProtocols(ref cause) => cause,
CreateRuleError::InvalidConfigurationRequest(ref cause) => cause,
CreateRuleError::InvalidLoadBalancerAction(ref cause) => cause,
CreateRuleError::ListenerNotFound(ref cause) => cause,
CreateRuleError::PriorityInUse(ref cause) => cause,
CreateRuleError::TargetGroupAssociationLimit(ref cause) => cause,
CreateRuleError::TargetGroupNotFound(ref cause) => cause,
CreateRuleError::TooManyActions(ref cause) => cause,
CreateRuleError::TooManyRegistrationsForTargetId(ref cause) => cause,
CreateRuleError::TooManyRules(ref cause) => cause,
CreateRuleError::TooManyTargetGroups(ref cause) => cause,
CreateRuleError::TooManyTargets(ref cause) => cause,
CreateRuleError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTargetGroupError {
DuplicateTargetGroupName(String),
InvalidConfigurationRequest(String),
TooManyTargetGroups(String),
}
impl CreateTargetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTargetGroupError> {
{
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[..] {
"DuplicateTargetGroupName" => {
return RusotoError::Service(
CreateTargetGroupError::DuplicateTargetGroupName(parsed_error.message),
)
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
CreateTargetGroupError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"TooManyTargetGroups" => {
return RusotoError::Service(CreateTargetGroupError::TooManyTargetGroups(
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 CreateTargetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTargetGroupError {
fn description(&self) -> &str {
match *self {
CreateTargetGroupError::DuplicateTargetGroupName(ref cause) => cause,
CreateTargetGroupError::InvalidConfigurationRequest(ref cause) => cause,
CreateTargetGroupError::TooManyTargetGroups(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteListenerError {
ListenerNotFound(String),
}
impl DeleteListenerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteListenerError> {
{
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[..] {
"ListenerNotFound" => {
return RusotoError::Service(DeleteListenerError::ListenerNotFound(
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 DeleteListenerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteListenerError {
fn description(&self) -> &str {
match *self {
DeleteListenerError::ListenerNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLoadBalancerError {
LoadBalancerNotFound(String),
OperationNotPermitted(String),
ResourceInUse(String),
}
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[..] {
"LoadBalancerNotFound" => {
return RusotoError::Service(DeleteLoadBalancerError::LoadBalancerNotFound(
parsed_error.message,
))
}
"OperationNotPermitted" => {
return RusotoError::Service(
DeleteLoadBalancerError::OperationNotPermitted(parsed_error.message),
)
}
"ResourceInUse" => {
return RusotoError::Service(DeleteLoadBalancerError::ResourceInUse(
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 DeleteLoadBalancerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLoadBalancerError {
fn description(&self) -> &str {
match *self {
DeleteLoadBalancerError::LoadBalancerNotFound(ref cause) => cause,
DeleteLoadBalancerError::OperationNotPermitted(ref cause) => cause,
DeleteLoadBalancerError::ResourceInUse(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRuleError {
OperationNotPermitted(String),
RuleNotFound(String),
}
impl DeleteRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRuleError> {
{
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[..] {
"OperationNotPermitted" => {
return RusotoError::Service(DeleteRuleError::OperationNotPermitted(
parsed_error.message,
))
}
"RuleNotFound" => {
return RusotoError::Service(DeleteRuleError::RuleNotFound(
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 DeleteRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRuleError {
fn description(&self) -> &str {
match *self {
DeleteRuleError::OperationNotPermitted(ref cause) => cause,
DeleteRuleError::RuleNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTargetGroupError {
ResourceInUse(String),
}
impl DeleteTargetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTargetGroupError> {
{
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[..] {
"ResourceInUse" => {
return RusotoError::Service(DeleteTargetGroupError::ResourceInUse(
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 DeleteTargetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTargetGroupError {
fn description(&self) -> &str {
match *self {
DeleteTargetGroupError::ResourceInUse(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeregisterTargetsError {
InvalidTarget(String),
TargetGroupNotFound(String),
}
impl DeregisterTargetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeregisterTargetsError> {
{
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[..] {
"InvalidTarget" => {
return RusotoError::Service(DeregisterTargetsError::InvalidTarget(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(DeregisterTargetsError::TargetGroupNotFound(
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 DeregisterTargetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeregisterTargetsError {
fn description(&self) -> &str {
match *self {
DeregisterTargetsError::InvalidTarget(ref cause) => cause,
DeregisterTargetsError::TargetGroupNotFound(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 DescribeListenerCertificatesError {
ListenerNotFound(String),
}
impl DescribeListenerCertificatesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeListenerCertificatesError> {
{
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[..] {
"ListenerNotFound" => {
return RusotoError::Service(
DescribeListenerCertificatesError::ListenerNotFound(
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 DescribeListenerCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeListenerCertificatesError {
fn description(&self) -> &str {
match *self {
DescribeListenerCertificatesError::ListenerNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeListenersError {
ListenerNotFound(String),
LoadBalancerNotFound(String),
UnsupportedProtocol(String),
}
impl DescribeListenersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeListenersError> {
{
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[..] {
"ListenerNotFound" => {
return RusotoError::Service(DescribeListenersError::ListenerNotFound(
parsed_error.message,
))
}
"LoadBalancerNotFound" => {
return RusotoError::Service(DescribeListenersError::LoadBalancerNotFound(
parsed_error.message,
))
}
"UnsupportedProtocol" => {
return RusotoError::Service(DescribeListenersError::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 DescribeListenersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeListenersError {
fn description(&self) -> &str {
match *self {
DescribeListenersError::ListenerNotFound(ref cause) => cause,
DescribeListenersError::LoadBalancerNotFound(ref cause) => cause,
DescribeListenersError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoadBalancerAttributesError {
LoadBalancerNotFound(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::LoadBalancerNotFound(
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::LoadBalancerNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoadBalancersError {
LoadBalancerNotFound(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::LoadBalancerNotFound(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::LoadBalancerNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeRulesError {
ListenerNotFound(String),
RuleNotFound(String),
UnsupportedProtocol(String),
}
impl DescribeRulesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRulesError> {
{
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[..] {
"ListenerNotFound" => {
return RusotoError::Service(DescribeRulesError::ListenerNotFound(
parsed_error.message,
))
}
"RuleNotFound" => {
return RusotoError::Service(DescribeRulesError::RuleNotFound(
parsed_error.message,
))
}
"UnsupportedProtocol" => {
return RusotoError::Service(DescribeRulesError::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 DescribeRulesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeRulesError {
fn description(&self) -> &str {
match *self {
DescribeRulesError::ListenerNotFound(ref cause) => cause,
DescribeRulesError::RuleNotFound(ref cause) => cause,
DescribeRulesError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSSLPoliciesError {
SSLPolicyNotFound(String),
}
impl DescribeSSLPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSSLPoliciesError> {
{
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[..] {
"SSLPolicyNotFound" => {
return RusotoError::Service(DescribeSSLPoliciesError::SSLPolicyNotFound(
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 DescribeSSLPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSSLPoliciesError {
fn description(&self) -> &str {
match *self {
DescribeSSLPoliciesError::SSLPolicyNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
ListenerNotFound(String),
LoadBalancerNotFound(String),
RuleNotFound(String),
TargetGroupNotFound(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[..] {
"ListenerNotFound" => {
return RusotoError::Service(DescribeTagsError::ListenerNotFound(
parsed_error.message,
))
}
"LoadBalancerNotFound" => {
return RusotoError::Service(DescribeTagsError::LoadBalancerNotFound(
parsed_error.message,
))
}
"RuleNotFound" => {
return RusotoError::Service(DescribeTagsError::RuleNotFound(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(DescribeTagsError::TargetGroupNotFound(
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::ListenerNotFound(ref cause) => cause,
DescribeTagsError::LoadBalancerNotFound(ref cause) => cause,
DescribeTagsError::RuleNotFound(ref cause) => cause,
DescribeTagsError::TargetGroupNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTargetGroupAttributesError {
TargetGroupNotFound(String),
}
impl DescribeTargetGroupAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeTargetGroupAttributesError> {
{
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[..] {
"TargetGroupNotFound" => {
return RusotoError::Service(
DescribeTargetGroupAttributesError::TargetGroupNotFound(
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 DescribeTargetGroupAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTargetGroupAttributesError {
fn description(&self) -> &str {
match *self {
DescribeTargetGroupAttributesError::TargetGroupNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTargetGroupsError {
LoadBalancerNotFound(String),
TargetGroupNotFound(String),
}
impl DescribeTargetGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTargetGroupsError> {
{
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(
DescribeTargetGroupsError::LoadBalancerNotFound(parsed_error.message),
)
}
"TargetGroupNotFound" => {
return RusotoError::Service(
DescribeTargetGroupsError::TargetGroupNotFound(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 DescribeTargetGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTargetGroupsError {
fn description(&self) -> &str {
match *self {
DescribeTargetGroupsError::LoadBalancerNotFound(ref cause) => cause,
DescribeTargetGroupsError::TargetGroupNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTargetHealthError {
HealthUnavailable(String),
InvalidTarget(String),
TargetGroupNotFound(String),
}
impl DescribeTargetHealthError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTargetHealthError> {
{
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[..] {
"HealthUnavailable" => {
return RusotoError::Service(DescribeTargetHealthError::HealthUnavailable(
parsed_error.message,
))
}
"InvalidTarget" => {
return RusotoError::Service(DescribeTargetHealthError::InvalidTarget(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(
DescribeTargetHealthError::TargetGroupNotFound(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 DescribeTargetHealthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTargetHealthError {
fn description(&self) -> &str {
match *self {
DescribeTargetHealthError::HealthUnavailable(ref cause) => cause,
DescribeTargetHealthError::InvalidTarget(ref cause) => cause,
DescribeTargetHealthError::TargetGroupNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyListenerError {
CertificateNotFound(String),
DuplicateListener(String),
IncompatibleProtocols(String),
InvalidConfigurationRequest(String),
InvalidLoadBalancerAction(String),
ListenerNotFound(String),
SSLPolicyNotFound(String),
TargetGroupAssociationLimit(String),
TargetGroupNotFound(String),
TooManyActions(String),
TooManyCertificates(String),
TooManyListeners(String),
TooManyRegistrationsForTargetId(String),
TooManyTargets(String),
UnsupportedProtocol(String),
}
impl ModifyListenerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyListenerError> {
{
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(ModifyListenerError::CertificateNotFound(
parsed_error.message,
))
}
"DuplicateListener" => {
return RusotoError::Service(ModifyListenerError::DuplicateListener(
parsed_error.message,
))
}
"IncompatibleProtocols" => {
return RusotoError::Service(ModifyListenerError::IncompatibleProtocols(
parsed_error.message,
))
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(
ModifyListenerError::InvalidConfigurationRequest(parsed_error.message),
)
}
"InvalidLoadBalancerAction" => {
return RusotoError::Service(
ModifyListenerError::InvalidLoadBalancerAction(parsed_error.message),
)
}
"ListenerNotFound" => {
return RusotoError::Service(ModifyListenerError::ListenerNotFound(
parsed_error.message,
))
}
"SSLPolicyNotFound" => {
return RusotoError::Service(ModifyListenerError::SSLPolicyNotFound(
parsed_error.message,
))
}
"TargetGroupAssociationLimit" => {
return RusotoError::Service(
ModifyListenerError::TargetGroupAssociationLimit(parsed_error.message),
)
}
"TargetGroupNotFound" => {
return RusotoError::Service(ModifyListenerError::TargetGroupNotFound(
parsed_error.message,
))
}
"TooManyActions" => {
return RusotoError::Service(ModifyListenerError::TooManyActions(
parsed_error.message,
))
}
"TooManyCertificates" => {
return RusotoError::Service(ModifyListenerError::TooManyCertificates(
parsed_error.message,
))
}
"TooManyListeners" => {
return RusotoError::Service(ModifyListenerError::TooManyListeners(
parsed_error.message,
))
}
"TooManyRegistrationsForTargetId" => {
return RusotoError::Service(
ModifyListenerError::TooManyRegistrationsForTargetId(
parsed_error.message,
),
)
}
"TooManyTargets" => {
return RusotoError::Service(ModifyListenerError::TooManyTargets(
parsed_error.message,
))
}
"UnsupportedProtocol" => {
return RusotoError::Service(ModifyListenerError::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 ModifyListenerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyListenerError {
fn description(&self) -> &str {
match *self {
ModifyListenerError::CertificateNotFound(ref cause) => cause,
ModifyListenerError::DuplicateListener(ref cause) => cause,
ModifyListenerError::IncompatibleProtocols(ref cause) => cause,
ModifyListenerError::InvalidConfigurationRequest(ref cause) => cause,
ModifyListenerError::InvalidLoadBalancerAction(ref cause) => cause,
ModifyListenerError::ListenerNotFound(ref cause) => cause,
ModifyListenerError::SSLPolicyNotFound(ref cause) => cause,
ModifyListenerError::TargetGroupAssociationLimit(ref cause) => cause,
ModifyListenerError::TargetGroupNotFound(ref cause) => cause,
ModifyListenerError::TooManyActions(ref cause) => cause,
ModifyListenerError::TooManyCertificates(ref cause) => cause,
ModifyListenerError::TooManyListeners(ref cause) => cause,
ModifyListenerError::TooManyRegistrationsForTargetId(ref cause) => cause,
ModifyListenerError::TooManyTargets(ref cause) => cause,
ModifyListenerError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyLoadBalancerAttributesError {
InvalidConfigurationRequest(String),
LoadBalancerNotFound(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[..] {
"InvalidConfigurationRequest" => {
return RusotoError::Service(
ModifyLoadBalancerAttributesError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"LoadBalancerNotFound" => {
return RusotoError::Service(
ModifyLoadBalancerAttributesError::LoadBalancerNotFound(
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::InvalidConfigurationRequest(ref cause) => cause,
ModifyLoadBalancerAttributesError::LoadBalancerNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyRuleError {
IncompatibleProtocols(String),
InvalidLoadBalancerAction(String),
OperationNotPermitted(String),
RuleNotFound(String),
TargetGroupAssociationLimit(String),
TargetGroupNotFound(String),
TooManyActions(String),
TooManyRegistrationsForTargetId(String),
TooManyTargets(String),
UnsupportedProtocol(String),
}
impl ModifyRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyRuleError> {
{
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[..] {
"IncompatibleProtocols" => {
return RusotoError::Service(ModifyRuleError::IncompatibleProtocols(
parsed_error.message,
))
}
"InvalidLoadBalancerAction" => {
return RusotoError::Service(ModifyRuleError::InvalidLoadBalancerAction(
parsed_error.message,
))
}
"OperationNotPermitted" => {
return RusotoError::Service(ModifyRuleError::OperationNotPermitted(
parsed_error.message,
))
}
"RuleNotFound" => {
return RusotoError::Service(ModifyRuleError::RuleNotFound(
parsed_error.message,
))
}
"TargetGroupAssociationLimit" => {
return RusotoError::Service(ModifyRuleError::TargetGroupAssociationLimit(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(ModifyRuleError::TargetGroupNotFound(
parsed_error.message,
))
}
"TooManyActions" => {
return RusotoError::Service(ModifyRuleError::TooManyActions(
parsed_error.message,
))
}
"TooManyRegistrationsForTargetId" => {
return RusotoError::Service(
ModifyRuleError::TooManyRegistrationsForTargetId(parsed_error.message),
)
}
"TooManyTargets" => {
return RusotoError::Service(ModifyRuleError::TooManyTargets(
parsed_error.message,
))
}
"UnsupportedProtocol" => {
return RusotoError::Service(ModifyRuleError::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 ModifyRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyRuleError {
fn description(&self) -> &str {
match *self {
ModifyRuleError::IncompatibleProtocols(ref cause) => cause,
ModifyRuleError::InvalidLoadBalancerAction(ref cause) => cause,
ModifyRuleError::OperationNotPermitted(ref cause) => cause,
ModifyRuleError::RuleNotFound(ref cause) => cause,
ModifyRuleError::TargetGroupAssociationLimit(ref cause) => cause,
ModifyRuleError::TargetGroupNotFound(ref cause) => cause,
ModifyRuleError::TooManyActions(ref cause) => cause,
ModifyRuleError::TooManyRegistrationsForTargetId(ref cause) => cause,
ModifyRuleError::TooManyTargets(ref cause) => cause,
ModifyRuleError::UnsupportedProtocol(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyTargetGroupError {
InvalidConfigurationRequest(String),
TargetGroupNotFound(String),
}
impl ModifyTargetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyTargetGroupError> {
{
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[..] {
"InvalidConfigurationRequest" => {
return RusotoError::Service(
ModifyTargetGroupError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"TargetGroupNotFound" => {
return RusotoError::Service(ModifyTargetGroupError::TargetGroupNotFound(
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 ModifyTargetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyTargetGroupError {
fn description(&self) -> &str {
match *self {
ModifyTargetGroupError::InvalidConfigurationRequest(ref cause) => cause,
ModifyTargetGroupError::TargetGroupNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyTargetGroupAttributesError {
InvalidConfigurationRequest(String),
TargetGroupNotFound(String),
}
impl ModifyTargetGroupAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyTargetGroupAttributesError> {
{
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[..] {
"InvalidConfigurationRequest" => {
return RusotoError::Service(
ModifyTargetGroupAttributesError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"TargetGroupNotFound" => {
return RusotoError::Service(
ModifyTargetGroupAttributesError::TargetGroupNotFound(
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 ModifyTargetGroupAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyTargetGroupAttributesError {
fn description(&self) -> &str {
match *self {
ModifyTargetGroupAttributesError::InvalidConfigurationRequest(ref cause) => cause,
ModifyTargetGroupAttributesError::TargetGroupNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterTargetsError {
InvalidTarget(String),
TargetGroupNotFound(String),
TooManyRegistrationsForTargetId(String),
TooManyTargets(String),
}
impl RegisterTargetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterTargetsError> {
{
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[..] {
"InvalidTarget" => {
return RusotoError::Service(RegisterTargetsError::InvalidTarget(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(RegisterTargetsError::TargetGroupNotFound(
parsed_error.message,
))
}
"TooManyRegistrationsForTargetId" => {
return RusotoError::Service(
RegisterTargetsError::TooManyRegistrationsForTargetId(
parsed_error.message,
),
)
}
"TooManyTargets" => {
return RusotoError::Service(RegisterTargetsError::TooManyTargets(
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 RegisterTargetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterTargetsError {
fn description(&self) -> &str {
match *self {
RegisterTargetsError::InvalidTarget(ref cause) => cause,
RegisterTargetsError::TargetGroupNotFound(ref cause) => cause,
RegisterTargetsError::TooManyRegistrationsForTargetId(ref cause) => cause,
RegisterTargetsError::TooManyTargets(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveListenerCertificatesError {
ListenerNotFound(String),
OperationNotPermitted(String),
}
impl RemoveListenerCertificatesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RemoveListenerCertificatesError> {
{
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[..] {
"ListenerNotFound" => {
return RusotoError::Service(
RemoveListenerCertificatesError::ListenerNotFound(parsed_error.message),
)
}
"OperationNotPermitted" => {
return RusotoError::Service(
RemoveListenerCertificatesError::OperationNotPermitted(
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 RemoveListenerCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveListenerCertificatesError {
fn description(&self) -> &str {
match *self {
RemoveListenerCertificatesError::ListenerNotFound(ref cause) => cause,
RemoveListenerCertificatesError::OperationNotPermitted(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsError {
ListenerNotFound(String),
LoadBalancerNotFound(String),
RuleNotFound(String),
TargetGroupNotFound(String),
TooManyTags(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[..] {
"ListenerNotFound" => {
return RusotoError::Service(RemoveTagsError::ListenerNotFound(
parsed_error.message,
))
}
"LoadBalancerNotFound" => {
return RusotoError::Service(RemoveTagsError::LoadBalancerNotFound(
parsed_error.message,
))
}
"RuleNotFound" => {
return RusotoError::Service(RemoveTagsError::RuleNotFound(
parsed_error.message,
))
}
"TargetGroupNotFound" => {
return RusotoError::Service(RemoveTagsError::TargetGroupNotFound(
parsed_error.message,
))
}
"TooManyTags" => {
return RusotoError::Service(RemoveTagsError::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 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::ListenerNotFound(ref cause) => cause,
RemoveTagsError::LoadBalancerNotFound(ref cause) => cause,
RemoveTagsError::RuleNotFound(ref cause) => cause,
RemoveTagsError::TargetGroupNotFound(ref cause) => cause,
RemoveTagsError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetIpAddressTypeError {
InvalidConfigurationRequest(String),
InvalidSubnet(String),
LoadBalancerNotFound(String),
}
impl SetIpAddressTypeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetIpAddressTypeError> {
{
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[..] {
"InvalidConfigurationRequest" => {
return RusotoError::Service(
SetIpAddressTypeError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(SetIpAddressTypeError::InvalidSubnet(
parsed_error.message,
))
}
"LoadBalancerNotFound" => {
return RusotoError::Service(SetIpAddressTypeError::LoadBalancerNotFound(
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 SetIpAddressTypeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetIpAddressTypeError {
fn description(&self) -> &str {
match *self {
SetIpAddressTypeError::InvalidConfigurationRequest(ref cause) => cause,
SetIpAddressTypeError::InvalidSubnet(ref cause) => cause,
SetIpAddressTypeError::LoadBalancerNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetRulePrioritiesError {
OperationNotPermitted(String),
PriorityInUse(String),
RuleNotFound(String),
}
impl SetRulePrioritiesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetRulePrioritiesError> {
{
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[..] {
"OperationNotPermitted" => {
return RusotoError::Service(SetRulePrioritiesError::OperationNotPermitted(
parsed_error.message,
))
}
"PriorityInUse" => {
return RusotoError::Service(SetRulePrioritiesError::PriorityInUse(
parsed_error.message,
))
}
"RuleNotFound" => {
return RusotoError::Service(SetRulePrioritiesError::RuleNotFound(
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 SetRulePrioritiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetRulePrioritiesError {
fn description(&self) -> &str {
match *self {
SetRulePrioritiesError::OperationNotPermitted(ref cause) => cause,
SetRulePrioritiesError::PriorityInUse(ref cause) => cause,
SetRulePrioritiesError::RuleNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetSecurityGroupsError {
InvalidConfigurationRequest(String),
InvalidSecurityGroup(String),
LoadBalancerNotFound(String),
}
impl SetSecurityGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetSecurityGroupsError> {
{
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[..] {
"InvalidConfigurationRequest" => {
return RusotoError::Service(
SetSecurityGroupsError::InvalidConfigurationRequest(
parsed_error.message,
),
)
}
"InvalidSecurityGroup" => {
return RusotoError::Service(SetSecurityGroupsError::InvalidSecurityGroup(
parsed_error.message,
))
}
"LoadBalancerNotFound" => {
return RusotoError::Service(SetSecurityGroupsError::LoadBalancerNotFound(
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 SetSecurityGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetSecurityGroupsError {
fn description(&self) -> &str {
match *self {
SetSecurityGroupsError::InvalidConfigurationRequest(ref cause) => cause,
SetSecurityGroupsError::InvalidSecurityGroup(ref cause) => cause,
SetSecurityGroupsError::LoadBalancerNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetSubnetsError {
AllocationIdNotFound(String),
AvailabilityZoneNotSupported(String),
InvalidConfigurationRequest(String),
InvalidSubnet(String),
LoadBalancerNotFound(String),
SubnetNotFound(String),
}
impl SetSubnetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetSubnetsError> {
{
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[..] {
"AllocationIdNotFound" => {
return RusotoError::Service(SetSubnetsError::AllocationIdNotFound(
parsed_error.message,
))
}
"AvailabilityZoneNotSupported" => {
return RusotoError::Service(SetSubnetsError::AvailabilityZoneNotSupported(
parsed_error.message,
))
}
"InvalidConfigurationRequest" => {
return RusotoError::Service(SetSubnetsError::InvalidConfigurationRequest(
parsed_error.message,
))
}
"InvalidSubnet" => {
return RusotoError::Service(SetSubnetsError::InvalidSubnet(
parsed_error.message,
))
}
"LoadBalancerNotFound" => {
return RusotoError::Service(SetSubnetsError::LoadBalancerNotFound(
parsed_error.message,
))
}
"SubnetNotFound" => {
return RusotoError::Service(SetSubnetsError::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 SetSubnetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetSubnetsError {
fn description(&self) -> &str {
match *self {
SetSubnetsError::AllocationIdNotFound(ref cause) => cause,
SetSubnetsError::AvailabilityZoneNotSupported(ref cause) => cause,
SetSubnetsError::InvalidConfigurationRequest(ref cause) => cause,
SetSubnetsError::InvalidSubnet(ref cause) => cause,
SetSubnetsError::LoadBalancerNotFound(ref cause) => cause,
SetSubnetsError::SubnetNotFound(ref cause) => cause,
}
}
}
pub trait Elb {
fn add_listener_certificates(
&self,
input: AddListenerCertificatesInput,
) -> RusotoFuture<AddListenerCertificatesOutput, AddListenerCertificatesError>;
fn add_tags(&self, input: AddTagsInput) -> RusotoFuture<AddTagsOutput, AddTagsError>;
fn create_listener(
&self,
input: CreateListenerInput,
) -> RusotoFuture<CreateListenerOutput, CreateListenerError>;
fn create_load_balancer(
&self,
input: CreateLoadBalancerInput,
) -> RusotoFuture<CreateLoadBalancerOutput, CreateLoadBalancerError>;
fn create_rule(
&self,
input: CreateRuleInput,
) -> RusotoFuture<CreateRuleOutput, CreateRuleError>;
fn create_target_group(
&self,
input: CreateTargetGroupInput,
) -> RusotoFuture<CreateTargetGroupOutput, CreateTargetGroupError>;
fn delete_listener(
&self,
input: DeleteListenerInput,
) -> RusotoFuture<DeleteListenerOutput, DeleteListenerError>;
fn delete_load_balancer(
&self,
input: DeleteLoadBalancerInput,
) -> RusotoFuture<DeleteLoadBalancerOutput, DeleteLoadBalancerError>;
fn delete_rule(
&self,
input: DeleteRuleInput,
) -> RusotoFuture<DeleteRuleOutput, DeleteRuleError>;
fn delete_target_group(
&self,
input: DeleteTargetGroupInput,
) -> RusotoFuture<DeleteTargetGroupOutput, DeleteTargetGroupError>;
fn deregister_targets(
&self,
input: DeregisterTargetsInput,
) -> RusotoFuture<DeregisterTargetsOutput, DeregisterTargetsError>;
fn describe_account_limits(
&self,
input: DescribeAccountLimitsInput,
) -> RusotoFuture<DescribeAccountLimitsOutput, DescribeAccountLimitsError>;
fn describe_listener_certificates(
&self,
input: DescribeListenerCertificatesInput,
) -> RusotoFuture<DescribeListenerCertificatesOutput, DescribeListenerCertificatesError>;
fn describe_listeners(
&self,
input: DescribeListenersInput,
) -> RusotoFuture<DescribeListenersOutput, DescribeListenersError>;
fn describe_load_balancer_attributes(
&self,
input: DescribeLoadBalancerAttributesInput,
) -> RusotoFuture<DescribeLoadBalancerAttributesOutput, DescribeLoadBalancerAttributesError>;
fn describe_load_balancers(
&self,
input: DescribeLoadBalancersInput,
) -> RusotoFuture<DescribeLoadBalancersOutput, DescribeLoadBalancersError>;
fn describe_rules(
&self,
input: DescribeRulesInput,
) -> RusotoFuture<DescribeRulesOutput, DescribeRulesError>;
fn describe_ssl_policies(
&self,
input: DescribeSSLPoliciesInput,
) -> RusotoFuture<DescribeSSLPoliciesOutput, DescribeSSLPoliciesError>;
fn describe_tags(
&self,
input: DescribeTagsInput,
) -> RusotoFuture<DescribeTagsOutput, DescribeTagsError>;
fn describe_target_group_attributes(
&self,
input: DescribeTargetGroupAttributesInput,
) -> RusotoFuture<DescribeTargetGroupAttributesOutput, DescribeTargetGroupAttributesError>;
fn describe_target_groups(
&self,
input: DescribeTargetGroupsInput,
) -> RusotoFuture<DescribeTargetGroupsOutput, DescribeTargetGroupsError>;
fn describe_target_health(
&self,
input: DescribeTargetHealthInput,
) -> RusotoFuture<DescribeTargetHealthOutput, DescribeTargetHealthError>;
fn modify_listener(
&self,
input: ModifyListenerInput,
) -> RusotoFuture<ModifyListenerOutput, ModifyListenerError>;
fn modify_load_balancer_attributes(
&self,
input: ModifyLoadBalancerAttributesInput,
) -> RusotoFuture<ModifyLoadBalancerAttributesOutput, ModifyLoadBalancerAttributesError>;
fn modify_rule(
&self,
input: ModifyRuleInput,
) -> RusotoFuture<ModifyRuleOutput, ModifyRuleError>;
fn modify_target_group(
&self,
input: ModifyTargetGroupInput,
) -> RusotoFuture<ModifyTargetGroupOutput, ModifyTargetGroupError>;
fn modify_target_group_attributes(
&self,
input: ModifyTargetGroupAttributesInput,
) -> RusotoFuture<ModifyTargetGroupAttributesOutput, ModifyTargetGroupAttributesError>;
fn register_targets(
&self,
input: RegisterTargetsInput,
) -> RusotoFuture<RegisterTargetsOutput, RegisterTargetsError>;
fn remove_listener_certificates(
&self,
input: RemoveListenerCertificatesInput,
) -> RusotoFuture<RemoveListenerCertificatesOutput, RemoveListenerCertificatesError>;
fn remove_tags(
&self,
input: RemoveTagsInput,
) -> RusotoFuture<RemoveTagsOutput, RemoveTagsError>;
fn set_ip_address_type(
&self,
input: SetIpAddressTypeInput,
) -> RusotoFuture<SetIpAddressTypeOutput, SetIpAddressTypeError>;
fn set_rule_priorities(
&self,
input: SetRulePrioritiesInput,
) -> RusotoFuture<SetRulePrioritiesOutput, SetRulePrioritiesError>;
fn set_security_groups(
&self,
input: SetSecurityGroupsInput,
) -> RusotoFuture<SetSecurityGroupsOutput, SetSecurityGroupsError>;
fn set_subnets(
&self,
input: SetSubnetsInput,
) -> RusotoFuture<SetSubnetsOutput, SetSubnetsError>;
}
#[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_listener_certificates(
&self,
input: AddListenerCertificatesInput,
) -> RusotoFuture<AddListenerCertificatesOutput, AddListenerCertificatesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddListenerCertificates");
params.put("Version", "2015-12-01");
AddListenerCertificatesInputSerializer::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(AddListenerCertificatesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AddListenerCertificatesOutput::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 = AddListenerCertificatesOutputDeserializer::deserialize(
"AddListenerCertificatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
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", "2015-12-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 create_listener(
&self,
input: CreateListenerInput,
) -> RusotoFuture<CreateListenerOutput, CreateListenerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateListener");
params.put("Version", "2015-12-01");
CreateListenerInputSerializer::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(CreateListenerError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateListenerOutput::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 = CreateListenerOutputDeserializer::deserialize(
"CreateListenerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_load_balancer(
&self,
input: CreateLoadBalancerInput,
) -> RusotoFuture<CreateLoadBalancerOutput, CreateLoadBalancerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateLoadBalancer");
params.put("Version", "2015-12-01");
CreateLoadBalancerInputSerializer::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 = CreateLoadBalancerOutput::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 = CreateLoadBalancerOutputDeserializer::deserialize(
"CreateLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_rule(
&self,
input: CreateRuleInput,
) -> RusotoFuture<CreateRuleOutput, CreateRuleError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateRule");
params.put("Version", "2015-12-01");
CreateRuleInputSerializer::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(CreateRuleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateRuleOutput::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 =
CreateRuleOutputDeserializer::deserialize("CreateRuleResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_target_group(
&self,
input: CreateTargetGroupInput,
) -> RusotoFuture<CreateTargetGroupOutput, CreateTargetGroupError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateTargetGroup");
params.put("Version", "2015-12-01");
CreateTargetGroupInputSerializer::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(CreateTargetGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateTargetGroupOutput::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 = CreateTargetGroupOutputDeserializer::deserialize(
"CreateTargetGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_listener(
&self,
input: DeleteListenerInput,
) -> RusotoFuture<DeleteListenerOutput, DeleteListenerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteListener");
params.put("Version", "2015-12-01");
DeleteListenerInputSerializer::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(DeleteListenerError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteListenerOutput::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 = DeleteListenerOutputDeserializer::deserialize(
"DeleteListenerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_load_balancer(
&self,
input: DeleteLoadBalancerInput,
) -> RusotoFuture<DeleteLoadBalancerOutput, DeleteLoadBalancerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteLoadBalancer");
params.put("Version", "2015-12-01");
DeleteLoadBalancerInputSerializer::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 = DeleteLoadBalancerOutput::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 = DeleteLoadBalancerOutputDeserializer::deserialize(
"DeleteLoadBalancerResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_rule(
&self,
input: DeleteRuleInput,
) -> RusotoFuture<DeleteRuleOutput, DeleteRuleError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteRule");
params.put("Version", "2015-12-01");
DeleteRuleInputSerializer::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(DeleteRuleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteRuleOutput::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 =
DeleteRuleOutputDeserializer::deserialize("DeleteRuleResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_target_group(
&self,
input: DeleteTargetGroupInput,
) -> RusotoFuture<DeleteTargetGroupOutput, DeleteTargetGroupError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteTargetGroup");
params.put("Version", "2015-12-01");
DeleteTargetGroupInputSerializer::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(DeleteTargetGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteTargetGroupOutput::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 = DeleteTargetGroupOutputDeserializer::deserialize(
"DeleteTargetGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn deregister_targets(
&self,
input: DeregisterTargetsInput,
) -> RusotoFuture<DeregisterTargetsOutput, DeregisterTargetsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeregisterTargets");
params.put("Version", "2015-12-01");
DeregisterTargetsInputSerializer::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(DeregisterTargetsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeregisterTargetsOutput::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 = DeregisterTargetsOutputDeserializer::deserialize(
"DeregisterTargetsResult",
&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", "2015-12-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_listener_certificates(
&self,
input: DescribeListenerCertificatesInput,
) -> RusotoFuture<DescribeListenerCertificatesOutput, DescribeListenerCertificatesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeListenerCertificates");
params.put("Version", "2015-12-01");
DescribeListenerCertificatesInputSerializer::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(DescribeListenerCertificatesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeListenerCertificatesOutput::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 = DescribeListenerCertificatesOutputDeserializer::deserialize(
"DescribeListenerCertificatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_listeners(
&self,
input: DescribeListenersInput,
) -> RusotoFuture<DescribeListenersOutput, DescribeListenersError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeListeners");
params.put("Version", "2015-12-01");
DescribeListenersInputSerializer::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(DescribeListenersError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeListenersOutput::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 = DescribeListenersOutputDeserializer::deserialize(
"DescribeListenersResult",
&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", "2015-12-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_balancers(
&self,
input: DescribeLoadBalancersInput,
) -> RusotoFuture<DescribeLoadBalancersOutput, DescribeLoadBalancersError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeLoadBalancers");
params.put("Version", "2015-12-01");
DescribeLoadBalancersInputSerializer::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 = DescribeLoadBalancersOutput::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 = DescribeLoadBalancersOutputDeserializer::deserialize(
"DescribeLoadBalancersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_rules(
&self,
input: DescribeRulesInput,
) -> RusotoFuture<DescribeRulesOutput, DescribeRulesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeRules");
params.put("Version", "2015-12-01");
DescribeRulesInputSerializer::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(DescribeRulesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeRulesOutput::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 = DescribeRulesOutputDeserializer::deserialize(
"DescribeRulesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_ssl_policies(
&self,
input: DescribeSSLPoliciesInput,
) -> RusotoFuture<DescribeSSLPoliciesOutput, DescribeSSLPoliciesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeSSLPolicies");
params.put("Version", "2015-12-01");
DescribeSSLPoliciesInputSerializer::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(DescribeSSLPoliciesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeSSLPoliciesOutput::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 = DescribeSSLPoliciesOutputDeserializer::deserialize(
"DescribeSSLPoliciesResult",
&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", "2015-12-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 describe_target_group_attributes(
&self,
input: DescribeTargetGroupAttributesInput,
) -> RusotoFuture<DescribeTargetGroupAttributesOutput, DescribeTargetGroupAttributesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeTargetGroupAttributes");
params.put("Version", "2015-12-01");
DescribeTargetGroupAttributesInputSerializer::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(DescribeTargetGroupAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeTargetGroupAttributesOutput::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 = DescribeTargetGroupAttributesOutputDeserializer::deserialize(
"DescribeTargetGroupAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_target_groups(
&self,
input: DescribeTargetGroupsInput,
) -> RusotoFuture<DescribeTargetGroupsOutput, DescribeTargetGroupsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeTargetGroups");
params.put("Version", "2015-12-01");
DescribeTargetGroupsInputSerializer::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(DescribeTargetGroupsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeTargetGroupsOutput::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 = DescribeTargetGroupsOutputDeserializer::deserialize(
"DescribeTargetGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_target_health(
&self,
input: DescribeTargetHealthInput,
) -> RusotoFuture<DescribeTargetHealthOutput, DescribeTargetHealthError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeTargetHealth");
params.put("Version", "2015-12-01");
DescribeTargetHealthInputSerializer::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(DescribeTargetHealthError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeTargetHealthOutput::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 = DescribeTargetHealthOutputDeserializer::deserialize(
"DescribeTargetHealthResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_listener(
&self,
input: ModifyListenerInput,
) -> RusotoFuture<ModifyListenerOutput, ModifyListenerError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyListener");
params.put("Version", "2015-12-01");
ModifyListenerInputSerializer::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(ModifyListenerError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyListenerOutput::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 = ModifyListenerOutputDeserializer::deserialize(
"ModifyListenerResult",
&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", "2015-12-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 modify_rule(
&self,
input: ModifyRuleInput,
) -> RusotoFuture<ModifyRuleOutput, ModifyRuleError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyRule");
params.put("Version", "2015-12-01");
ModifyRuleInputSerializer::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(ModifyRuleError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyRuleOutput::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 =
ModifyRuleOutputDeserializer::deserialize("ModifyRuleResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_target_group(
&self,
input: ModifyTargetGroupInput,
) -> RusotoFuture<ModifyTargetGroupOutput, ModifyTargetGroupError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyTargetGroup");
params.put("Version", "2015-12-01");
ModifyTargetGroupInputSerializer::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(ModifyTargetGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyTargetGroupOutput::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 = ModifyTargetGroupOutputDeserializer::deserialize(
"ModifyTargetGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_target_group_attributes(
&self,
input: ModifyTargetGroupAttributesInput,
) -> RusotoFuture<ModifyTargetGroupAttributesOutput, ModifyTargetGroupAttributesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyTargetGroupAttributes");
params.put("Version", "2015-12-01");
ModifyTargetGroupAttributesInputSerializer::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(ModifyTargetGroupAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyTargetGroupAttributesOutput::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 = ModifyTargetGroupAttributesOutputDeserializer::deserialize(
"ModifyTargetGroupAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn register_targets(
&self,
input: RegisterTargetsInput,
) -> RusotoFuture<RegisterTargetsOutput, RegisterTargetsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RegisterTargets");
params.put("Version", "2015-12-01");
RegisterTargetsInputSerializer::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(RegisterTargetsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RegisterTargetsOutput::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 = RegisterTargetsOutputDeserializer::deserialize(
"RegisterTargetsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn remove_listener_certificates(
&self,
input: RemoveListenerCertificatesInput,
) -> RusotoFuture<RemoveListenerCertificatesOutput, RemoveListenerCertificatesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveListenerCertificates");
params.put("Version", "2015-12-01");
RemoveListenerCertificatesInputSerializer::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(RemoveListenerCertificatesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RemoveListenerCertificatesOutput::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 = RemoveListenerCertificatesOutputDeserializer::deserialize(
"RemoveListenerCertificatesResult",
&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", "2015-12-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_ip_address_type(
&self,
input: SetIpAddressTypeInput,
) -> RusotoFuture<SetIpAddressTypeOutput, SetIpAddressTypeError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetIpAddressType");
params.put("Version", "2015-12-01");
SetIpAddressTypeInputSerializer::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(SetIpAddressTypeError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetIpAddressTypeOutput::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 = SetIpAddressTypeOutputDeserializer::deserialize(
"SetIpAddressTypeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_rule_priorities(
&self,
input: SetRulePrioritiesInput,
) -> RusotoFuture<SetRulePrioritiesOutput, SetRulePrioritiesError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetRulePriorities");
params.put("Version", "2015-12-01");
SetRulePrioritiesInputSerializer::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(SetRulePrioritiesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetRulePrioritiesOutput::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 = SetRulePrioritiesOutputDeserializer::deserialize(
"SetRulePrioritiesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_security_groups(
&self,
input: SetSecurityGroupsInput,
) -> RusotoFuture<SetSecurityGroupsOutput, SetSecurityGroupsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetSecurityGroups");
params.put("Version", "2015-12-01");
SetSecurityGroupsInputSerializer::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(SetSecurityGroupsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetSecurityGroupsOutput::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 = SetSecurityGroupsOutputDeserializer::deserialize(
"SetSecurityGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_subnets(
&self,
input: SetSubnetsInput,
) -> RusotoFuture<SetSubnetsOutput, SetSubnetsError> {
let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetSubnets");
params.put("Version", "2015-12-01");
SetSubnetsInputSerializer::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(SetSubnetsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SetSubnetsOutput::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 =
SetSubnetsOutputDeserializer::deserialize("SetSubnetsResult", &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 = DescribeLoadBalancersInput::default();
let result = client.describe_load_balancers(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 = DescribeLoadBalancersInput::default();
let result = client.describe_load_balancers(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}