use std::error::Error;
use std::fmt;
use std::io;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoFuture};
use rusoto_core::credential::{CredentialsError, ProvideAwsCredentials};
use rusoto_core::request::HttpDispatchError;
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::signature::SignedRequest;
use rusoto_core::xmlerror::*;
use rusoto_core::xmlutil::{
characters, end_element, find_start_element, peek_at_name, skip_tree, start_element,
};
use rusoto_core::xmlutil::{Next, Peek, XmlParseError, XmlResponse};
use serde_urlencoded;
use std::str::FromStr;
use xml::reader::ParserConfig;
use xml::reader::XmlEvent;
use xml::EventReader;
enum DeserializerNext {
Close,
Skip,
Element(String),
}
struct ARNDeserializer;
impl ARNDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 AbortEnvironmentUpdateMessage {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
}
struct AbortEnvironmentUpdateMessageSerializer;
impl AbortEnvironmentUpdateMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AbortEnvironmentUpdateMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
}
}
struct AbortableOperationInProgressDeserializer;
impl AbortableOperationInProgressDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ActionHistoryStatusDeserializer;
impl ActionHistoryStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ActionStatusDeserializer;
impl ActionStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ActionTypeDeserializer;
impl ActionTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ApplicationArnDeserializer;
impl ApplicationArnDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ApplicationDescription {
pub application_arn: Option<String>,
pub application_name: Option<String>,
pub configuration_templates: Option<Vec<String>>,
pub date_created: Option<String>,
pub date_updated: Option<String>,
pub description: Option<String>,
pub resource_lifecycle_config: Option<ApplicationResourceLifecycleConfig>,
pub versions: Option<Vec<String>>,
}
struct ApplicationDescriptionDeserializer;
impl ApplicationDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationArn" => {
obj.application_arn = Some(ApplicationArnDeserializer::deserialize(
"ApplicationArn",
stack,
)?);
}
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"ConfigurationTemplates" => {
obj.configuration_templates = match obj.configuration_templates {
Some(ref mut existing) => {
existing.extend(
ConfigurationTemplateNamesListDeserializer::deserialize(
"ConfigurationTemplates",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(ConfigurationTemplateNamesListDeserializer::deserialize(
"ConfigurationTemplates",
stack,
)?),
};
}
"DateCreated" => {
obj.date_created =
Some(CreationDateDeserializer::deserialize("DateCreated", stack)?);
}
"DateUpdated" => {
obj.date_updated =
Some(UpdateDateDeserializer::deserialize("DateUpdated", stack)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"ResourceLifecycleConfig" => {
obj.resource_lifecycle_config =
Some(ApplicationResourceLifecycleConfigDeserializer::deserialize(
"ResourceLifecycleConfig",
stack,
)?);
}
"Versions" => {
obj.versions = match obj.versions {
Some(ref mut existing) => {
existing.extend(VersionLabelsListDeserializer::deserialize(
"Versions", stack,
)?);
Some(existing.to_vec())
}
None => Some(VersionLabelsListDeserializer::deserialize(
"Versions", stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ApplicationDescriptionListDeserializer;
impl ApplicationDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ApplicationDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ApplicationDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationDescriptionMessage {
pub application: Option<ApplicationDescription>,
}
struct ApplicationDescriptionMessageDeserializer;
impl ApplicationDescriptionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationDescriptionMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationDescriptionMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Application" => {
obj.application = Some(ApplicationDescriptionDeserializer::deserialize(
"Application",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationDescriptionsMessage {
pub applications: Option<Vec<ApplicationDescription>>,
}
struct ApplicationDescriptionsMessageDeserializer;
impl ApplicationDescriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationDescriptionsMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationDescriptionsMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Applications" => {
obj.applications = match obj.applications {
Some(ref mut existing) => {
existing.extend(
ApplicationDescriptionListDeserializer::deserialize(
"Applications",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(ApplicationDescriptionListDeserializer::deserialize(
"Applications",
stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationMetrics {
pub duration: Option<i64>,
pub latency: Option<Latency>,
pub request_count: Option<i64>,
pub status_codes: Option<StatusCodes>,
}
struct ApplicationMetricsDeserializer;
impl ApplicationMetricsDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationMetrics, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationMetrics::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Duration" => {
obj.duration =
Some(NullableIntegerDeserializer::deserialize("Duration", stack)?);
}
"Latency" => {
obj.latency = Some(LatencyDeserializer::deserialize("Latency", stack)?);
}
"RequestCount" => {
obj.request_count = Some(RequestCountDeserializer::deserialize(
"RequestCount",
stack,
)?);
}
"StatusCodes" => {
obj.status_codes =
Some(StatusCodesDeserializer::deserialize("StatusCodes", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ApplicationNameDeserializer;
impl ApplicationNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ApplicationNamesListSerializer;
impl ApplicationNamesListSerializer {
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 ApplicationResourceLifecycleConfig {
pub service_role: Option<String>,
pub version_lifecycle_config: Option<ApplicationVersionLifecycleConfig>,
}
struct ApplicationResourceLifecycleConfigDeserializer;
impl ApplicationResourceLifecycleConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationResourceLifecycleConfig, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationResourceLifecycleConfig::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ServiceRole" => {
obj.service_role =
Some(StringDeserializer::deserialize("ServiceRole", stack)?);
}
"VersionLifecycleConfig" => {
obj.version_lifecycle_config =
Some(ApplicationVersionLifecycleConfigDeserializer::deserialize(
"VersionLifecycleConfig",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ApplicationResourceLifecycleConfigSerializer;
impl ApplicationResourceLifecycleConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ApplicationResourceLifecycleConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.service_role {
params.put(&format!("{}{}", prefix, "ServiceRole"), &field_value);
}
if let Some(ref field_value) = obj.version_lifecycle_config {
ApplicationVersionLifecycleConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "VersionLifecycleConfig"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationResourceLifecycleDescriptionMessage {
pub application_name: Option<String>,
pub resource_lifecycle_config: Option<ApplicationResourceLifecycleConfig>,
}
struct ApplicationResourceLifecycleDescriptionMessageDeserializer;
impl ApplicationResourceLifecycleDescriptionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationResourceLifecycleDescriptionMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationResourceLifecycleDescriptionMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"ResourceLifecycleConfig" => {
obj.resource_lifecycle_config =
Some(ApplicationResourceLifecycleConfigDeserializer::deserialize(
"ResourceLifecycleConfig",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ApplicationVersionArnDeserializer;
impl ApplicationVersionArnDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ApplicationVersionDescription {
pub application_name: Option<String>,
pub application_version_arn: Option<String>,
pub build_arn: Option<String>,
pub date_created: Option<String>,
pub date_updated: Option<String>,
pub description: Option<String>,
pub source_build_information: Option<SourceBuildInformation>,
pub source_bundle: Option<S3Location>,
pub status: Option<String>,
pub version_label: Option<String>,
}
struct ApplicationVersionDescriptionDeserializer;
impl ApplicationVersionDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationVersionDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"ApplicationVersionArn" => {
obj.application_version_arn =
Some(ApplicationVersionArnDeserializer::deserialize(
"ApplicationVersionArn",
stack,
)?);
}
"BuildArn" => {
obj.build_arn = Some(StringDeserializer::deserialize("BuildArn", stack)?);
}
"DateCreated" => {
obj.date_created =
Some(CreationDateDeserializer::deserialize("DateCreated", stack)?);
}
"DateUpdated" => {
obj.date_updated =
Some(UpdateDateDeserializer::deserialize("DateUpdated", stack)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"SourceBuildInformation" => {
obj.source_build_information =
Some(SourceBuildInformationDeserializer::deserialize(
"SourceBuildInformation",
stack,
)?);
}
"SourceBundle" => {
obj.source_bundle =
Some(S3LocationDeserializer::deserialize("SourceBundle", stack)?);
}
"Status" => {
obj.status = Some(ApplicationVersionStatusDeserializer::deserialize(
"Status", stack,
)?);
}
"VersionLabel" => {
obj.version_label = Some(VersionLabelDeserializer::deserialize(
"VersionLabel",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ApplicationVersionDescriptionListDeserializer;
impl ApplicationVersionDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ApplicationVersionDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ApplicationVersionDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationVersionDescriptionMessage {
pub application_version: Option<ApplicationVersionDescription>,
}
struct ApplicationVersionDescriptionMessageDeserializer;
impl ApplicationVersionDescriptionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionDescriptionMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationVersionDescriptionMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationVersion" => {
obj.application_version =
Some(ApplicationVersionDescriptionDeserializer::deserialize(
"ApplicationVersion",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationVersionDescriptionsMessage {
pub application_versions: Option<Vec<ApplicationVersionDescription>>,
pub next_token: Option<String>,
}
struct ApplicationVersionDescriptionsMessageDeserializer;
impl ApplicationVersionDescriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionDescriptionsMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationVersionDescriptionsMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationVersions" => {
obj.application_versions = match obj.application_versions {
Some(ref mut existing) => {
existing.extend(
ApplicationVersionDescriptionListDeserializer::deserialize(
"ApplicationVersions",
stack,
)?,
);
Some(existing.to_vec())
}
None => {
Some(ApplicationVersionDescriptionListDeserializer::deserialize(
"ApplicationVersions",
stack,
)?)
}
};
}
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationVersionLifecycleConfig {
pub max_age_rule: Option<MaxAgeRule>,
pub max_count_rule: Option<MaxCountRule>,
}
struct ApplicationVersionLifecycleConfigDeserializer;
impl ApplicationVersionLifecycleConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionLifecycleConfig, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplicationVersionLifecycleConfig::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"MaxAgeRule" => {
obj.max_age_rule =
Some(MaxAgeRuleDeserializer::deserialize("MaxAgeRule", stack)?);
}
"MaxCountRule" => {
obj.max_count_rule = Some(MaxCountRuleDeserializer::deserialize(
"MaxCountRule",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ApplicationVersionLifecycleConfigSerializer;
impl ApplicationVersionLifecycleConfigSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ApplicationVersionLifecycleConfig) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_age_rule {
MaxAgeRuleSerializer::serialize(
params,
&format!("{}{}", prefix, "MaxAgeRule"),
field_value,
);
}
if let Some(ref field_value) = obj.max_count_rule {
MaxCountRuleSerializer::serialize(
params,
&format!("{}{}", prefix, "MaxCountRule"),
field_value,
);
}
}
}
struct ApplicationVersionStatusDeserializer;
impl ApplicationVersionStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ApplyEnvironmentManagedActionRequest {
pub action_id: String,
pub environment_id: Option<String>,
pub environment_name: Option<String>,
}
struct ApplyEnvironmentManagedActionRequestSerializer;
impl ApplyEnvironmentManagedActionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ApplyEnvironmentManagedActionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ActionId"), &obj.action_id);
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplyEnvironmentManagedActionResult {
pub action_description: Option<String>,
pub action_id: Option<String>,
pub action_type: Option<String>,
pub status: Option<String>,
}
struct ApplyEnvironmentManagedActionResultDeserializer;
impl ApplyEnvironmentManagedActionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplyEnvironmentManagedActionResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ApplyEnvironmentManagedActionResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ActionDescription" => {
obj.action_description =
Some(StringDeserializer::deserialize("ActionDescription", stack)?);
}
"ActionId" => {
obj.action_id = Some(StringDeserializer::deserialize("ActionId", stack)?);
}
"ActionType" => {
obj.action_type =
Some(ActionTypeDeserializer::deserialize("ActionType", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AutoScalingGroup {
pub name: Option<String>,
}
struct AutoScalingGroupDeserializer;
impl AutoScalingGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AutoScalingGroup, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = AutoScalingGroup::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct AutoScalingGroupListDeserializer;
impl AutoScalingGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AutoScalingGroup>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(AutoScalingGroupDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct AvailableSolutionStackDetailsListDeserializer;
impl AvailableSolutionStackDetailsListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SolutionStackDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(SolutionStackDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct AvailableSolutionStackNamesListDeserializer;
impl AvailableSolutionStackNamesListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(SolutionStackNameDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct BoxedBooleanDeserializer;
impl BoxedBooleanDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 BoxedIntDeserializer;
impl BoxedIntDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 BuildConfiguration {
pub artifact_name: Option<String>,
pub code_build_service_role: String,
pub compute_type: Option<String>,
pub image: String,
pub timeout_in_minutes: Option<i64>,
}
struct BuildConfigurationSerializer;
impl BuildConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BuildConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.artifact_name {
params.put(&format!("{}{}", prefix, "ArtifactName"), &field_value);
}
params.put(
&format!("{}{}", prefix, "CodeBuildServiceRole"),
&obj.code_build_service_role,
);
if let Some(ref field_value) = obj.compute_type {
params.put(&format!("{}{}", prefix, "ComputeType"), &field_value);
}
params.put(&format!("{}{}", prefix, "Image"), &obj.image);
if let Some(ref field_value) = obj.timeout_in_minutes {
params.put(
&format!("{}{}", prefix, "TimeoutInMinutes"),
&field_value.to_string(),
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Builder {
pub arn: Option<String>,
}
struct BuilderDeserializer;
impl BuilderDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Builder, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Builder::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ARN" => {
obj.arn = Some(ARNDeserializer::deserialize("ARN", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CPUUtilization {
pub io_wait: Option<f64>,
pub irq: Option<f64>,
pub idle: Option<f64>,
pub nice: Option<f64>,
pub privileged: Option<f64>,
pub soft_irq: Option<f64>,
pub system: Option<f64>,
pub user: Option<f64>,
}
struct CPUUtilizationDeserializer;
impl CPUUtilizationDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CPUUtilization, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = CPUUtilization::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"IOWait" => {
obj.io_wait =
Some(NullableDoubleDeserializer::deserialize("IOWait", stack)?);
}
"IRQ" => {
obj.irq = Some(NullableDoubleDeserializer::deserialize("IRQ", stack)?);
}
"Idle" => {
obj.idle = Some(NullableDoubleDeserializer::deserialize("Idle", stack)?);
}
"Nice" => {
obj.nice = Some(NullableDoubleDeserializer::deserialize("Nice", stack)?);
}
"Privileged" => {
obj.privileged = Some(NullableDoubleDeserializer::deserialize(
"Privileged",
stack,
)?);
}
"SoftIRQ" => {
obj.soft_irq =
Some(NullableDoubleDeserializer::deserialize("SoftIRQ", stack)?);
}
"System" => {
obj.system =
Some(NullableDoubleDeserializer::deserialize("System", stack)?);
}
"User" => {
obj.user = Some(NullableDoubleDeserializer::deserialize("User", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CauseDeserializer;
impl CauseDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 CausesDeserializer;
impl CausesDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(CauseDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CheckDNSAvailabilityMessage {
pub cname_prefix: String,
}
struct CheckDNSAvailabilityMessageSerializer;
impl CheckDNSAvailabilityMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CheckDNSAvailabilityMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "CNAMEPrefix"), &obj.cname_prefix);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CheckDNSAvailabilityResultMessage {
pub available: Option<bool>,
pub fully_qualified_cname: Option<String>,
}
struct CheckDNSAvailabilityResultMessageDeserializer;
impl CheckDNSAvailabilityResultMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CheckDNSAvailabilityResultMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = CheckDNSAvailabilityResultMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Available" => {
obj.available = Some(CnameAvailabilityDeserializer::deserialize(
"Available",
stack,
)?);
}
"FullyQualifiedCNAME" => {
obj.fully_qualified_cname = Some(DNSCnameDeserializer::deserialize(
"FullyQualifiedCNAME",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CnameAvailabilityDeserializer;
impl CnameAvailabilityDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ComposeEnvironmentsMessage {
pub application_name: Option<String>,
pub group_name: Option<String>,
pub version_labels: Option<Vec<String>>,
}
struct ComposeEnvironmentsMessageSerializer;
impl ComposeEnvironmentsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ComposeEnvironmentsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_name {
params.put(&format!("{}{}", prefix, "ApplicationName"), &field_value);
}
if let Some(ref field_value) = obj.group_name {
params.put(&format!("{}{}", prefix, "GroupName"), &field_value);
}
if let Some(ref field_value) = obj.version_labels {
VersionLabelsSerializer::serialize(
params,
&format!("{}{}", prefix, "VersionLabels"),
field_value,
);
}
}
}
struct ConfigurationDeploymentStatusDeserializer;
impl ConfigurationDeploymentStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationOptionDefaultValueDeserializer;
impl ConfigurationOptionDefaultValueDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationOptionDescription {
pub change_severity: Option<String>,
pub default_value: Option<String>,
pub max_length: Option<i64>,
pub max_value: Option<i64>,
pub min_value: Option<i64>,
pub name: Option<String>,
pub namespace: Option<String>,
pub regex: Option<OptionRestrictionRegex>,
pub user_defined: Option<bool>,
pub value_options: Option<Vec<String>>,
pub value_type: Option<String>,
}
struct ConfigurationOptionDescriptionDeserializer;
impl ConfigurationOptionDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationOptionDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ConfigurationOptionDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ChangeSeverity" => {
obj.change_severity =
Some(ConfigurationOptionSeverityDeserializer::deserialize(
"ChangeSeverity",
stack,
)?);
}
"DefaultValue" => {
obj.default_value =
Some(ConfigurationOptionDefaultValueDeserializer::deserialize(
"DefaultValue",
stack,
)?);
}
"MaxLength" => {
obj.max_length = Some(OptionRestrictionMaxLengthDeserializer::deserialize(
"MaxLength",
stack,
)?);
}
"MaxValue" => {
obj.max_value = Some(OptionRestrictionMaxValueDeserializer::deserialize(
"MaxValue", stack,
)?);
}
"MinValue" => {
obj.min_value = Some(OptionRestrictionMinValueDeserializer::deserialize(
"MinValue", stack,
)?);
}
"Name" => {
obj.name = Some(ConfigurationOptionNameDeserializer::deserialize(
"Name", stack,
)?);
}
"Namespace" => {
obj.namespace = Some(OptionNamespaceDeserializer::deserialize(
"Namespace",
stack,
)?);
}
"Regex" => {
obj.regex = Some(OptionRestrictionRegexDeserializer::deserialize(
"Regex", stack,
)?);
}
"UserDefined" => {
obj.user_defined = Some(UserDefinedOptionDeserializer::deserialize(
"UserDefined",
stack,
)?);
}
"ValueOptions" => {
obj.value_options = match obj.value_options {
Some(ref mut existing) => {
existing.extend(
ConfigurationOptionPossibleValuesDeserializer::deserialize(
"ValueOptions",
stack,
)?,
);
Some(existing.to_vec())
}
None => {
Some(ConfigurationOptionPossibleValuesDeserializer::deserialize(
"ValueOptions",
stack,
)?)
}
};
}
"ValueType" => {
obj.value_type =
Some(ConfigurationOptionValueTypeDeserializer::deserialize(
"ValueType",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationOptionDescriptionsListDeserializer;
impl ConfigurationOptionDescriptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ConfigurationOptionDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ConfigurationOptionDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct ConfigurationOptionNameDeserializer;
impl ConfigurationOptionNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationOptionPossibleValueDeserializer;
impl ConfigurationOptionPossibleValueDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationOptionPossibleValuesDeserializer;
impl ConfigurationOptionPossibleValuesDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ConfigurationOptionPossibleValueDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigurationOptionSetting {
pub namespace: Option<String>,
pub option_name: Option<String>,
pub resource_name: Option<String>,
pub value: Option<String>,
}
struct ConfigurationOptionSettingDeserializer;
impl ConfigurationOptionSettingDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationOptionSetting, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ConfigurationOptionSetting::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Namespace" => {
obj.namespace = Some(OptionNamespaceDeserializer::deserialize(
"Namespace",
stack,
)?);
}
"OptionName" => {
obj.option_name = Some(ConfigurationOptionNameDeserializer::deserialize(
"OptionName",
stack,
)?);
}
"ResourceName" => {
obj.resource_name = Some(ResourceNameDeserializer::deserialize(
"ResourceName",
stack,
)?);
}
"Value" => {
obj.value = Some(ConfigurationOptionValueDeserializer::deserialize(
"Value", stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationOptionSettingSerializer;
impl ConfigurationOptionSettingSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ConfigurationOptionSetting) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.namespace {
params.put(&format!("{}{}", prefix, "Namespace"), &field_value);
}
if let Some(ref field_value) = obj.option_name {
params.put(&format!("{}{}", prefix, "OptionName"), &field_value);
}
if let Some(ref field_value) = obj.resource_name {
params.put(&format!("{}{}", prefix, "ResourceName"), &field_value);
}
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
struct ConfigurationOptionSettingsListDeserializer;
impl ConfigurationOptionSettingsListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ConfigurationOptionSetting>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ConfigurationOptionSettingDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct ConfigurationOptionSettingsListSerializer;
impl ConfigurationOptionSettingsListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<ConfigurationOptionSetting>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ConfigurationOptionSettingSerializer::serialize(params, &key, obj);
}
}
}
struct ConfigurationOptionSeverityDeserializer;
impl ConfigurationOptionSeverityDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationOptionValueDeserializer;
impl ConfigurationOptionValueDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationOptionValueTypeDeserializer;
impl ConfigurationOptionValueTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationOptionsDescription {
pub options: Option<Vec<ConfigurationOptionDescription>>,
pub platform_arn: Option<String>,
pub solution_stack_name: Option<String>,
}
struct ConfigurationOptionsDescriptionDeserializer;
impl ConfigurationOptionsDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationOptionsDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ConfigurationOptionsDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
match &name[..] {
"Options" => {
obj.options = match obj.options {
Some(ref mut existing) => {
existing.extend(ConfigurationOptionDescriptionsListDeserializer::deserialize("Options", stack)?);
Some(existing.to_vec())
}
None => Some(
ConfigurationOptionDescriptionsListDeserializer::deserialize(
"Options", stack,
)?,
),
};
}
"PlatformArn" => {
obj.platform_arn =
Some(PlatformArnDeserializer::deserialize("PlatformArn", stack)?);
}
"SolutionStackName" => {
obj.solution_stack_name =
Some(SolutionStackNameDeserializer::deserialize(
"SolutionStackName",
stack,
)?);
}
_ => skip_tree(stack),
}
}
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigurationSettingsDescription {
pub application_name: Option<String>,
pub date_created: Option<String>,
pub date_updated: Option<String>,
pub deployment_status: Option<String>,
pub description: Option<String>,
pub environment_name: Option<String>,
pub option_settings: Option<Vec<ConfigurationOptionSetting>>,
pub platform_arn: Option<String>,
pub solution_stack_name: Option<String>,
pub template_name: Option<String>,
}
struct ConfigurationSettingsDescriptionDeserializer;
impl ConfigurationSettingsDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationSettingsDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ConfigurationSettingsDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"DateCreated" => {
obj.date_created =
Some(CreationDateDeserializer::deserialize("DateCreated", stack)?);
}
"DateUpdated" => {
obj.date_updated =
Some(UpdateDateDeserializer::deserialize("DateUpdated", stack)?);
}
"DeploymentStatus" => {
obj.deployment_status =
Some(ConfigurationDeploymentStatusDeserializer::deserialize(
"DeploymentStatus",
stack,
)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"EnvironmentName" => {
obj.environment_name = Some(EnvironmentNameDeserializer::deserialize(
"EnvironmentName",
stack,
)?);
}
"OptionSettings" => {
obj.option_settings = match obj.option_settings {
Some(ref mut existing) => {
existing.extend(
ConfigurationOptionSettingsListDeserializer::deserialize(
"OptionSettings",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(ConfigurationOptionSettingsListDeserializer::deserialize(
"OptionSettings",
stack,
)?),
};
}
"PlatformArn" => {
obj.platform_arn =
Some(PlatformArnDeserializer::deserialize("PlatformArn", stack)?);
}
"SolutionStackName" => {
obj.solution_stack_name = Some(SolutionStackNameDeserializer::deserialize(
"SolutionStackName",
stack,
)?);
}
"TemplateName" => {
obj.template_name =
Some(ConfigurationTemplateNameDeserializer::deserialize(
"TemplateName",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationSettingsDescriptionListDeserializer;
impl ConfigurationSettingsDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ConfigurationSettingsDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ConfigurationSettingsDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigurationSettingsDescriptions {
pub configuration_settings: Option<Vec<ConfigurationSettingsDescription>>,
}
struct ConfigurationSettingsDescriptionsDeserializer;
impl ConfigurationSettingsDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationSettingsDescriptions, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ConfigurationSettingsDescriptions::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
match &name[..] {
"ConfigurationSettings" => {
obj.configuration_settings = match obj.configuration_settings {
Some(ref mut existing) => {
existing.extend(ConfigurationSettingsDescriptionListDeserializer::deserialize("ConfigurationSettings", stack)?);
Some(existing.to_vec())
}
None => Some(
ConfigurationSettingsDescriptionListDeserializer::deserialize(
"ConfigurationSettings",
stack,
)?,
),
};
}
_ => skip_tree(stack),
}
}
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigurationSettingsValidationMessages {
pub messages: Option<Vec<ValidationMessage>>,
}
struct ConfigurationSettingsValidationMessagesDeserializer;
impl ConfigurationSettingsValidationMessagesDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationSettingsValidationMessages, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ConfigurationSettingsValidationMessages::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Messages" => {
obj.messages = match obj.messages {
Some(ref mut existing) => {
existing.extend(ValidationMessagesListDeserializer::deserialize(
"Messages", stack,
)?);
Some(existing.to_vec())
}
None => Some(ValidationMessagesListDeserializer::deserialize(
"Messages", stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationTemplateNameDeserializer;
impl ConfigurationTemplateNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ConfigurationTemplateNamesListDeserializer;
impl ConfigurationTemplateNamesListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ConfigurationTemplateNameDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateApplicationMessage {
pub application_name: String,
pub description: Option<String>,
pub resource_lifecycle_config: Option<ApplicationResourceLifecycleConfig>,
}
struct CreateApplicationMessageSerializer;
impl CreateApplicationMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateApplicationMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.resource_lifecycle_config {
ApplicationResourceLifecycleConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceLifecycleConfig"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateApplicationVersionMessage {
pub application_name: String,
pub auto_create_application: Option<bool>,
pub build_configuration: Option<BuildConfiguration>,
pub description: Option<String>,
pub process: Option<bool>,
pub source_build_information: Option<SourceBuildInformation>,
pub source_bundle: Option<S3Location>,
pub version_label: String,
}
struct CreateApplicationVersionMessageSerializer;
impl CreateApplicationVersionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateApplicationVersionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.auto_create_application {
params.put(
&format!("{}{}", prefix, "AutoCreateApplication"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.build_configuration {
BuildConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "BuildConfiguration"),
field_value,
);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.process {
params.put(
&format!("{}{}", prefix, "Process"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.source_build_information {
SourceBuildInformationSerializer::serialize(
params,
&format!("{}{}", prefix, "SourceBuildInformation"),
field_value,
);
}
if let Some(ref field_value) = obj.source_bundle {
S3LocationSerializer::serialize(
params,
&format!("{}{}", prefix, "SourceBundle"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "VersionLabel"), &obj.version_label);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateConfigurationTemplateMessage {
pub application_name: String,
pub description: Option<String>,
pub environment_id: Option<String>,
pub option_settings: Option<Vec<ConfigurationOptionSetting>>,
pub platform_arn: Option<String>,
pub solution_stack_name: Option<String>,
pub source_configuration: Option<SourceConfiguration>,
pub template_name: String,
}
struct CreateConfigurationTemplateMessageSerializer;
impl CreateConfigurationTemplateMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateConfigurationTemplateMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.option_settings {
ConfigurationOptionSettingsListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionSettings"),
field_value,
);
}
if let Some(ref field_value) = obj.platform_arn {
params.put(&format!("{}{}", prefix, "PlatformArn"), &field_value);
}
if let Some(ref field_value) = obj.solution_stack_name {
params.put(&format!("{}{}", prefix, "SolutionStackName"), &field_value);
}
if let Some(ref field_value) = obj.source_configuration {
SourceConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "SourceConfiguration"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateEnvironmentMessage {
pub application_name: String,
pub cname_prefix: Option<String>,
pub description: Option<String>,
pub environment_name: Option<String>,
pub group_name: Option<String>,
pub option_settings: Option<Vec<ConfigurationOptionSetting>>,
pub options_to_remove: Option<Vec<OptionSpecification>>,
pub platform_arn: Option<String>,
pub solution_stack_name: Option<String>,
pub tags: Option<Vec<Tag>>,
pub template_name: Option<String>,
pub tier: Option<EnvironmentTier>,
pub version_label: Option<String>,
}
struct CreateEnvironmentMessageSerializer;
impl CreateEnvironmentMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateEnvironmentMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.cname_prefix {
params.put(&format!("{}{}", prefix, "CNAMEPrefix"), &field_value);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.group_name {
params.put(&format!("{}{}", prefix, "GroupName"), &field_value);
}
if let Some(ref field_value) = obj.option_settings {
ConfigurationOptionSettingsListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionSettings"),
field_value,
);
}
if let Some(ref field_value) = obj.options_to_remove {
OptionsSpecifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionsToRemove"),
field_value,
);
}
if let Some(ref field_value) = obj.platform_arn {
params.put(&format!("{}{}", prefix, "PlatformArn"), &field_value);
}
if let Some(ref field_value) = obj.solution_stack_name {
params.put(&format!("{}{}", prefix, "SolutionStackName"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
if let Some(ref field_value) = obj.template_name {
params.put(&format!("{}{}", prefix, "TemplateName"), &field_value);
}
if let Some(ref field_value) = obj.tier {
EnvironmentTierSerializer::serialize(
params,
&format!("{}{}", prefix, "Tier"),
field_value,
);
}
if let Some(ref field_value) = obj.version_label {
params.put(&format!("{}{}", prefix, "VersionLabel"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreatePlatformVersionRequest {
pub environment_name: Option<String>,
pub option_settings: Option<Vec<ConfigurationOptionSetting>>,
pub platform_definition_bundle: S3Location,
pub platform_name: String,
pub platform_version: String,
}
struct CreatePlatformVersionRequestSerializer;
impl CreatePlatformVersionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreatePlatformVersionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.option_settings {
ConfigurationOptionSettingsListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionSettings"),
field_value,
);
}
S3LocationSerializer::serialize(
params,
&format!("{}{}", prefix, "PlatformDefinitionBundle"),
&obj.platform_definition_bundle,
);
params.put(&format!("{}{}", prefix, "PlatformName"), &obj.platform_name);
params.put(
&format!("{}{}", prefix, "PlatformVersion"),
&obj.platform_version,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreatePlatformVersionResult {
pub builder: Option<Builder>,
pub platform_summary: Option<PlatformSummary>,
}
struct CreatePlatformVersionResultDeserializer;
impl CreatePlatformVersionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreatePlatformVersionResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = CreatePlatformVersionResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Builder" => {
obj.builder = Some(BuilderDeserializer::deserialize("Builder", stack)?);
}
"PlatformSummary" => {
obj.platform_summary = Some(PlatformSummaryDeserializer::deserialize(
"PlatformSummary",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStorageLocationResultMessage {
pub s3_bucket: Option<String>,
}
struct CreateStorageLocationResultMessageDeserializer;
impl CreateStorageLocationResultMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateStorageLocationResultMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = CreateStorageLocationResultMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"S3Bucket" => {
obj.s3_bucket = Some(S3BucketDeserializer::deserialize("S3Bucket", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CreationDateDeserializer;
impl CreationDateDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 CustomAmi {
pub image_id: Option<String>,
pub virtualization_type: Option<String>,
}
struct CustomAmiDeserializer;
impl CustomAmiDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CustomAmi, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = CustomAmi::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ImageId" => {
obj.image_id = Some(ImageIdDeserializer::deserialize("ImageId", stack)?);
}
"VirtualizationType" => {
obj.virtualization_type =
Some(VirtualizationTypeDeserializer::deserialize(
"VirtualizationType",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CustomAmiListDeserializer;
impl CustomAmiListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<CustomAmi>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(CustomAmiDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct DNSCnameDeserializer;
impl DNSCnameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 DeleteApplicationMessage {
pub application_name: String,
pub terminate_env_by_force: Option<bool>,
}
struct DeleteApplicationMessageSerializer;
impl DeleteApplicationMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteApplicationMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.terminate_env_by_force {
params.put(
&format!("{}{}", prefix, "TerminateEnvByForce"),
&field_value.to_string(),
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteApplicationVersionMessage {
pub application_name: String,
pub delete_source_bundle: Option<bool>,
pub version_label: String,
}
struct DeleteApplicationVersionMessageSerializer;
impl DeleteApplicationVersionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteApplicationVersionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.delete_source_bundle {
params.put(
&format!("{}{}", prefix, "DeleteSourceBundle"),
&field_value.to_string(),
);
}
params.put(&format!("{}{}", prefix, "VersionLabel"), &obj.version_label);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteConfigurationTemplateMessage {
pub application_name: String,
pub template_name: String,
}
struct DeleteConfigurationTemplateMessageSerializer;
impl DeleteConfigurationTemplateMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteConfigurationTemplateMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteEnvironmentConfigurationMessage {
pub application_name: String,
pub environment_name: String,
}
struct DeleteEnvironmentConfigurationMessageSerializer;
impl DeleteEnvironmentConfigurationMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteEnvironmentConfigurationMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
params.put(
&format!("{}{}", prefix, "EnvironmentName"),
&obj.environment_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeletePlatformVersionRequest {
pub platform_arn: Option<String>,
}
struct DeletePlatformVersionRequestSerializer;
impl DeletePlatformVersionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeletePlatformVersionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.platform_arn {
params.put(&format!("{}{}", prefix, "PlatformArn"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeletePlatformVersionResult {
pub platform_summary: Option<PlatformSummary>,
}
struct DeletePlatformVersionResultDeserializer;
impl DeletePlatformVersionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeletePlatformVersionResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = DeletePlatformVersionResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"PlatformSummary" => {
obj.platform_summary = Some(PlatformSummaryDeserializer::deserialize(
"PlatformSummary",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Deployment {
pub deployment_id: Option<i64>,
pub deployment_time: Option<String>,
pub status: Option<String>,
pub version_label: Option<String>,
}
struct DeploymentDeserializer;
impl DeploymentDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Deployment, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Deployment::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"DeploymentId" => {
obj.deployment_id = Some(NullableLongDeserializer::deserialize(
"DeploymentId",
stack,
)?);
}
"DeploymentTime" => {
obj.deployment_time = Some(DeploymentTimestampDeserializer::deserialize(
"DeploymentTime",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"VersionLabel" => {
obj.version_label =
Some(StringDeserializer::deserialize("VersionLabel", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DeploymentTimestampDeserializer;
impl DeploymentTimestampDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 DescribeAccountAttributesResult {
pub resource_quotas: Option<ResourceQuotas>,
}
struct DescribeAccountAttributesResultDeserializer;
impl DescribeAccountAttributesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeAccountAttributesResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = DescribeAccountAttributesResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ResourceQuotas" => {
obj.resource_quotas = Some(ResourceQuotasDeserializer::deserialize(
"ResourceQuotas",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeApplicationVersionsMessage {
pub application_name: Option<String>,
pub max_records: Option<i64>,
pub next_token: Option<String>,
pub version_labels: Option<Vec<String>>,
}
struct DescribeApplicationVersionsMessageSerializer;
impl DescribeApplicationVersionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeApplicationVersionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_name {
params.put(&format!("{}{}", prefix, "ApplicationName"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(
&format!("{}{}", prefix, "MaxRecords"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.version_labels {
VersionLabelsListSerializer::serialize(
params,
&format!("{}{}", prefix, "VersionLabels"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeApplicationsMessage {
pub application_names: Option<Vec<String>>,
}
struct DescribeApplicationsMessageSerializer;
impl DescribeApplicationsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeApplicationsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_names {
ApplicationNamesListSerializer::serialize(
params,
&format!("{}{}", prefix, "ApplicationNames"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeConfigurationOptionsMessage {
pub application_name: Option<String>,
pub environment_name: Option<String>,
pub options: Option<Vec<OptionSpecification>>,
pub platform_arn: Option<String>,
pub solution_stack_name: Option<String>,
pub template_name: Option<String>,
}
struct DescribeConfigurationOptionsMessageSerializer;
impl DescribeConfigurationOptionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeConfigurationOptionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_name {
params.put(&format!("{}{}", prefix, "ApplicationName"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.options {
OptionsSpecifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "Options"),
field_value,
);
}
if let Some(ref field_value) = obj.platform_arn {
params.put(&format!("{}{}", prefix, "PlatformArn"), &field_value);
}
if let Some(ref field_value) = obj.solution_stack_name {
params.put(&format!("{}{}", prefix, "SolutionStackName"), &field_value);
}
if let Some(ref field_value) = obj.template_name {
params.put(&format!("{}{}", prefix, "TemplateName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeConfigurationSettingsMessage {
pub application_name: String,
pub environment_name: Option<String>,
pub template_name: Option<String>,
}
struct DescribeConfigurationSettingsMessageSerializer;
impl DescribeConfigurationSettingsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeConfigurationSettingsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.template_name {
params.put(&format!("{}{}", prefix, "TemplateName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentHealthRequest {
pub attribute_names: Option<Vec<String>>,
pub environment_id: Option<String>,
pub environment_name: Option<String>,
}
struct DescribeEnvironmentHealthRequestSerializer;
impl DescribeEnvironmentHealthRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEnvironmentHealthRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.attribute_names {
EnvironmentHealthAttributesSerializer::serialize(
params,
&format!("{}{}", prefix, "AttributeNames"),
field_value,
);
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentHealthResult {
pub application_metrics: Option<ApplicationMetrics>,
pub causes: Option<Vec<String>>,
pub color: Option<String>,
pub environment_name: Option<String>,
pub health_status: Option<String>,
pub instances_health: Option<InstanceHealthSummary>,
pub refreshed_at: Option<String>,
pub status: Option<String>,
}
struct DescribeEnvironmentHealthResultDeserializer;
impl DescribeEnvironmentHealthResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEnvironmentHealthResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = DescribeEnvironmentHealthResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationMetrics" => {
obj.application_metrics =
Some(ApplicationMetricsDeserializer::deserialize(
"ApplicationMetrics",
stack,
)?);
}
"Causes" => {
obj.causes = match obj.causes {
Some(ref mut existing) => {
existing.extend(CausesDeserializer::deserialize("Causes", stack)?);
Some(existing.to_vec())
}
None => Some(CausesDeserializer::deserialize("Causes", stack)?),
};
}
"Color" => {
obj.color = Some(StringDeserializer::deserialize("Color", stack)?);
}
"EnvironmentName" => {
obj.environment_name = Some(EnvironmentNameDeserializer::deserialize(
"EnvironmentName",
stack,
)?);
}
"HealthStatus" => {
obj.health_status =
Some(StringDeserializer::deserialize("HealthStatus", stack)?);
}
"InstancesHealth" => {
obj.instances_health =
Some(InstanceHealthSummaryDeserializer::deserialize(
"InstancesHealth",
stack,
)?);
}
"RefreshedAt" => {
obj.refreshed_at =
Some(RefreshedAtDeserializer::deserialize("RefreshedAt", stack)?);
}
"Status" => {
obj.status =
Some(EnvironmentHealthDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentManagedActionHistoryRequest {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub max_items: Option<i64>,
pub next_token: Option<String>,
}
struct DescribeEnvironmentManagedActionHistoryRequestSerializer;
impl DescribeEnvironmentManagedActionHistoryRequestSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DescribeEnvironmentManagedActionHistoryRequest,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.max_items {
params.put(
&format!("{}{}", prefix, "MaxItems"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentManagedActionHistoryResult {
pub managed_action_history_items: Option<Vec<ManagedActionHistoryItem>>,
pub next_token: Option<String>,
}
struct DescribeEnvironmentManagedActionHistoryResultDeserializer;
impl DescribeEnvironmentManagedActionHistoryResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEnvironmentManagedActionHistoryResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = DescribeEnvironmentManagedActionHistoryResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ManagedActionHistoryItems" => {
obj.managed_action_history_items = match obj.managed_action_history_items {
Some(ref mut existing) => {
existing.extend(
ManagedActionHistoryItemsDeserializer::deserialize(
"ManagedActionHistoryItems",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(ManagedActionHistoryItemsDeserializer::deserialize(
"ManagedActionHistoryItems",
stack,
)?),
};
}
"NextToken" => {
obj.next_token = Some(StringDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentManagedActionsRequest {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub status: Option<String>,
}
struct DescribeEnvironmentManagedActionsRequestSerializer;
impl DescribeEnvironmentManagedActionsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEnvironmentManagedActionsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.status {
params.put(&format!("{}{}", prefix, "Status"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentManagedActionsResult {
pub managed_actions: Option<Vec<ManagedAction>>,
}
struct DescribeEnvironmentManagedActionsResultDeserializer;
impl DescribeEnvironmentManagedActionsResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEnvironmentManagedActionsResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = DescribeEnvironmentManagedActionsResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ManagedActions" => {
obj.managed_actions = match obj.managed_actions {
Some(ref mut existing) => {
existing.extend(ManagedActionsDeserializer::deserialize(
"ManagedActions",
stack,
)?);
Some(existing.to_vec())
}
None => Some(ManagedActionsDeserializer::deserialize(
"ManagedActions",
stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentResourcesMessage {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
}
struct DescribeEnvironmentResourcesMessageSerializer;
impl DescribeEnvironmentResourcesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEnvironmentResourcesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEnvironmentsMessage {
pub application_name: Option<String>,
pub environment_ids: Option<Vec<String>>,
pub environment_names: Option<Vec<String>>,
pub include_deleted: Option<bool>,
pub included_deleted_back_to: Option<String>,
pub max_records: Option<i64>,
pub next_token: Option<String>,
pub version_label: Option<String>,
}
struct DescribeEnvironmentsMessageSerializer;
impl DescribeEnvironmentsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEnvironmentsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_name {
params.put(&format!("{}{}", prefix, "ApplicationName"), &field_value);
}
if let Some(ref field_value) = obj.environment_ids {
EnvironmentIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnvironmentIds"),
field_value,
);
}
if let Some(ref field_value) = obj.environment_names {
EnvironmentNamesListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnvironmentNames"),
field_value,
);
}
if let Some(ref field_value) = obj.include_deleted {
params.put(
&format!("{}{}", prefix, "IncludeDeleted"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.included_deleted_back_to {
params.put(
&format!("{}{}", prefix, "IncludedDeletedBackTo"),
&field_value,
);
}
if let Some(ref field_value) = obj.max_records {
params.put(
&format!("{}{}", prefix, "MaxRecords"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.version_label {
params.put(&format!("{}{}", prefix, "VersionLabel"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventsMessage {
pub application_name: Option<String>,
pub end_time: Option<String>,
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub max_records: Option<i64>,
pub next_token: Option<String>,
pub platform_arn: Option<String>,
pub request_id: Option<String>,
pub severity: Option<String>,
pub start_time: Option<String>,
pub template_name: Option<String>,
pub version_label: Option<String>,
}
struct DescribeEventsMessageSerializer;
impl DescribeEventsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEventsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_name {
params.put(&format!("{}{}", prefix, "ApplicationName"), &field_value);
}
if let Some(ref field_value) = obj.end_time {
params.put(&format!("{}{}", prefix, "EndTime"), &field_value);
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(
&format!("{}{}", prefix, "MaxRecords"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.platform_arn {
params.put(&format!("{}{}", prefix, "PlatformArn"), &field_value);
}
if let Some(ref field_value) = obj.request_id {
params.put(&format!("{}{}", prefix, "RequestId"), &field_value);
}
if let Some(ref field_value) = obj.severity {
params.put(&format!("{}{}", prefix, "Severity"), &field_value);
}
if let Some(ref field_value) = obj.start_time {
params.put(&format!("{}{}", prefix, "StartTime"), &field_value);
}
if let Some(ref field_value) = obj.template_name {
params.put(&format!("{}{}", prefix, "TemplateName"), &field_value);
}
if let Some(ref field_value) = obj.version_label {
params.put(&format!("{}{}", prefix, "VersionLabel"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeInstancesHealthRequest {
pub attribute_names: Option<Vec<String>>,
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub next_token: Option<String>,
}
struct DescribeInstancesHealthRequestSerializer;
impl DescribeInstancesHealthRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeInstancesHealthRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.attribute_names {
InstancesHealthAttributesSerializer::serialize(
params,
&format!("{}{}", prefix, "AttributeNames"),
field_value,
);
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeInstancesHealthResult {
pub instance_health_list: Option<Vec<SingleInstanceHealth>>,
pub next_token: Option<String>,
pub refreshed_at: Option<String>,
}
struct DescribeInstancesHealthResultDeserializer;
impl DescribeInstancesHealthResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeInstancesHealthResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = DescribeInstancesHealthResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"InstanceHealthList" => {
obj.instance_health_list = match obj.instance_health_list {
Some(ref mut existing) => {
existing.extend(InstanceHealthListDeserializer::deserialize(
"InstanceHealthList",
stack,
)?);
Some(existing.to_vec())
}
None => Some(InstanceHealthListDeserializer::deserialize(
"InstanceHealthList",
stack,
)?),
};
}
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"RefreshedAt" => {
obj.refreshed_at =
Some(RefreshedAtDeserializer::deserialize("RefreshedAt", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribePlatformVersionRequest {
pub platform_arn: Option<String>,
}
struct DescribePlatformVersionRequestSerializer;
impl DescribePlatformVersionRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribePlatformVersionRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.platform_arn {
params.put(&format!("{}{}", prefix, "PlatformArn"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribePlatformVersionResult {
pub platform_description: Option<PlatformDescription>,
}
struct DescribePlatformVersionResultDeserializer;
impl DescribePlatformVersionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribePlatformVersionResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = DescribePlatformVersionResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"PlatformDescription" => {
obj.platform_description =
Some(PlatformDescriptionDeserializer::deserialize(
"PlatformDescription",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DescriptionDeserializer;
impl DescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 Ec2InstanceIdDeserializer;
impl Ec2InstanceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EndpointURLDeserializer;
impl EndpointURLDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentArnDeserializer;
impl EnvironmentArnDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentDescription {
pub abortable_operation_in_progress: Option<bool>,
pub application_name: Option<String>,
pub cname: Option<String>,
pub date_created: Option<String>,
pub date_updated: Option<String>,
pub description: Option<String>,
pub endpoint_url: Option<String>,
pub environment_arn: Option<String>,
pub environment_id: Option<String>,
pub environment_links: Option<Vec<EnvironmentLink>>,
pub environment_name: Option<String>,
pub health: Option<String>,
pub health_status: Option<String>,
pub platform_arn: Option<String>,
pub resources: Option<EnvironmentResourcesDescription>,
pub solution_stack_name: Option<String>,
pub status: Option<String>,
pub template_name: Option<String>,
pub tier: Option<EnvironmentTier>,
pub version_label: Option<String>,
}
struct EnvironmentDescriptionDeserializer;
impl EnvironmentDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"AbortableOperationInProgress" => {
obj.abortable_operation_in_progress =
Some(AbortableOperationInProgressDeserializer::deserialize(
"AbortableOperationInProgress",
stack,
)?);
}
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"CNAME" => {
obj.cname = Some(DNSCnameDeserializer::deserialize("CNAME", stack)?);
}
"DateCreated" => {
obj.date_created =
Some(CreationDateDeserializer::deserialize("DateCreated", stack)?);
}
"DateUpdated" => {
obj.date_updated =
Some(UpdateDateDeserializer::deserialize("DateUpdated", stack)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"EndpointURL" => {
obj.endpoint_url =
Some(EndpointURLDeserializer::deserialize("EndpointURL", stack)?);
}
"EnvironmentArn" => {
obj.environment_arn = Some(EnvironmentArnDeserializer::deserialize(
"EnvironmentArn",
stack,
)?);
}
"EnvironmentId" => {
obj.environment_id = Some(EnvironmentIdDeserializer::deserialize(
"EnvironmentId",
stack,
)?);
}
"EnvironmentLinks" => {
obj.environment_links = match obj.environment_links {
Some(ref mut existing) => {
existing.extend(EnvironmentLinksDeserializer::deserialize(
"EnvironmentLinks",
stack,
)?);
Some(existing.to_vec())
}
None => Some(EnvironmentLinksDeserializer::deserialize(
"EnvironmentLinks",
stack,
)?),
};
}
"EnvironmentName" => {
obj.environment_name = Some(EnvironmentNameDeserializer::deserialize(
"EnvironmentName",
stack,
)?);
}
"Health" => {
obj.health =
Some(EnvironmentHealthDeserializer::deserialize("Health", stack)?);
}
"HealthStatus" => {
obj.health_status = Some(EnvironmentHealthStatusDeserializer::deserialize(
"HealthStatus",
stack,
)?);
}
"PlatformArn" => {
obj.platform_arn =
Some(PlatformArnDeserializer::deserialize("PlatformArn", stack)?);
}
"Resources" => {
obj.resources =
Some(EnvironmentResourcesDescriptionDeserializer::deserialize(
"Resources",
stack,
)?);
}
"SolutionStackName" => {
obj.solution_stack_name = Some(SolutionStackNameDeserializer::deserialize(
"SolutionStackName",
stack,
)?);
}
"Status" => {
obj.status =
Some(EnvironmentStatusDeserializer::deserialize("Status", stack)?);
}
"TemplateName" => {
obj.template_name =
Some(ConfigurationTemplateNameDeserializer::deserialize(
"TemplateName",
stack,
)?);
}
"Tier" => {
obj.tier = Some(EnvironmentTierDeserializer::deserialize("Tier", stack)?);
}
"VersionLabel" => {
obj.version_label = Some(VersionLabelDeserializer::deserialize(
"VersionLabel",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnvironmentDescriptionsListDeserializer;
impl EnvironmentDescriptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EnvironmentDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(EnvironmentDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnvironmentDescriptionsMessage {
pub environments: Option<Vec<EnvironmentDescription>>,
pub next_token: Option<String>,
}
struct EnvironmentDescriptionsMessageDeserializer;
impl EnvironmentDescriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentDescriptionsMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentDescriptionsMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Environments" => {
obj.environments = match obj.environments {
Some(ref mut existing) => {
existing.extend(
EnvironmentDescriptionsListDeserializer::deserialize(
"Environments",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(EnvironmentDescriptionsListDeserializer::deserialize(
"Environments",
stack,
)?),
};
}
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnvironmentHealthDeserializer;
impl EnvironmentHealthDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentHealthAttributesSerializer;
impl EnvironmentHealthAttributesSerializer {
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 EnvironmentHealthStatusDeserializer;
impl EnvironmentHealthStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentIdDeserializer;
impl EnvironmentIdDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentIdListSerializer;
impl EnvironmentIdListSerializer {
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 EnvironmentInfoDescription {
pub ec_2_instance_id: Option<String>,
pub info_type: Option<String>,
pub message: Option<String>,
pub sample_timestamp: Option<String>,
}
struct EnvironmentInfoDescriptionDeserializer;
impl EnvironmentInfoDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentInfoDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentInfoDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Ec2InstanceId" => {
obj.ec_2_instance_id = Some(Ec2InstanceIdDeserializer::deserialize(
"Ec2InstanceId",
stack,
)?);
}
"InfoType" => {
obj.info_type = Some(EnvironmentInfoTypeDeserializer::deserialize(
"InfoType", stack,
)?);
}
"Message" => {
obj.message = Some(MessageDeserializer::deserialize("Message", stack)?);
}
"SampleTimestamp" => {
obj.sample_timestamp = Some(SampleTimestampDeserializer::deserialize(
"SampleTimestamp",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnvironmentInfoDescriptionListDeserializer;
impl EnvironmentInfoDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EnvironmentInfoDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(EnvironmentInfoDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct EnvironmentInfoTypeDeserializer;
impl EnvironmentInfoTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentLink {
pub environment_name: Option<String>,
pub link_name: Option<String>,
}
struct EnvironmentLinkDeserializer;
impl EnvironmentLinkDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentLink, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentLink::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"EnvironmentName" => {
obj.environment_name =
Some(StringDeserializer::deserialize("EnvironmentName", stack)?);
}
"LinkName" => {
obj.link_name = Some(StringDeserializer::deserialize("LinkName", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnvironmentLinksDeserializer;
impl EnvironmentLinksDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EnvironmentLink>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(EnvironmentLinkDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct EnvironmentNameDeserializer;
impl EnvironmentNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentNamesListSerializer;
impl EnvironmentNamesListSerializer {
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 EnvironmentResourceDescription {
pub auto_scaling_groups: Option<Vec<AutoScalingGroup>>,
pub environment_name: Option<String>,
pub instances: Option<Vec<Instance>>,
pub launch_configurations: Option<Vec<LaunchConfiguration>>,
pub launch_templates: Option<Vec<LaunchTemplate>>,
pub load_balancers: Option<Vec<LoadBalancer>>,
pub queues: Option<Vec<Queue>>,
pub triggers: Option<Vec<Trigger>>,
}
struct EnvironmentResourceDescriptionDeserializer;
impl EnvironmentResourceDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentResourceDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentResourceDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"AutoScalingGroups" => {
obj.auto_scaling_groups = match obj.auto_scaling_groups {
Some(ref mut existing) => {
existing.extend(AutoScalingGroupListDeserializer::deserialize(
"AutoScalingGroups",
stack,
)?);
Some(existing.to_vec())
}
None => Some(AutoScalingGroupListDeserializer::deserialize(
"AutoScalingGroups",
stack,
)?),
};
}
"EnvironmentName" => {
obj.environment_name = Some(EnvironmentNameDeserializer::deserialize(
"EnvironmentName",
stack,
)?);
}
"Instances" => {
obj.instances = match obj.instances {
Some(ref mut existing) => {
existing.extend(InstanceListDeserializer::deserialize(
"Instances",
stack,
)?);
Some(existing.to_vec())
}
None => {
Some(InstanceListDeserializer::deserialize("Instances", stack)?)
}
};
}
"LaunchConfigurations" => {
obj.launch_configurations = match obj.launch_configurations {
Some(ref mut existing) => {
existing.extend(LaunchConfigurationListDeserializer::deserialize(
"LaunchConfigurations",
stack,
)?);
Some(existing.to_vec())
}
None => Some(LaunchConfigurationListDeserializer::deserialize(
"LaunchConfigurations",
stack,
)?),
};
}
"LaunchTemplates" => {
obj.launch_templates = match obj.launch_templates {
Some(ref mut existing) => {
existing.extend(LaunchTemplateListDeserializer::deserialize(
"LaunchTemplates",
stack,
)?);
Some(existing.to_vec())
}
None => Some(LaunchTemplateListDeserializer::deserialize(
"LaunchTemplates",
stack,
)?),
};
}
"LoadBalancers" => {
obj.load_balancers = match obj.load_balancers {
Some(ref mut existing) => {
existing.extend(LoadBalancerListDeserializer::deserialize(
"LoadBalancers",
stack,
)?);
Some(existing.to_vec())
}
None => Some(LoadBalancerListDeserializer::deserialize(
"LoadBalancers",
stack,
)?),
};
}
"Queues" => {
obj.queues = match obj.queues {
Some(ref mut existing) => {
existing
.extend(QueueListDeserializer::deserialize("Queues", stack)?);
Some(existing.to_vec())
}
None => Some(QueueListDeserializer::deserialize("Queues", stack)?),
};
}
"Triggers" => {
obj.triggers = match obj.triggers {
Some(ref mut existing) => {
existing.extend(TriggerListDeserializer::deserialize(
"Triggers", stack,
)?);
Some(existing.to_vec())
}
None => Some(TriggerListDeserializer::deserialize("Triggers", stack)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnvironmentResourceDescriptionsMessage {
pub environment_resources: Option<EnvironmentResourceDescription>,
}
struct EnvironmentResourceDescriptionsMessageDeserializer;
impl EnvironmentResourceDescriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentResourceDescriptionsMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentResourceDescriptionsMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"EnvironmentResources" => {
obj.environment_resources =
Some(EnvironmentResourceDescriptionDeserializer::deserialize(
"EnvironmentResources",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnvironmentResourcesDescription {
pub load_balancer: Option<LoadBalancerDescription>,
}
struct EnvironmentResourcesDescriptionDeserializer;
impl EnvironmentResourcesDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentResourcesDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentResourcesDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"LoadBalancer" => {
obj.load_balancer = Some(LoadBalancerDescriptionDeserializer::deserialize(
"LoadBalancer",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnvironmentStatusDeserializer;
impl EnvironmentStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EnvironmentTier {
pub name: Option<String>,
pub type_: Option<String>,
pub version: Option<String>,
}
struct EnvironmentTierDeserializer;
impl EnvironmentTierDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentTier, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EnvironmentTier::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"Type" => {
obj.type_ = Some(StringDeserializer::deserialize("Type", stack)?);
}
"Version" => {
obj.version = Some(StringDeserializer::deserialize("Version", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnvironmentTierSerializer;
impl EnvironmentTierSerializer {
fn serialize(params: &mut Params, name: &str, obj: &EnvironmentTier) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.name {
params.put(&format!("{}{}", prefix, "Name"), &field_value);
}
if let Some(ref field_value) = obj.type_ {
params.put(&format!("{}{}", prefix, "Type"), &field_value);
}
if let Some(ref field_value) = obj.version {
params.put(&format!("{}{}", prefix, "Version"), &field_value);
}
}
}
struct EventDateDeserializer;
impl EventDateDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EventDescription {
pub application_name: Option<String>,
pub environment_name: Option<String>,
pub event_date: Option<String>,
pub message: Option<String>,
pub platform_arn: Option<String>,
pub request_id: Option<String>,
pub severity: Option<String>,
pub template_name: Option<String>,
pub version_label: Option<String>,
}
struct EventDescriptionDeserializer;
impl EventDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EventDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"EnvironmentName" => {
obj.environment_name = Some(EnvironmentNameDeserializer::deserialize(
"EnvironmentName",
stack,
)?);
}
"EventDate" => {
obj.event_date =
Some(EventDateDeserializer::deserialize("EventDate", stack)?);
}
"Message" => {
obj.message =
Some(EventMessageDeserializer::deserialize("Message", stack)?);
}
"PlatformArn" => {
obj.platform_arn =
Some(PlatformArnDeserializer::deserialize("PlatformArn", stack)?);
}
"RequestId" => {
obj.request_id =
Some(RequestIdDeserializer::deserialize("RequestId", stack)?);
}
"Severity" => {
obj.severity =
Some(EventSeverityDeserializer::deserialize("Severity", stack)?);
}
"TemplateName" => {
obj.template_name =
Some(ConfigurationTemplateNameDeserializer::deserialize(
"TemplateName",
stack,
)?);
}
"VersionLabel" => {
obj.version_label = Some(VersionLabelDeserializer::deserialize(
"VersionLabel",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EventDescriptionListDeserializer;
impl EventDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventDescription>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(EventDescriptionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventDescriptionsMessage {
pub events: Option<Vec<EventDescription>>,
pub next_token: Option<String>,
}
struct EventDescriptionsMessageDeserializer;
impl EventDescriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventDescriptionsMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = EventDescriptionsMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Events" => {
obj.events = match obj.events {
Some(ref mut existing) => {
existing.extend(EventDescriptionListDeserializer::deserialize(
"Events", stack,
)?);
Some(existing.to_vec())
}
None => Some(EventDescriptionListDeserializer::deserialize(
"Events", stack,
)?),
};
}
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EventMessageDeserializer;
impl EventMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 EventSeverityDeserializer;
impl EventSeverityDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 FailureTypeDeserializer;
impl FailureTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 FileTypeExtensionDeserializer;
impl FileTypeExtensionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ImageIdDeserializer;
impl ImageIdDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 Instance {
pub id: Option<String>,
}
struct InstanceDeserializer;
impl InstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Instance, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Instance::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Id" => {
obj.id = Some(ResourceIdDeserializer::deserialize("Id", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct InstanceHealthListDeserializer;
impl InstanceHealthListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SingleInstanceHealth>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(SingleInstanceHealthDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct InstanceHealthSummary {
pub degraded: Option<i64>,
pub info: Option<i64>,
pub no_data: Option<i64>,
pub ok: Option<i64>,
pub pending: Option<i64>,
pub severe: Option<i64>,
pub unknown: Option<i64>,
pub warning: Option<i64>,
}
struct InstanceHealthSummaryDeserializer;
impl InstanceHealthSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<InstanceHealthSummary, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = InstanceHealthSummary::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Degraded" => {
obj.degraded =
Some(NullableIntegerDeserializer::deserialize("Degraded", stack)?);
}
"Info" => {
obj.info = Some(NullableIntegerDeserializer::deserialize("Info", stack)?);
}
"NoData" => {
obj.no_data =
Some(NullableIntegerDeserializer::deserialize("NoData", stack)?);
}
"Ok" => {
obj.ok = Some(NullableIntegerDeserializer::deserialize("Ok", stack)?);
}
"Pending" => {
obj.pending =
Some(NullableIntegerDeserializer::deserialize("Pending", stack)?);
}
"Severe" => {
obj.severe =
Some(NullableIntegerDeserializer::deserialize("Severe", stack)?);
}
"Unknown" => {
obj.unknown =
Some(NullableIntegerDeserializer::deserialize("Unknown", stack)?);
}
"Warning" => {
obj.warning =
Some(NullableIntegerDeserializer::deserialize("Warning", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct InstanceIdDeserializer;
impl InstanceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 InstanceListDeserializer;
impl InstanceListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Instance>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(InstanceDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct InstancesHealthAttributesSerializer;
impl InstancesHealthAttributesSerializer {
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 IntegerDeserializer;
impl IntegerDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 Latency {
pub p10: Option<f64>,
pub p50: Option<f64>,
pub p75: Option<f64>,
pub p85: Option<f64>,
pub p90: Option<f64>,
pub p95: Option<f64>,
pub p99: Option<f64>,
pub p999: Option<f64>,
}
struct LatencyDeserializer;
impl LatencyDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Latency, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Latency::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"P10" => {
obj.p10 = Some(NullableDoubleDeserializer::deserialize("P10", stack)?);
}
"P50" => {
obj.p50 = Some(NullableDoubleDeserializer::deserialize("P50", stack)?);
}
"P75" => {
obj.p75 = Some(NullableDoubleDeserializer::deserialize("P75", stack)?);
}
"P85" => {
obj.p85 = Some(NullableDoubleDeserializer::deserialize("P85", stack)?);
}
"P90" => {
obj.p90 = Some(NullableDoubleDeserializer::deserialize("P90", stack)?);
}
"P95" => {
obj.p95 = Some(NullableDoubleDeserializer::deserialize("P95", stack)?);
}
"P99" => {
obj.p99 = Some(NullableDoubleDeserializer::deserialize("P99", stack)?);
}
"P999" => {
obj.p999 = Some(NullableDoubleDeserializer::deserialize("P999", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LaunchConfiguration {
pub name: Option<String>,
}
struct LaunchConfigurationDeserializer;
impl LaunchConfigurationDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LaunchConfiguration, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = LaunchConfiguration::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct LaunchConfigurationListDeserializer;
impl LaunchConfigurationListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LaunchConfiguration>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(LaunchConfigurationDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LaunchTemplate {
pub id: Option<String>,
}
struct LaunchTemplateDeserializer;
impl LaunchTemplateDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LaunchTemplate, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = LaunchTemplate::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Id" => {
obj.id = Some(ResourceIdDeserializer::deserialize("Id", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct LaunchTemplateListDeserializer;
impl LaunchTemplateListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LaunchTemplate>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(LaunchTemplateDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct LaunchedAtDeserializer;
impl LaunchedAtDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ListAvailableSolutionStacksResultMessage {
pub solution_stack_details: Option<Vec<SolutionStackDescription>>,
pub solution_stacks: Option<Vec<String>>,
}
struct ListAvailableSolutionStacksResultMessageDeserializer;
impl ListAvailableSolutionStacksResultMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListAvailableSolutionStacksResultMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ListAvailableSolutionStacksResultMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"SolutionStackDetails" => {
obj.solution_stack_details = match obj.solution_stack_details {
Some(ref mut existing) => {
existing.extend(
AvailableSolutionStackDetailsListDeserializer::deserialize(
"SolutionStackDetails",
stack,
)?,
);
Some(existing.to_vec())
}
None => {
Some(AvailableSolutionStackDetailsListDeserializer::deserialize(
"SolutionStackDetails",
stack,
)?)
}
};
}
"SolutionStacks" => {
obj.solution_stacks = match obj.solution_stacks {
Some(ref mut existing) => {
existing.extend(
AvailableSolutionStackNamesListDeserializer::deserialize(
"SolutionStacks",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(AvailableSolutionStackNamesListDeserializer::deserialize(
"SolutionStacks",
stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPlatformVersionsRequest {
pub filters: Option<Vec<PlatformFilter>>,
pub max_records: Option<i64>,
pub next_token: Option<String>,
}
struct ListPlatformVersionsRequestSerializer;
impl ListPlatformVersionsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListPlatformVersionsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.filters {
PlatformFiltersSerializer::serialize(
params,
&format!("{}{}", prefix, "Filters"),
field_value,
);
}
if let Some(ref field_value) = obj.max_records {
params.put(
&format!("{}{}", prefix, "MaxRecords"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListPlatformVersionsResult {
pub next_token: Option<String>,
pub platform_summary_list: Option<Vec<PlatformSummary>>,
}
struct ListPlatformVersionsResultDeserializer;
impl ListPlatformVersionsResultDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListPlatformVersionsResult, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ListPlatformVersionsResult::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
"PlatformSummaryList" => {
obj.platform_summary_list = match obj.platform_summary_list {
Some(ref mut existing) => {
existing.extend(PlatformSummaryListDeserializer::deserialize(
"PlatformSummaryList",
stack,
)?);
Some(existing.to_vec())
}
None => Some(PlatformSummaryListDeserializer::deserialize(
"PlatformSummaryList",
stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTagsForResourceMessage {
pub resource_arn: String,
}
struct ListTagsForResourceMessageSerializer;
impl ListTagsForResourceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListTagsForResourceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ResourceArn"), &obj.resource_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Listener {
pub port: Option<i64>,
pub protocol: Option<String>,
}
struct ListenerDeserializer;
impl ListenerDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Listener, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Listener::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
"Protocol" => {
obj.protocol = Some(StringDeserializer::deserialize("Protocol", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct LoadAverageDeserializer;
impl LoadAverageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<f64>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(LoadAverageValueDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct LoadAverageValueDeserializer;
impl LoadAverageValueDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoadBalancer {
pub name: Option<String>,
}
struct LoadBalancerDeserializer;
impl LoadBalancerDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancer, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = LoadBalancer::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoadBalancerDescription {
pub domain: Option<String>,
pub listeners: Option<Vec<Listener>>,
pub load_balancer_name: Option<String>,
}
struct LoadBalancerDescriptionDeserializer;
impl LoadBalancerDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancerDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = LoadBalancerDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Domain" => {
obj.domain = Some(StringDeserializer::deserialize("Domain", stack)?);
}
"Listeners" => {
obj.listeners = match obj.listeners {
Some(ref mut existing) => {
existing.extend(
LoadBalancerListenersDescriptionDeserializer::deserialize(
"Listeners",
stack,
)?,
);
Some(existing.to_vec())
}
None => {
Some(LoadBalancerListenersDescriptionDeserializer::deserialize(
"Listeners",
stack,
)?)
}
};
}
"LoadBalancerName" => {
obj.load_balancer_name =
Some(StringDeserializer::deserialize("LoadBalancerName", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct LoadBalancerListDeserializer;
impl LoadBalancerListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LoadBalancer>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(LoadBalancerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct LoadBalancerListenersDescriptionDeserializer;
impl LoadBalancerListenersDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Listener>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ListenerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct MaintainerDeserializer;
impl MaintainerDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ManagedAction {
pub action_description: Option<String>,
pub action_id: Option<String>,
pub action_type: Option<String>,
pub status: Option<String>,
pub window_start_time: Option<String>,
}
struct ManagedActionDeserializer;
impl ManagedActionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ManagedAction, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ManagedAction::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ActionDescription" => {
obj.action_description =
Some(StringDeserializer::deserialize("ActionDescription", stack)?);
}
"ActionId" => {
obj.action_id = Some(StringDeserializer::deserialize("ActionId", stack)?);
}
"ActionType" => {
obj.action_type =
Some(ActionTypeDeserializer::deserialize("ActionType", stack)?);
}
"Status" => {
obj.status = Some(ActionStatusDeserializer::deserialize("Status", stack)?);
}
"WindowStartTime" => {
obj.window_start_time = Some(TimestampDeserializer::deserialize(
"WindowStartTime",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ManagedActionHistoryItem {
pub action_description: Option<String>,
pub action_id: Option<String>,
pub action_type: Option<String>,
pub executed_time: Option<String>,
pub failure_description: Option<String>,
pub failure_type: Option<String>,
pub finished_time: Option<String>,
pub status: Option<String>,
}
struct ManagedActionHistoryItemDeserializer;
impl ManagedActionHistoryItemDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ManagedActionHistoryItem, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ManagedActionHistoryItem::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ActionDescription" => {
obj.action_description =
Some(StringDeserializer::deserialize("ActionDescription", stack)?);
}
"ActionId" => {
obj.action_id = Some(StringDeserializer::deserialize("ActionId", stack)?);
}
"ActionType" => {
obj.action_type =
Some(ActionTypeDeserializer::deserialize("ActionType", stack)?);
}
"ExecutedTime" => {
obj.executed_time =
Some(TimestampDeserializer::deserialize("ExecutedTime", stack)?);
}
"FailureDescription" => {
obj.failure_description = Some(StringDeserializer::deserialize(
"FailureDescription",
stack,
)?);
}
"FailureType" => {
obj.failure_type =
Some(FailureTypeDeserializer::deserialize("FailureType", stack)?);
}
"FinishedTime" => {
obj.finished_time =
Some(TimestampDeserializer::deserialize("FinishedTime", stack)?);
}
"Status" => {
obj.status = Some(ActionHistoryStatusDeserializer::deserialize(
"Status", stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ManagedActionHistoryItemsDeserializer;
impl ManagedActionHistoryItemsDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ManagedActionHistoryItem>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ManagedActionHistoryItemDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct ManagedActionsDeserializer;
impl ManagedActionsDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ManagedAction>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ManagedActionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct MaxAgeRule {
pub delete_source_from_s3: Option<bool>,
pub enabled: bool,
pub max_age_in_days: Option<i64>,
}
struct MaxAgeRuleDeserializer;
impl MaxAgeRuleDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<MaxAgeRule, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = MaxAgeRule::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"DeleteSourceFromS3" => {
obj.delete_source_from_s3 = Some(BoxedBooleanDeserializer::deserialize(
"DeleteSourceFromS3",
stack,
)?);
}
"Enabled" => {
obj.enabled = BoxedBooleanDeserializer::deserialize("Enabled", stack)?;
}
"MaxAgeInDays" => {
obj.max_age_in_days =
Some(BoxedIntDeserializer::deserialize("MaxAgeInDays", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct MaxAgeRuleSerializer;
impl MaxAgeRuleSerializer {
fn serialize(params: &mut Params, name: &str, obj: &MaxAgeRule) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.delete_source_from_s3 {
params.put(
&format!("{}{}", prefix, "DeleteSourceFromS3"),
&field_value.to_string(),
);
}
params.put(
&format!("{}{}", prefix, "Enabled"),
&obj.enabled.to_string(),
);
if let Some(ref field_value) = obj.max_age_in_days {
params.put(
&format!("{}{}", prefix, "MaxAgeInDays"),
&field_value.to_string(),
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct MaxCountRule {
pub delete_source_from_s3: Option<bool>,
pub enabled: bool,
pub max_count: Option<i64>,
}
struct MaxCountRuleDeserializer;
impl MaxCountRuleDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<MaxCountRule, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = MaxCountRule::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"DeleteSourceFromS3" => {
obj.delete_source_from_s3 = Some(BoxedBooleanDeserializer::deserialize(
"DeleteSourceFromS3",
stack,
)?);
}
"Enabled" => {
obj.enabled = BoxedBooleanDeserializer::deserialize("Enabled", stack)?;
}
"MaxCount" => {
obj.max_count = Some(BoxedIntDeserializer::deserialize("MaxCount", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct MaxCountRuleSerializer;
impl MaxCountRuleSerializer {
fn serialize(params: &mut Params, name: &str, obj: &MaxCountRule) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.delete_source_from_s3 {
params.put(
&format!("{}{}", prefix, "DeleteSourceFromS3"),
&field_value.to_string(),
);
}
params.put(
&format!("{}{}", prefix, "Enabled"),
&obj.enabled.to_string(),
);
if let Some(ref field_value) = obj.max_count {
params.put(
&format!("{}{}", prefix, "MaxCount"),
&field_value.to_string(),
);
}
}
}
struct MessageDeserializer;
impl MessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 NextTokenDeserializer;
impl NextTokenDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 NullableDoubleDeserializer;
impl NullableDoubleDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NullableIntegerDeserializer;
impl NullableIntegerDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 NullableLongDeserializer;
impl NullableLongDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 OperatingSystemNameDeserializer;
impl OperatingSystemNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 OperatingSystemVersionDeserializer;
impl OperatingSystemVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 OptionNamespaceDeserializer;
impl OptionNamespaceDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 OptionRestrictionMaxLengthDeserializer;
impl OptionRestrictionMaxLengthDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 OptionRestrictionMaxValueDeserializer;
impl OptionRestrictionMaxValueDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 OptionRestrictionMinValueDeserializer;
impl OptionRestrictionMinValueDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 OptionRestrictionRegex {
pub label: Option<String>,
pub pattern: Option<String>,
}
struct OptionRestrictionRegexDeserializer;
impl OptionRestrictionRegexDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionRestrictionRegex, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = OptionRestrictionRegex::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Label" => {
obj.label = Some(RegexLabelDeserializer::deserialize("Label", stack)?);
}
"Pattern" => {
obj.pattern =
Some(RegexPatternDeserializer::deserialize("Pattern", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionSpecification {
pub namespace: Option<String>,
pub option_name: Option<String>,
pub resource_name: Option<String>,
}
struct OptionSpecificationSerializer;
impl OptionSpecificationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &OptionSpecification) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.namespace {
params.put(&format!("{}{}", prefix, "Namespace"), &field_value);
}
if let Some(ref field_value) = obj.option_name {
params.put(&format!("{}{}", prefix, "OptionName"), &field_value);
}
if let Some(ref field_value) = obj.resource_name {
params.put(&format!("{}{}", prefix, "ResourceName"), &field_value);
}
}
}
struct OptionsSpecifierListSerializer;
impl OptionsSpecifierListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<OptionSpecification>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
OptionSpecificationSerializer::serialize(params, &key, obj);
}
}
}
struct PlatformArnDeserializer;
impl PlatformArnDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 PlatformCategoryDeserializer;
impl PlatformCategoryDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 PlatformDescription {
pub custom_ami_list: Option<Vec<CustomAmi>>,
pub date_created: Option<String>,
pub date_updated: Option<String>,
pub description: Option<String>,
pub frameworks: Option<Vec<PlatformFramework>>,
pub maintainer: Option<String>,
pub operating_system_name: Option<String>,
pub operating_system_version: Option<String>,
pub platform_arn: Option<String>,
pub platform_category: Option<String>,
pub platform_name: Option<String>,
pub platform_owner: Option<String>,
pub platform_status: Option<String>,
pub platform_version: Option<String>,
pub programming_languages: Option<Vec<PlatformProgrammingLanguage>>,
pub solution_stack_name: Option<String>,
pub supported_addon_list: Option<Vec<String>>,
pub supported_tier_list: Option<Vec<String>>,
}
struct PlatformDescriptionDeserializer;
impl PlatformDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = PlatformDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"CustomAmiList" => {
obj.custom_ami_list = match obj.custom_ami_list {
Some(ref mut existing) => {
existing.extend(CustomAmiListDeserializer::deserialize(
"CustomAmiList",
stack,
)?);
Some(existing.to_vec())
}
None => Some(CustomAmiListDeserializer::deserialize(
"CustomAmiList",
stack,
)?),
};
}
"DateCreated" => {
obj.date_created =
Some(CreationDateDeserializer::deserialize("DateCreated", stack)?);
}
"DateUpdated" => {
obj.date_updated =
Some(UpdateDateDeserializer::deserialize("DateUpdated", stack)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"Frameworks" => {
obj.frameworks = match obj.frameworks {
Some(ref mut existing) => {
existing.extend(PlatformFrameworksDeserializer::deserialize(
"Frameworks",
stack,
)?);
Some(existing.to_vec())
}
None => Some(PlatformFrameworksDeserializer::deserialize(
"Frameworks",
stack,
)?),
};
}
"Maintainer" => {
obj.maintainer =
Some(MaintainerDeserializer::deserialize("Maintainer", stack)?);
}
"OperatingSystemName" => {
obj.operating_system_name =
Some(OperatingSystemNameDeserializer::deserialize(
"OperatingSystemName",
stack,
)?);
}
"OperatingSystemVersion" => {
obj.operating_system_version =
Some(OperatingSystemVersionDeserializer::deserialize(
"OperatingSystemVersion",
stack,
)?);
}
"PlatformArn" => {
obj.platform_arn =
Some(PlatformArnDeserializer::deserialize("PlatformArn", stack)?);
}
"PlatformCategory" => {
obj.platform_category = Some(PlatformCategoryDeserializer::deserialize(
"PlatformCategory",
stack,
)?);
}
"PlatformName" => {
obj.platform_name = Some(PlatformNameDeserializer::deserialize(
"PlatformName",
stack,
)?);
}
"PlatformOwner" => {
obj.platform_owner = Some(PlatformOwnerDeserializer::deserialize(
"PlatformOwner",
stack,
)?);
}
"PlatformStatus" => {
obj.platform_status = Some(PlatformStatusDeserializer::deserialize(
"PlatformStatus",
stack,
)?);
}
"PlatformVersion" => {
obj.platform_version = Some(PlatformVersionDeserializer::deserialize(
"PlatformVersion",
stack,
)?);
}
"ProgrammingLanguages" => {
obj.programming_languages = match obj.programming_languages {
Some(ref mut existing) => {
existing.extend(
PlatformProgrammingLanguagesDeserializer::deserialize(
"ProgrammingLanguages",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(PlatformProgrammingLanguagesDeserializer::deserialize(
"ProgrammingLanguages",
stack,
)?),
};
}
"SolutionStackName" => {
obj.solution_stack_name = Some(SolutionStackNameDeserializer::deserialize(
"SolutionStackName",
stack,
)?);
}
"SupportedAddonList" => {
obj.supported_addon_list = match obj.supported_addon_list {
Some(ref mut existing) => {
existing.extend(SupportedAddonListDeserializer::deserialize(
"SupportedAddonList",
stack,
)?);
Some(existing.to_vec())
}
None => Some(SupportedAddonListDeserializer::deserialize(
"SupportedAddonList",
stack,
)?),
};
}
"SupportedTierList" => {
obj.supported_tier_list = match obj.supported_tier_list {
Some(ref mut existing) => {
existing.extend(SupportedTierListDeserializer::deserialize(
"SupportedTierList",
stack,
)?);
Some(existing.to_vec())
}
None => Some(SupportedTierListDeserializer::deserialize(
"SupportedTierList",
stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PlatformFilter {
pub operator: Option<String>,
pub type_: Option<String>,
pub values: Option<Vec<String>>,
}
struct PlatformFilterSerializer;
impl PlatformFilterSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PlatformFilter) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.operator {
params.put(&format!("{}{}", prefix, "Operator"), &field_value);
}
if let Some(ref field_value) = obj.type_ {
params.put(&format!("{}{}", prefix, "Type"), &field_value);
}
if let Some(ref field_value) = obj.values {
PlatformFilterValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "Values"),
field_value,
);
}
}
}
struct PlatformFilterValueListSerializer;
impl PlatformFilterValueListSerializer {
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 PlatformFiltersSerializer;
impl PlatformFiltersSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<PlatformFilter>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
PlatformFilterSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PlatformFramework {
pub name: Option<String>,
pub version: Option<String>,
}
struct PlatformFrameworkDeserializer;
impl PlatformFrameworkDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformFramework, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = PlatformFramework::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"Version" => {
obj.version = Some(StringDeserializer::deserialize("Version", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PlatformFrameworksDeserializer;
impl PlatformFrameworksDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PlatformFramework>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(PlatformFrameworkDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct PlatformNameDeserializer;
impl PlatformNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 PlatformOwnerDeserializer;
impl PlatformOwnerDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 PlatformProgrammingLanguage {
pub name: Option<String>,
pub version: Option<String>,
}
struct PlatformProgrammingLanguageDeserializer;
impl PlatformProgrammingLanguageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformProgrammingLanguage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = PlatformProgrammingLanguage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"Version" => {
obj.version = Some(StringDeserializer::deserialize("Version", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PlatformProgrammingLanguagesDeserializer;
impl PlatformProgrammingLanguagesDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PlatformProgrammingLanguage>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(PlatformProgrammingLanguageDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct PlatformStatusDeserializer;
impl PlatformStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 PlatformSummary {
pub operating_system_name: Option<String>,
pub operating_system_version: Option<String>,
pub platform_arn: Option<String>,
pub platform_category: Option<String>,
pub platform_owner: Option<String>,
pub platform_status: Option<String>,
pub supported_addon_list: Option<Vec<String>>,
pub supported_tier_list: Option<Vec<String>>,
}
struct PlatformSummaryDeserializer;
impl PlatformSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformSummary, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = PlatformSummary::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"OperatingSystemName" => {
obj.operating_system_name =
Some(OperatingSystemNameDeserializer::deserialize(
"OperatingSystemName",
stack,
)?);
}
"OperatingSystemVersion" => {
obj.operating_system_version =
Some(OperatingSystemVersionDeserializer::deserialize(
"OperatingSystemVersion",
stack,
)?);
}
"PlatformArn" => {
obj.platform_arn =
Some(PlatformArnDeserializer::deserialize("PlatformArn", stack)?);
}
"PlatformCategory" => {
obj.platform_category = Some(PlatformCategoryDeserializer::deserialize(
"PlatformCategory",
stack,
)?);
}
"PlatformOwner" => {
obj.platform_owner = Some(PlatformOwnerDeserializer::deserialize(
"PlatformOwner",
stack,
)?);
}
"PlatformStatus" => {
obj.platform_status = Some(PlatformStatusDeserializer::deserialize(
"PlatformStatus",
stack,
)?);
}
"SupportedAddonList" => {
obj.supported_addon_list = match obj.supported_addon_list {
Some(ref mut existing) => {
existing.extend(SupportedAddonListDeserializer::deserialize(
"SupportedAddonList",
stack,
)?);
Some(existing.to_vec())
}
None => Some(SupportedAddonListDeserializer::deserialize(
"SupportedAddonList",
stack,
)?),
};
}
"SupportedTierList" => {
obj.supported_tier_list = match obj.supported_tier_list {
Some(ref mut existing) => {
existing.extend(SupportedTierListDeserializer::deserialize(
"SupportedTierList",
stack,
)?);
Some(existing.to_vec())
}
None => Some(SupportedTierListDeserializer::deserialize(
"SupportedTierList",
stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PlatformSummaryListDeserializer;
impl PlatformSummaryListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PlatformSummary>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(PlatformSummaryDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct PlatformVersionDeserializer;
impl PlatformVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 Queue {
pub name: Option<String>,
pub url: Option<String>,
}
struct QueueDeserializer;
impl QueueDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Queue, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Queue::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"URL" => {
obj.url = Some(StringDeserializer::deserialize("URL", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct QueueListDeserializer;
impl QueueListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Queue>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(QueueDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RebuildEnvironmentMessage {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
}
struct RebuildEnvironmentMessageSerializer;
impl RebuildEnvironmentMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RebuildEnvironmentMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
}
}
struct RefreshedAtDeserializer;
impl RefreshedAtDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 RegexLabelDeserializer;
impl RegexLabelDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 RegexPatternDeserializer;
impl RegexPatternDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 RequestCountDeserializer;
impl RequestCountDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 RequestEnvironmentInfoMessage {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub info_type: String,
}
struct RequestEnvironmentInfoMessageSerializer;
impl RequestEnvironmentInfoMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RequestEnvironmentInfoMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
params.put(&format!("{}{}", prefix, "InfoType"), &obj.info_type);
}
}
struct RequestIdDeserializer;
impl RequestIdDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ResourceArnDeserializer;
impl ResourceArnDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ResourceIdDeserializer;
impl ResourceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ResourceNameDeserializer;
impl ResourceNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ResourceQuota {
pub maximum: Option<i64>,
}
struct ResourceQuotaDeserializer;
impl ResourceQuotaDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceQuota, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ResourceQuota::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Maximum" => {
obj.maximum = Some(BoxedIntDeserializer::deserialize("Maximum", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceQuotas {
pub application_quota: Option<ResourceQuota>,
pub application_version_quota: Option<ResourceQuota>,
pub configuration_template_quota: Option<ResourceQuota>,
pub custom_platform_quota: Option<ResourceQuota>,
pub environment_quota: Option<ResourceQuota>,
}
struct ResourceQuotasDeserializer;
impl ResourceQuotasDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceQuotas, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ResourceQuotas::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationQuota" => {
obj.application_quota = Some(ResourceQuotaDeserializer::deserialize(
"ApplicationQuota",
stack,
)?);
}
"ApplicationVersionQuota" => {
obj.application_version_quota =
Some(ResourceQuotaDeserializer::deserialize(
"ApplicationVersionQuota",
stack,
)?);
}
"ConfigurationTemplateQuota" => {
obj.configuration_template_quota =
Some(ResourceQuotaDeserializer::deserialize(
"ConfigurationTemplateQuota",
stack,
)?);
}
"CustomPlatformQuota" => {
obj.custom_platform_quota = Some(ResourceQuotaDeserializer::deserialize(
"CustomPlatformQuota",
stack,
)?);
}
"EnvironmentQuota" => {
obj.environment_quota = Some(ResourceQuotaDeserializer::deserialize(
"EnvironmentQuota",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceTagsDescriptionMessage {
pub resource_arn: Option<String>,
pub resource_tags: Option<Vec<Tag>>,
}
struct ResourceTagsDescriptionMessageDeserializer;
impl ResourceTagsDescriptionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceTagsDescriptionMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ResourceTagsDescriptionMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ResourceArn" => {
obj.resource_arn =
Some(ResourceArnDeserializer::deserialize("ResourceArn", stack)?);
}
"ResourceTags" => {
obj.resource_tags = match obj.resource_tags {
Some(ref mut existing) => {
existing.extend(TagListDeserializer::deserialize(
"ResourceTags",
stack,
)?);
Some(existing.to_vec())
}
None => Some(TagListDeserializer::deserialize("ResourceTags", stack)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestartAppServerMessage {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
}
struct RestartAppServerMessageSerializer;
impl RestartAppServerMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestartAppServerMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RetrieveEnvironmentInfoMessage {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub info_type: String,
}
struct RetrieveEnvironmentInfoMessageSerializer;
impl RetrieveEnvironmentInfoMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RetrieveEnvironmentInfoMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
params.put(&format!("{}{}", prefix, "InfoType"), &obj.info_type);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RetrieveEnvironmentInfoResultMessage {
pub environment_info: Option<Vec<EnvironmentInfoDescription>>,
}
struct RetrieveEnvironmentInfoResultMessageDeserializer;
impl RetrieveEnvironmentInfoResultMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RetrieveEnvironmentInfoResultMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = RetrieveEnvironmentInfoResultMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"EnvironmentInfo" => {
obj.environment_info = match obj.environment_info {
Some(ref mut existing) => {
existing.extend(
EnvironmentInfoDescriptionListDeserializer::deserialize(
"EnvironmentInfo",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(EnvironmentInfoDescriptionListDeserializer::deserialize(
"EnvironmentInfo",
stack,
)?),
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct S3BucketDeserializer;
impl S3BucketDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 S3KeyDeserializer;
impl S3KeyDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 S3Location {
pub s3_bucket: Option<String>,
pub s3_key: Option<String>,
}
struct S3LocationDeserializer;
impl S3LocationDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<S3Location, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = S3Location::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"S3Bucket" => {
obj.s3_bucket = Some(S3BucketDeserializer::deserialize("S3Bucket", stack)?);
}
"S3Key" => {
obj.s3_key = Some(S3KeyDeserializer::deserialize("S3Key", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct S3LocationSerializer;
impl S3LocationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &S3Location) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.s3_bucket {
params.put(&format!("{}{}", prefix, "S3Bucket"), &field_value);
}
if let Some(ref field_value) = obj.s3_key {
params.put(&format!("{}{}", prefix, "S3Key"), &field_value);
}
}
}
struct SampleTimestampDeserializer;
impl SampleTimestampDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 SingleInstanceHealth {
pub application_metrics: Option<ApplicationMetrics>,
pub availability_zone: Option<String>,
pub causes: Option<Vec<String>>,
pub color: Option<String>,
pub deployment: Option<Deployment>,
pub health_status: Option<String>,
pub instance_id: Option<String>,
pub instance_type: Option<String>,
pub launched_at: Option<String>,
pub system: Option<SystemStatus>,
}
struct SingleInstanceHealthDeserializer;
impl SingleInstanceHealthDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SingleInstanceHealth, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = SingleInstanceHealth::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"ApplicationMetrics" => {
obj.application_metrics =
Some(ApplicationMetricsDeserializer::deserialize(
"ApplicationMetrics",
stack,
)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"Causes" => {
obj.causes = match obj.causes {
Some(ref mut existing) => {
existing.extend(CausesDeserializer::deserialize("Causes", stack)?);
Some(existing.to_vec())
}
None => Some(CausesDeserializer::deserialize("Causes", stack)?),
};
}
"Color" => {
obj.color = Some(StringDeserializer::deserialize("Color", stack)?);
}
"Deployment" => {
obj.deployment =
Some(DeploymentDeserializer::deserialize("Deployment", stack)?);
}
"HealthStatus" => {
obj.health_status =
Some(StringDeserializer::deserialize("HealthStatus", stack)?);
}
"InstanceId" => {
obj.instance_id =
Some(InstanceIdDeserializer::deserialize("InstanceId", stack)?);
}
"InstanceType" => {
obj.instance_type =
Some(StringDeserializer::deserialize("InstanceType", stack)?);
}
"LaunchedAt" => {
obj.launched_at =
Some(LaunchedAtDeserializer::deserialize("LaunchedAt", stack)?);
}
"System" => {
obj.system = Some(SystemStatusDeserializer::deserialize("System", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SolutionStackDescription {
pub permitted_file_types: Option<Vec<String>>,
pub solution_stack_name: Option<String>,
}
struct SolutionStackDescriptionDeserializer;
impl SolutionStackDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SolutionStackDescription, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = SolutionStackDescription::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"PermittedFileTypes" => {
obj.permitted_file_types = match obj.permitted_file_types {
Some(ref mut existing) => {
existing.extend(
SolutionStackFileTypeListDeserializer::deserialize(
"PermittedFileTypes",
stack,
)?,
);
Some(existing.to_vec())
}
None => Some(SolutionStackFileTypeListDeserializer::deserialize(
"PermittedFileTypes",
stack,
)?),
};
}
"SolutionStackName" => {
obj.solution_stack_name = Some(SolutionStackNameDeserializer::deserialize(
"SolutionStackName",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SolutionStackFileTypeListDeserializer;
impl SolutionStackFileTypeListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(FileTypeExtensionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct SolutionStackNameDeserializer;
impl SolutionStackNameDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 SourceBuildInformation {
pub source_location: String,
pub source_repository: String,
pub source_type: String,
}
struct SourceBuildInformationDeserializer;
impl SourceBuildInformationDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SourceBuildInformation, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = SourceBuildInformation::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"SourceLocation" => {
obj.source_location =
SourceLocationDeserializer::deserialize("SourceLocation", stack)?;
}
"SourceRepository" => {
obj.source_repository =
SourceRepositoryDeserializer::deserialize("SourceRepository", stack)?;
}
"SourceType" => {
obj.source_type = SourceTypeDeserializer::deserialize("SourceType", stack)?;
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SourceBuildInformationSerializer;
impl SourceBuildInformationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SourceBuildInformation) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceLocation"),
&obj.source_location,
);
params.put(
&format!("{}{}", prefix, "SourceRepository"),
&obj.source_repository,
);
params.put(&format!("{}{}", prefix, "SourceType"), &obj.source_type);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SourceConfiguration {
pub application_name: Option<String>,
pub template_name: Option<String>,
}
struct SourceConfigurationSerializer;
impl SourceConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SourceConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_name {
params.put(&format!("{}{}", prefix, "ApplicationName"), &field_value);
}
if let Some(ref field_value) = obj.template_name {
params.put(&format!("{}{}", prefix, "TemplateName"), &field_value);
}
}
}
struct SourceLocationDeserializer;
impl SourceLocationDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 SourceRepositoryDeserializer;
impl SourceRepositoryDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 SourceTypeDeserializer;
impl SourceTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 StatusCodes {
pub status_2xx: Option<i64>,
pub status_3xx: Option<i64>,
pub status_4xx: Option<i64>,
pub status_5xx: Option<i64>,
}
struct StatusCodesDeserializer;
impl StatusCodesDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StatusCodes, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = StatusCodes::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Status2xx" => {
obj.status_2xx = Some(NullableIntegerDeserializer::deserialize(
"Status2xx",
stack,
)?);
}
"Status3xx" => {
obj.status_3xx = Some(NullableIntegerDeserializer::deserialize(
"Status3xx",
stack,
)?);
}
"Status4xx" => {
obj.status_4xx = Some(NullableIntegerDeserializer::deserialize(
"Status4xx",
stack,
)?);
}
"Status5xx" => {
obj.status_5xx = Some(NullableIntegerDeserializer::deserialize(
"Status5xx",
stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct StringDeserializer;
impl StringDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 SupportedAddonDeserializer;
impl SupportedAddonDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 SupportedAddonListDeserializer;
impl SupportedAddonListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(SupportedAddonDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct SupportedTierDeserializer;
impl SupportedTierDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 SupportedTierListDeserializer;
impl SupportedTierListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(SupportedTierDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SwapEnvironmentCNAMEsMessage {
pub destination_environment_id: Option<String>,
pub destination_environment_name: Option<String>,
pub source_environment_id: Option<String>,
pub source_environment_name: Option<String>,
}
struct SwapEnvironmentCNAMEsMessageSerializer;
impl SwapEnvironmentCNAMEsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SwapEnvironmentCNAMEsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.destination_environment_id {
params.put(
&format!("{}{}", prefix, "DestinationEnvironmentId"),
&field_value,
);
}
if let Some(ref field_value) = obj.destination_environment_name {
params.put(
&format!("{}{}", prefix, "DestinationEnvironmentName"),
&field_value,
);
}
if let Some(ref field_value) = obj.source_environment_id {
params.put(
&format!("{}{}", prefix, "SourceEnvironmentId"),
&field_value,
);
}
if let Some(ref field_value) = obj.source_environment_name {
params.put(
&format!("{}{}", prefix, "SourceEnvironmentName"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SystemStatus {
pub cpu_utilization: Option<CPUUtilization>,
pub load_average: Option<Vec<f64>>,
}
struct SystemStatusDeserializer;
impl SystemStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SystemStatus, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = SystemStatus::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"CPUUtilization" => {
obj.cpu_utilization = Some(CPUUtilizationDeserializer::deserialize(
"CPUUtilization",
stack,
)?);
}
"LoadAverage" => {
obj.load_average = match obj.load_average {
Some(ref mut existing) => {
existing.extend(LoadAverageDeserializer::deserialize(
"LoadAverage",
stack,
)?);
Some(existing.to_vec())
}
None => {
Some(LoadAverageDeserializer::deserialize("LoadAverage", stack)?)
}
};
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Tag {
pub key: Option<String>,
pub value: Option<String>,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Tag, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Tag::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Key" => {
obj.key = Some(TagKeyDeserializer::deserialize("Key", stack)?);
}
"Value" => {
obj.value = Some(TagValueDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TagSerializer;
impl TagSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Tag) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.key {
params.put(&format!("{}{}", prefix, "Key"), &field_value);
}
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
struct TagKeyDeserializer;
impl TagKeyDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TagKeyListSerializer;
impl TagKeyListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<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<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Tag>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(TagDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
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<'a, 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 TagsSerializer;
impl TagsSerializer {
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);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TerminateEnvironmentMessage {
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub force_terminate: Option<bool>,
pub terminate_resources: Option<bool>,
}
struct TerminateEnvironmentMessageSerializer;
impl TerminateEnvironmentMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &TerminateEnvironmentMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.force_terminate {
params.put(
&format!("{}{}", prefix, "ForceTerminate"),
&field_value.to_string(),
);
}
if let Some(ref field_value) = obj.terminate_resources {
params.put(
&format!("{}{}", prefix, "TerminateResources"),
&field_value.to_string(),
);
}
}
}
struct TimestampDeserializer;
impl TimestampDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 TokenDeserializer;
impl TokenDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 Trigger {
pub name: Option<String>,
}
struct TriggerDeserializer;
impl TriggerDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Trigger, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = Trigger::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TriggerListDeserializer;
impl TriggerListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Trigger>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(TriggerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateApplicationMessage {
pub application_name: String,
pub description: Option<String>,
}
struct UpdateApplicationMessageSerializer;
impl UpdateApplicationMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateApplicationMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateApplicationResourceLifecycleMessage {
pub application_name: String,
pub resource_lifecycle_config: ApplicationResourceLifecycleConfig,
}
struct UpdateApplicationResourceLifecycleMessageSerializer;
impl UpdateApplicationResourceLifecycleMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateApplicationResourceLifecycleMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
ApplicationResourceLifecycleConfigSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceLifecycleConfig"),
&obj.resource_lifecycle_config,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateApplicationVersionMessage {
pub application_name: String,
pub description: Option<String>,
pub version_label: String,
}
struct UpdateApplicationVersionMessageSerializer;
impl UpdateApplicationVersionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateApplicationVersionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
params.put(&format!("{}{}", prefix, "VersionLabel"), &obj.version_label);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateConfigurationTemplateMessage {
pub application_name: String,
pub description: Option<String>,
pub option_settings: Option<Vec<ConfigurationOptionSetting>>,
pub options_to_remove: Option<Vec<OptionSpecification>>,
pub template_name: String,
}
struct UpdateConfigurationTemplateMessageSerializer;
impl UpdateConfigurationTemplateMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateConfigurationTemplateMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.option_settings {
ConfigurationOptionSettingsListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionSettings"),
field_value,
);
}
if let Some(ref field_value) = obj.options_to_remove {
OptionsSpecifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionsToRemove"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "TemplateName"), &obj.template_name);
}
}
struct UpdateDateDeserializer;
impl UpdateDateDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 UpdateEnvironmentMessage {
pub application_name: Option<String>,
pub description: Option<String>,
pub environment_id: Option<String>,
pub environment_name: Option<String>,
pub group_name: Option<String>,
pub option_settings: Option<Vec<ConfigurationOptionSetting>>,
pub options_to_remove: Option<Vec<OptionSpecification>>,
pub platform_arn: Option<String>,
pub solution_stack_name: Option<String>,
pub template_name: Option<String>,
pub tier: Option<EnvironmentTier>,
pub version_label: Option<String>,
}
struct UpdateEnvironmentMessageSerializer;
impl UpdateEnvironmentMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateEnvironmentMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.application_name {
params.put(&format!("{}{}", prefix, "ApplicationName"), &field_value);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.environment_id {
params.put(&format!("{}{}", prefix, "EnvironmentId"), &field_value);
}
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
if let Some(ref field_value) = obj.group_name {
params.put(&format!("{}{}", prefix, "GroupName"), &field_value);
}
if let Some(ref field_value) = obj.option_settings {
ConfigurationOptionSettingsListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionSettings"),
field_value,
);
}
if let Some(ref field_value) = obj.options_to_remove {
OptionsSpecifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionsToRemove"),
field_value,
);
}
if let Some(ref field_value) = obj.platform_arn {
params.put(&format!("{}{}", prefix, "PlatformArn"), &field_value);
}
if let Some(ref field_value) = obj.solution_stack_name {
params.put(&format!("{}{}", prefix, "SolutionStackName"), &field_value);
}
if let Some(ref field_value) = obj.template_name {
params.put(&format!("{}{}", prefix, "TemplateName"), &field_value);
}
if let Some(ref field_value) = obj.tier {
EnvironmentTierSerializer::serialize(
params,
&format!("{}{}", prefix, "Tier"),
field_value,
);
}
if let Some(ref field_value) = obj.version_label {
params.put(&format!("{}{}", prefix, "VersionLabel"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTagsForResourceMessage {
pub resource_arn: String,
pub tags_to_add: Option<Vec<Tag>>,
pub tags_to_remove: Option<Vec<String>>,
}
struct UpdateTagsForResourceMessageSerializer;
impl UpdateTagsForResourceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateTagsForResourceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ResourceArn"), &obj.resource_arn);
if let Some(ref field_value) = obj.tags_to_add {
TagListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagsToAdd"),
field_value,
);
}
if let Some(ref field_value) = obj.tags_to_remove {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagsToRemove"),
field_value,
);
}
}
}
struct UserDefinedOptionDeserializer;
impl UserDefinedOptionDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ValidateConfigurationSettingsMessage {
pub application_name: String,
pub environment_name: Option<String>,
pub option_settings: Vec<ConfigurationOptionSetting>,
pub template_name: Option<String>,
}
struct ValidateConfigurationSettingsMessageSerializer;
impl ValidateConfigurationSettingsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ValidateConfigurationSettingsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ApplicationName"),
&obj.application_name,
);
if let Some(ref field_value) = obj.environment_name {
params.put(&format!("{}{}", prefix, "EnvironmentName"), &field_value);
}
ConfigurationOptionSettingsListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionSettings"),
&obj.option_settings,
);
if let Some(ref field_value) = obj.template_name {
params.put(&format!("{}{}", prefix, "TemplateName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ValidationMessage {
pub message: Option<String>,
pub namespace: Option<String>,
pub option_name: Option<String>,
pub severity: Option<String>,
}
struct ValidationMessageDeserializer;
impl ValidationMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ValidationMessage, XmlParseError> {
start_element(tag_name, stack)?;
let mut obj = ValidationMessage::default();
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { ref name, .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => match &name[..] {
"Message" => {
obj.message = Some(ValidationMessageStringDeserializer::deserialize(
"Message", stack,
)?);
}
"Namespace" => {
obj.namespace = Some(OptionNamespaceDeserializer::deserialize(
"Namespace",
stack,
)?);
}
"OptionName" => {
obj.option_name = Some(ConfigurationOptionNameDeserializer::deserialize(
"OptionName",
stack,
)?);
}
"Severity" => {
obj.severity = Some(ValidationSeverityDeserializer::deserialize(
"Severity", stack,
)?);
}
_ => skip_tree(stack),
},
DeserializerNext::Close => break,
DeserializerNext::Skip => {
stack.next();
}
}
}
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ValidationMessageStringDeserializer;
impl ValidationMessageStringDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 ValidationMessagesListDeserializer;
impl ValidationMessagesListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ValidationMessage>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(ValidationMessageDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct ValidationSeverityDeserializer;
impl ValidationSeverityDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 VersionLabelDeserializer;
impl VersionLabelDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 VersionLabelsSerializer;
impl VersionLabelsSerializer {
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 VersionLabelsListDeserializer;
impl VersionLabelsListDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
let mut obj = vec![];
start_element(tag_name, stack)?;
loop {
let next_event = match stack.peek() {
Some(&Ok(XmlEvent::EndElement { .. })) => DeserializerNext::Close,
Some(&Ok(XmlEvent::StartElement { ref name, .. })) => {
DeserializerNext::Element(name.local_name.to_owned())
}
_ => DeserializerNext::Skip,
};
match next_event {
DeserializerNext::Element(name) => {
if name == "member" {
obj.push(VersionLabelDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
}
DeserializerNext::Close => {
end_element(tag_name, stack)?;
break;
}
DeserializerNext::Skip => {
stack.next();
}
}
}
Ok(obj)
}
}
struct VersionLabelsListSerializer;
impl VersionLabelsListSerializer {
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 VirtualizationTypeDeserializer;
impl VirtualizationTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<'a, 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 AbortEnvironmentUpdateError {
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl AbortEnvironmentUpdateError {
pub fn from_response(res: BufferedHttpResponse) -> AbortEnvironmentUpdateError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return AbortEnvironmentUpdateError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
AbortEnvironmentUpdateError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for AbortEnvironmentUpdateError {
fn from(err: XmlParseError) -> AbortEnvironmentUpdateError {
let XmlParseError(message) = err;
AbortEnvironmentUpdateError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for AbortEnvironmentUpdateError {
fn from(err: CredentialsError) -> AbortEnvironmentUpdateError {
AbortEnvironmentUpdateError::Credentials(err)
}
}
impl From<HttpDispatchError> for AbortEnvironmentUpdateError {
fn from(err: HttpDispatchError) -> AbortEnvironmentUpdateError {
AbortEnvironmentUpdateError::HttpDispatch(err)
}
}
impl From<io::Error> for AbortEnvironmentUpdateError {
fn from(err: io::Error) -> AbortEnvironmentUpdateError {
AbortEnvironmentUpdateError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for AbortEnvironmentUpdateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AbortEnvironmentUpdateError {
fn description(&self) -> &str {
match *self {
AbortEnvironmentUpdateError::InsufficientPrivileges(ref cause) => cause,
AbortEnvironmentUpdateError::Validation(ref cause) => cause,
AbortEnvironmentUpdateError::Credentials(ref err) => err.description(),
AbortEnvironmentUpdateError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
AbortEnvironmentUpdateError::ParseError(ref cause) => cause,
AbortEnvironmentUpdateError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ApplyEnvironmentManagedActionError {
ElasticBeanstalkService(String),
ManagedActionInvalidState(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ApplyEnvironmentManagedActionError {
pub fn from_response(res: BufferedHttpResponse) -> ApplyEnvironmentManagedActionError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return ApplyEnvironmentManagedActionError::ElasticBeanstalkService(
String::from(parsed_error.message),
);
}
"ManagedActionInvalidStateException" => {
return ApplyEnvironmentManagedActionError::ManagedActionInvalidState(
String::from(parsed_error.message),
);
}
_ => {}
}
}
}
ApplyEnvironmentManagedActionError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for ApplyEnvironmentManagedActionError {
fn from(err: XmlParseError) -> ApplyEnvironmentManagedActionError {
let XmlParseError(message) = err;
ApplyEnvironmentManagedActionError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for ApplyEnvironmentManagedActionError {
fn from(err: CredentialsError) -> ApplyEnvironmentManagedActionError {
ApplyEnvironmentManagedActionError::Credentials(err)
}
}
impl From<HttpDispatchError> for ApplyEnvironmentManagedActionError {
fn from(err: HttpDispatchError) -> ApplyEnvironmentManagedActionError {
ApplyEnvironmentManagedActionError::HttpDispatch(err)
}
}
impl From<io::Error> for ApplyEnvironmentManagedActionError {
fn from(err: io::Error) -> ApplyEnvironmentManagedActionError {
ApplyEnvironmentManagedActionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ApplyEnvironmentManagedActionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ApplyEnvironmentManagedActionError {
fn description(&self) -> &str {
match *self {
ApplyEnvironmentManagedActionError::ElasticBeanstalkService(ref cause) => cause,
ApplyEnvironmentManagedActionError::ManagedActionInvalidState(ref cause) => cause,
ApplyEnvironmentManagedActionError::Validation(ref cause) => cause,
ApplyEnvironmentManagedActionError::Credentials(ref err) => err.description(),
ApplyEnvironmentManagedActionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ApplyEnvironmentManagedActionError::ParseError(ref cause) => cause,
ApplyEnvironmentManagedActionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CheckDNSAvailabilityError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CheckDNSAvailabilityError {
pub fn from_response(res: BufferedHttpResponse) -> CheckDNSAvailabilityError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
CheckDNSAvailabilityError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for CheckDNSAvailabilityError {
fn from(err: XmlParseError) -> CheckDNSAvailabilityError {
let XmlParseError(message) = err;
CheckDNSAvailabilityError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for CheckDNSAvailabilityError {
fn from(err: CredentialsError) -> CheckDNSAvailabilityError {
CheckDNSAvailabilityError::Credentials(err)
}
}
impl From<HttpDispatchError> for CheckDNSAvailabilityError {
fn from(err: HttpDispatchError) -> CheckDNSAvailabilityError {
CheckDNSAvailabilityError::HttpDispatch(err)
}
}
impl From<io::Error> for CheckDNSAvailabilityError {
fn from(err: io::Error) -> CheckDNSAvailabilityError {
CheckDNSAvailabilityError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CheckDNSAvailabilityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CheckDNSAvailabilityError {
fn description(&self) -> &str {
match *self {
CheckDNSAvailabilityError::Validation(ref cause) => cause,
CheckDNSAvailabilityError::Credentials(ref err) => err.description(),
CheckDNSAvailabilityError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CheckDNSAvailabilityError::ParseError(ref cause) => cause,
CheckDNSAvailabilityError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ComposeEnvironmentsError {
InsufficientPrivileges(String),
TooManyEnvironments(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ComposeEnvironmentsError {
pub fn from_response(res: BufferedHttpResponse) -> ComposeEnvironmentsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return ComposeEnvironmentsError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"TooManyEnvironmentsException" => {
return ComposeEnvironmentsError::TooManyEnvironments(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
ComposeEnvironmentsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for ComposeEnvironmentsError {
fn from(err: XmlParseError) -> ComposeEnvironmentsError {
let XmlParseError(message) = err;
ComposeEnvironmentsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for ComposeEnvironmentsError {
fn from(err: CredentialsError) -> ComposeEnvironmentsError {
ComposeEnvironmentsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ComposeEnvironmentsError {
fn from(err: HttpDispatchError) -> ComposeEnvironmentsError {
ComposeEnvironmentsError::HttpDispatch(err)
}
}
impl From<io::Error> for ComposeEnvironmentsError {
fn from(err: io::Error) -> ComposeEnvironmentsError {
ComposeEnvironmentsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ComposeEnvironmentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ComposeEnvironmentsError {
fn description(&self) -> &str {
match *self {
ComposeEnvironmentsError::InsufficientPrivileges(ref cause) => cause,
ComposeEnvironmentsError::TooManyEnvironments(ref cause) => cause,
ComposeEnvironmentsError::Validation(ref cause) => cause,
ComposeEnvironmentsError::Credentials(ref err) => err.description(),
ComposeEnvironmentsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ComposeEnvironmentsError::ParseError(ref cause) => cause,
ComposeEnvironmentsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateApplicationError {
TooManyApplications(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> CreateApplicationError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"TooManyApplicationsException" => {
return CreateApplicationError::TooManyApplications(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
CreateApplicationError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for CreateApplicationError {
fn from(err: XmlParseError) -> CreateApplicationError {
let XmlParseError(message) = err;
CreateApplicationError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for CreateApplicationError {
fn from(err: CredentialsError) -> CreateApplicationError {
CreateApplicationError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateApplicationError {
fn from(err: HttpDispatchError) -> CreateApplicationError {
CreateApplicationError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateApplicationError {
fn from(err: io::Error) -> CreateApplicationError {
CreateApplicationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateApplicationError {
fn description(&self) -> &str {
match *self {
CreateApplicationError::TooManyApplications(ref cause) => cause,
CreateApplicationError::Validation(ref cause) => cause,
CreateApplicationError::Credentials(ref err) => err.description(),
CreateApplicationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateApplicationError::ParseError(ref cause) => cause,
CreateApplicationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateApplicationVersionError {
CodeBuildNotInServiceRegion(String),
InsufficientPrivileges(String),
S3LocationNotInServiceRegion(String),
TooManyApplicationVersions(String),
TooManyApplications(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateApplicationVersionError {
pub fn from_response(res: BufferedHttpResponse) -> CreateApplicationVersionError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"CodeBuildNotInServiceRegionException" => {
return CreateApplicationVersionError::CodeBuildNotInServiceRegion(
String::from(parsed_error.message),
);
}
"InsufficientPrivilegesException" => {
return CreateApplicationVersionError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"S3LocationNotInServiceRegionException" => {
return CreateApplicationVersionError::S3LocationNotInServiceRegion(
String::from(parsed_error.message),
);
}
"TooManyApplicationVersionsException" => {
return CreateApplicationVersionError::TooManyApplicationVersions(
String::from(parsed_error.message),
);
}
"TooManyApplicationsException" => {
return CreateApplicationVersionError::TooManyApplications(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
CreateApplicationVersionError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for CreateApplicationVersionError {
fn from(err: XmlParseError) -> CreateApplicationVersionError {
let XmlParseError(message) = err;
CreateApplicationVersionError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for CreateApplicationVersionError {
fn from(err: CredentialsError) -> CreateApplicationVersionError {
CreateApplicationVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateApplicationVersionError {
fn from(err: HttpDispatchError) -> CreateApplicationVersionError {
CreateApplicationVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateApplicationVersionError {
fn from(err: io::Error) -> CreateApplicationVersionError {
CreateApplicationVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateApplicationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateApplicationVersionError {
fn description(&self) -> &str {
match *self {
CreateApplicationVersionError::CodeBuildNotInServiceRegion(ref cause) => cause,
CreateApplicationVersionError::InsufficientPrivileges(ref cause) => cause,
CreateApplicationVersionError::S3LocationNotInServiceRegion(ref cause) => cause,
CreateApplicationVersionError::TooManyApplicationVersions(ref cause) => cause,
CreateApplicationVersionError::TooManyApplications(ref cause) => cause,
CreateApplicationVersionError::Validation(ref cause) => cause,
CreateApplicationVersionError::Credentials(ref err) => err.description(),
CreateApplicationVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateApplicationVersionError::ParseError(ref cause) => cause,
CreateApplicationVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConfigurationTemplateError {
InsufficientPrivileges(String),
TooManyBuckets(String),
TooManyConfigurationTemplates(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateConfigurationTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> CreateConfigurationTemplateError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return CreateConfigurationTemplateError::InsufficientPrivileges(
String::from(parsed_error.message),
);
}
"TooManyBucketsException" => {
return CreateConfigurationTemplateError::TooManyBuckets(String::from(
parsed_error.message,
));
}
"TooManyConfigurationTemplatesException" => {
return CreateConfigurationTemplateError::TooManyConfigurationTemplates(
String::from(parsed_error.message),
);
}
_ => {}
}
}
}
CreateConfigurationTemplateError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for CreateConfigurationTemplateError {
fn from(err: XmlParseError) -> CreateConfigurationTemplateError {
let XmlParseError(message) = err;
CreateConfigurationTemplateError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for CreateConfigurationTemplateError {
fn from(err: CredentialsError) -> CreateConfigurationTemplateError {
CreateConfigurationTemplateError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateConfigurationTemplateError {
fn from(err: HttpDispatchError) -> CreateConfigurationTemplateError {
CreateConfigurationTemplateError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateConfigurationTemplateError {
fn from(err: io::Error) -> CreateConfigurationTemplateError {
CreateConfigurationTemplateError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateConfigurationTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConfigurationTemplateError {
fn description(&self) -> &str {
match *self {
CreateConfigurationTemplateError::InsufficientPrivileges(ref cause) => cause,
CreateConfigurationTemplateError::TooManyBuckets(ref cause) => cause,
CreateConfigurationTemplateError::TooManyConfigurationTemplates(ref cause) => cause,
CreateConfigurationTemplateError::Validation(ref cause) => cause,
CreateConfigurationTemplateError::Credentials(ref err) => err.description(),
CreateConfigurationTemplateError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateConfigurationTemplateError::ParseError(ref cause) => cause,
CreateConfigurationTemplateError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateEnvironmentError {
InsufficientPrivileges(String),
TooManyEnvironments(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> CreateEnvironmentError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return CreateEnvironmentError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"TooManyEnvironmentsException" => {
return CreateEnvironmentError::TooManyEnvironments(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
CreateEnvironmentError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for CreateEnvironmentError {
fn from(err: XmlParseError) -> CreateEnvironmentError {
let XmlParseError(message) = err;
CreateEnvironmentError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for CreateEnvironmentError {
fn from(err: CredentialsError) -> CreateEnvironmentError {
CreateEnvironmentError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateEnvironmentError {
fn from(err: HttpDispatchError) -> CreateEnvironmentError {
CreateEnvironmentError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateEnvironmentError {
fn from(err: io::Error) -> CreateEnvironmentError {
CreateEnvironmentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateEnvironmentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateEnvironmentError {
fn description(&self) -> &str {
match *self {
CreateEnvironmentError::InsufficientPrivileges(ref cause) => cause,
CreateEnvironmentError::TooManyEnvironments(ref cause) => cause,
CreateEnvironmentError::Validation(ref cause) => cause,
CreateEnvironmentError::Credentials(ref err) => err.description(),
CreateEnvironmentError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateEnvironmentError::ParseError(ref cause) => cause,
CreateEnvironmentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePlatformVersionError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
TooManyPlatforms(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreatePlatformVersionError {
pub fn from_response(res: BufferedHttpResponse) -> CreatePlatformVersionError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return CreatePlatformVersionError::ElasticBeanstalkService(String::from(
parsed_error.message,
));
}
"InsufficientPrivilegesException" => {
return CreatePlatformVersionError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"TooManyPlatformsException" => {
return CreatePlatformVersionError::TooManyPlatforms(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
CreatePlatformVersionError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for CreatePlatformVersionError {
fn from(err: XmlParseError) -> CreatePlatformVersionError {
let XmlParseError(message) = err;
CreatePlatformVersionError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for CreatePlatformVersionError {
fn from(err: CredentialsError) -> CreatePlatformVersionError {
CreatePlatformVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreatePlatformVersionError {
fn from(err: HttpDispatchError) -> CreatePlatformVersionError {
CreatePlatformVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for CreatePlatformVersionError {
fn from(err: io::Error) -> CreatePlatformVersionError {
CreatePlatformVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreatePlatformVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePlatformVersionError {
fn description(&self) -> &str {
match *self {
CreatePlatformVersionError::ElasticBeanstalkService(ref cause) => cause,
CreatePlatformVersionError::InsufficientPrivileges(ref cause) => cause,
CreatePlatformVersionError::TooManyPlatforms(ref cause) => cause,
CreatePlatformVersionError::Validation(ref cause) => cause,
CreatePlatformVersionError::Credentials(ref err) => err.description(),
CreatePlatformVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreatePlatformVersionError::ParseError(ref cause) => cause,
CreatePlatformVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStorageLocationError {
InsufficientPrivileges(String),
S3SubscriptionRequired(String),
TooManyBuckets(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl CreateStorageLocationError {
pub fn from_response(res: BufferedHttpResponse) -> CreateStorageLocationError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return CreateStorageLocationError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"S3SubscriptionRequiredException" => {
return CreateStorageLocationError::S3SubscriptionRequired(String::from(
parsed_error.message,
));
}
"TooManyBucketsException" => {
return CreateStorageLocationError::TooManyBuckets(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
CreateStorageLocationError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for CreateStorageLocationError {
fn from(err: XmlParseError) -> CreateStorageLocationError {
let XmlParseError(message) = err;
CreateStorageLocationError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for CreateStorageLocationError {
fn from(err: CredentialsError) -> CreateStorageLocationError {
CreateStorageLocationError::Credentials(err)
}
}
impl From<HttpDispatchError> for CreateStorageLocationError {
fn from(err: HttpDispatchError) -> CreateStorageLocationError {
CreateStorageLocationError::HttpDispatch(err)
}
}
impl From<io::Error> for CreateStorageLocationError {
fn from(err: io::Error) -> CreateStorageLocationError {
CreateStorageLocationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for CreateStorageLocationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStorageLocationError {
fn description(&self) -> &str {
match *self {
CreateStorageLocationError::InsufficientPrivileges(ref cause) => cause,
CreateStorageLocationError::S3SubscriptionRequired(ref cause) => cause,
CreateStorageLocationError::TooManyBuckets(ref cause) => cause,
CreateStorageLocationError::Validation(ref cause) => cause,
CreateStorageLocationError::Credentials(ref err) => err.description(),
CreateStorageLocationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
CreateStorageLocationError::ParseError(ref cause) => cause,
CreateStorageLocationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteApplicationError {
OperationInProgress(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteApplicationError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"OperationInProgressFailure" => {
return DeleteApplicationError::OperationInProgress(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DeleteApplicationError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DeleteApplicationError {
fn from(err: XmlParseError) -> DeleteApplicationError {
let XmlParseError(message) = err;
DeleteApplicationError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DeleteApplicationError {
fn from(err: CredentialsError) -> DeleteApplicationError {
DeleteApplicationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteApplicationError {
fn from(err: HttpDispatchError) -> DeleteApplicationError {
DeleteApplicationError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteApplicationError {
fn from(err: io::Error) -> DeleteApplicationError {
DeleteApplicationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteApplicationError {
fn description(&self) -> &str {
match *self {
DeleteApplicationError::OperationInProgress(ref cause) => cause,
DeleteApplicationError::Validation(ref cause) => cause,
DeleteApplicationError::Credentials(ref err) => err.description(),
DeleteApplicationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteApplicationError::ParseError(ref cause) => cause,
DeleteApplicationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteApplicationVersionError {
InsufficientPrivileges(String),
OperationInProgress(String),
S3LocationNotInServiceRegion(String),
SourceBundleDeletion(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteApplicationVersionError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteApplicationVersionError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return DeleteApplicationVersionError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"OperationInProgressFailure" => {
return DeleteApplicationVersionError::OperationInProgress(String::from(
parsed_error.message,
));
}
"S3LocationNotInServiceRegionException" => {
return DeleteApplicationVersionError::S3LocationNotInServiceRegion(
String::from(parsed_error.message),
);
}
"SourceBundleDeletionFailure" => {
return DeleteApplicationVersionError::SourceBundleDeletion(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DeleteApplicationVersionError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DeleteApplicationVersionError {
fn from(err: XmlParseError) -> DeleteApplicationVersionError {
let XmlParseError(message) = err;
DeleteApplicationVersionError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DeleteApplicationVersionError {
fn from(err: CredentialsError) -> DeleteApplicationVersionError {
DeleteApplicationVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteApplicationVersionError {
fn from(err: HttpDispatchError) -> DeleteApplicationVersionError {
DeleteApplicationVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteApplicationVersionError {
fn from(err: io::Error) -> DeleteApplicationVersionError {
DeleteApplicationVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteApplicationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteApplicationVersionError {
fn description(&self) -> &str {
match *self {
DeleteApplicationVersionError::InsufficientPrivileges(ref cause) => cause,
DeleteApplicationVersionError::OperationInProgress(ref cause) => cause,
DeleteApplicationVersionError::S3LocationNotInServiceRegion(ref cause) => cause,
DeleteApplicationVersionError::SourceBundleDeletion(ref cause) => cause,
DeleteApplicationVersionError::Validation(ref cause) => cause,
DeleteApplicationVersionError::Credentials(ref err) => err.description(),
DeleteApplicationVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteApplicationVersionError::ParseError(ref cause) => cause,
DeleteApplicationVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConfigurationTemplateError {
OperationInProgress(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteConfigurationTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteConfigurationTemplateError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"OperationInProgressFailure" => {
return DeleteConfigurationTemplateError::OperationInProgress(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DeleteConfigurationTemplateError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DeleteConfigurationTemplateError {
fn from(err: XmlParseError) -> DeleteConfigurationTemplateError {
let XmlParseError(message) = err;
DeleteConfigurationTemplateError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DeleteConfigurationTemplateError {
fn from(err: CredentialsError) -> DeleteConfigurationTemplateError {
DeleteConfigurationTemplateError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteConfigurationTemplateError {
fn from(err: HttpDispatchError) -> DeleteConfigurationTemplateError {
DeleteConfigurationTemplateError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteConfigurationTemplateError {
fn from(err: io::Error) -> DeleteConfigurationTemplateError {
DeleteConfigurationTemplateError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteConfigurationTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConfigurationTemplateError {
fn description(&self) -> &str {
match *self {
DeleteConfigurationTemplateError::OperationInProgress(ref cause) => cause,
DeleteConfigurationTemplateError::Validation(ref cause) => cause,
DeleteConfigurationTemplateError::Credentials(ref err) => err.description(),
DeleteConfigurationTemplateError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteConfigurationTemplateError::ParseError(ref cause) => cause,
DeleteConfigurationTemplateError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteEnvironmentConfigurationError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeleteEnvironmentConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> DeleteEnvironmentConfigurationError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
DeleteEnvironmentConfigurationError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DeleteEnvironmentConfigurationError {
fn from(err: XmlParseError) -> DeleteEnvironmentConfigurationError {
let XmlParseError(message) = err;
DeleteEnvironmentConfigurationError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DeleteEnvironmentConfigurationError {
fn from(err: CredentialsError) -> DeleteEnvironmentConfigurationError {
DeleteEnvironmentConfigurationError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeleteEnvironmentConfigurationError {
fn from(err: HttpDispatchError) -> DeleteEnvironmentConfigurationError {
DeleteEnvironmentConfigurationError::HttpDispatch(err)
}
}
impl From<io::Error> for DeleteEnvironmentConfigurationError {
fn from(err: io::Error) -> DeleteEnvironmentConfigurationError {
DeleteEnvironmentConfigurationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeleteEnvironmentConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteEnvironmentConfigurationError {
fn description(&self) -> &str {
match *self {
DeleteEnvironmentConfigurationError::Validation(ref cause) => cause,
DeleteEnvironmentConfigurationError::Credentials(ref err) => err.description(),
DeleteEnvironmentConfigurationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeleteEnvironmentConfigurationError::ParseError(ref cause) => cause,
DeleteEnvironmentConfigurationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePlatformVersionError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
OperationInProgress(String),
PlatformVersionStillReferenced(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DeletePlatformVersionError {
pub fn from_response(res: BufferedHttpResponse) -> DeletePlatformVersionError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return DeletePlatformVersionError::ElasticBeanstalkService(String::from(
parsed_error.message,
));
}
"InsufficientPrivilegesException" => {
return DeletePlatformVersionError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"OperationInProgressFailure" => {
return DeletePlatformVersionError::OperationInProgress(String::from(
parsed_error.message,
));
}
"PlatformVersionStillReferencedException" => {
return DeletePlatformVersionError::PlatformVersionStillReferenced(
String::from(parsed_error.message),
);
}
_ => {}
}
}
}
DeletePlatformVersionError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DeletePlatformVersionError {
fn from(err: XmlParseError) -> DeletePlatformVersionError {
let XmlParseError(message) = err;
DeletePlatformVersionError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DeletePlatformVersionError {
fn from(err: CredentialsError) -> DeletePlatformVersionError {
DeletePlatformVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for DeletePlatformVersionError {
fn from(err: HttpDispatchError) -> DeletePlatformVersionError {
DeletePlatformVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for DeletePlatformVersionError {
fn from(err: io::Error) -> DeletePlatformVersionError {
DeletePlatformVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DeletePlatformVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePlatformVersionError {
fn description(&self) -> &str {
match *self {
DeletePlatformVersionError::ElasticBeanstalkService(ref cause) => cause,
DeletePlatformVersionError::InsufficientPrivileges(ref cause) => cause,
DeletePlatformVersionError::OperationInProgress(ref cause) => cause,
DeletePlatformVersionError::PlatformVersionStillReferenced(ref cause) => cause,
DeletePlatformVersionError::Validation(ref cause) => cause,
DeletePlatformVersionError::Credentials(ref err) => err.description(),
DeletePlatformVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DeletePlatformVersionError::ParseError(ref cause) => cause,
DeletePlatformVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountAttributesError {
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeAccountAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeAccountAttributesError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return DescribeAccountAttributesError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DescribeAccountAttributesError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeAccountAttributesError {
fn from(err: XmlParseError) -> DescribeAccountAttributesError {
let XmlParseError(message) = err;
DescribeAccountAttributesError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeAccountAttributesError {
fn from(err: CredentialsError) -> DescribeAccountAttributesError {
DescribeAccountAttributesError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeAccountAttributesError {
fn from(err: HttpDispatchError) -> DescribeAccountAttributesError {
DescribeAccountAttributesError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeAccountAttributesError {
fn from(err: io::Error) -> DescribeAccountAttributesError {
DescribeAccountAttributesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeAccountAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountAttributesError {
fn description(&self) -> &str {
match *self {
DescribeAccountAttributesError::InsufficientPrivileges(ref cause) => cause,
DescribeAccountAttributesError::Validation(ref cause) => cause,
DescribeAccountAttributesError::Credentials(ref err) => err.description(),
DescribeAccountAttributesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeAccountAttributesError::ParseError(ref cause) => cause,
DescribeAccountAttributesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeApplicationVersionsError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeApplicationVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeApplicationVersionsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
DescribeApplicationVersionsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeApplicationVersionsError {
fn from(err: XmlParseError) -> DescribeApplicationVersionsError {
let XmlParseError(message) = err;
DescribeApplicationVersionsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeApplicationVersionsError {
fn from(err: CredentialsError) -> DescribeApplicationVersionsError {
DescribeApplicationVersionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeApplicationVersionsError {
fn from(err: HttpDispatchError) -> DescribeApplicationVersionsError {
DescribeApplicationVersionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeApplicationVersionsError {
fn from(err: io::Error) -> DescribeApplicationVersionsError {
DescribeApplicationVersionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeApplicationVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeApplicationVersionsError {
fn description(&self) -> &str {
match *self {
DescribeApplicationVersionsError::Validation(ref cause) => cause,
DescribeApplicationVersionsError::Credentials(ref err) => err.description(),
DescribeApplicationVersionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeApplicationVersionsError::ParseError(ref cause) => cause,
DescribeApplicationVersionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeApplicationsError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeApplicationsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeApplicationsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
DescribeApplicationsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeApplicationsError {
fn from(err: XmlParseError) -> DescribeApplicationsError {
let XmlParseError(message) = err;
DescribeApplicationsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeApplicationsError {
fn from(err: CredentialsError) -> DescribeApplicationsError {
DescribeApplicationsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeApplicationsError {
fn from(err: HttpDispatchError) -> DescribeApplicationsError {
DescribeApplicationsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeApplicationsError {
fn from(err: io::Error) -> DescribeApplicationsError {
DescribeApplicationsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeApplicationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeApplicationsError {
fn description(&self) -> &str {
match *self {
DescribeApplicationsError::Validation(ref cause) => cause,
DescribeApplicationsError::Credentials(ref err) => err.description(),
DescribeApplicationsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeApplicationsError::ParseError(ref cause) => cause,
DescribeApplicationsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationOptionsError {
TooManyBuckets(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeConfigurationOptionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeConfigurationOptionsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"TooManyBucketsException" => {
return DescribeConfigurationOptionsError::TooManyBuckets(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DescribeConfigurationOptionsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeConfigurationOptionsError {
fn from(err: XmlParseError) -> DescribeConfigurationOptionsError {
let XmlParseError(message) = err;
DescribeConfigurationOptionsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeConfigurationOptionsError {
fn from(err: CredentialsError) -> DescribeConfigurationOptionsError {
DescribeConfigurationOptionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeConfigurationOptionsError {
fn from(err: HttpDispatchError) -> DescribeConfigurationOptionsError {
DescribeConfigurationOptionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeConfigurationOptionsError {
fn from(err: io::Error) -> DescribeConfigurationOptionsError {
DescribeConfigurationOptionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeConfigurationOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConfigurationOptionsError {
fn description(&self) -> &str {
match *self {
DescribeConfigurationOptionsError::TooManyBuckets(ref cause) => cause,
DescribeConfigurationOptionsError::Validation(ref cause) => cause,
DescribeConfigurationOptionsError::Credentials(ref err) => err.description(),
DescribeConfigurationOptionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeConfigurationOptionsError::ParseError(ref cause) => cause,
DescribeConfigurationOptionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationSettingsError {
TooManyBuckets(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeConfigurationSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeConfigurationSettingsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"TooManyBucketsException" => {
return DescribeConfigurationSettingsError::TooManyBuckets(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DescribeConfigurationSettingsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeConfigurationSettingsError {
fn from(err: XmlParseError) -> DescribeConfigurationSettingsError {
let XmlParseError(message) = err;
DescribeConfigurationSettingsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeConfigurationSettingsError {
fn from(err: CredentialsError) -> DescribeConfigurationSettingsError {
DescribeConfigurationSettingsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeConfigurationSettingsError {
fn from(err: HttpDispatchError) -> DescribeConfigurationSettingsError {
DescribeConfigurationSettingsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeConfigurationSettingsError {
fn from(err: io::Error) -> DescribeConfigurationSettingsError {
DescribeConfigurationSettingsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeConfigurationSettingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConfigurationSettingsError {
fn description(&self) -> &str {
match *self {
DescribeConfigurationSettingsError::TooManyBuckets(ref cause) => cause,
DescribeConfigurationSettingsError::Validation(ref cause) => cause,
DescribeConfigurationSettingsError::Credentials(ref err) => err.description(),
DescribeConfigurationSettingsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeConfigurationSettingsError::ParseError(ref cause) => cause,
DescribeConfigurationSettingsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentHealthError {
ElasticBeanstalkService(String),
InvalidRequest(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEnvironmentHealthError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeEnvironmentHealthError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return DescribeEnvironmentHealthError::ElasticBeanstalkService(
String::from(parsed_error.message),
);
}
"InvalidRequestException" => {
return DescribeEnvironmentHealthError::InvalidRequest(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DescribeEnvironmentHealthError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeEnvironmentHealthError {
fn from(err: XmlParseError) -> DescribeEnvironmentHealthError {
let XmlParseError(message) = err;
DescribeEnvironmentHealthError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeEnvironmentHealthError {
fn from(err: CredentialsError) -> DescribeEnvironmentHealthError {
DescribeEnvironmentHealthError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEnvironmentHealthError {
fn from(err: HttpDispatchError) -> DescribeEnvironmentHealthError {
DescribeEnvironmentHealthError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEnvironmentHealthError {
fn from(err: io::Error) -> DescribeEnvironmentHealthError {
DescribeEnvironmentHealthError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEnvironmentHealthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEnvironmentHealthError {
fn description(&self) -> &str {
match *self {
DescribeEnvironmentHealthError::ElasticBeanstalkService(ref cause) => cause,
DescribeEnvironmentHealthError::InvalidRequest(ref cause) => cause,
DescribeEnvironmentHealthError::Validation(ref cause) => cause,
DescribeEnvironmentHealthError::Credentials(ref err) => err.description(),
DescribeEnvironmentHealthError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeEnvironmentHealthError::ParseError(ref cause) => cause,
DescribeEnvironmentHealthError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentManagedActionHistoryError {
ElasticBeanstalkService(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEnvironmentManagedActionHistoryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> DescribeEnvironmentManagedActionHistoryError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return DescribeEnvironmentManagedActionHistoryError::ElasticBeanstalkService(
String::from(parsed_error.message),
);
}
_ => {}
}
}
}
DescribeEnvironmentManagedActionHistoryError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeEnvironmentManagedActionHistoryError {
fn from(err: XmlParseError) -> DescribeEnvironmentManagedActionHistoryError {
let XmlParseError(message) = err;
DescribeEnvironmentManagedActionHistoryError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeEnvironmentManagedActionHistoryError {
fn from(err: CredentialsError) -> DescribeEnvironmentManagedActionHistoryError {
DescribeEnvironmentManagedActionHistoryError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEnvironmentManagedActionHistoryError {
fn from(err: HttpDispatchError) -> DescribeEnvironmentManagedActionHistoryError {
DescribeEnvironmentManagedActionHistoryError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEnvironmentManagedActionHistoryError {
fn from(err: io::Error) -> DescribeEnvironmentManagedActionHistoryError {
DescribeEnvironmentManagedActionHistoryError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEnvironmentManagedActionHistoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEnvironmentManagedActionHistoryError {
fn description(&self) -> &str {
match *self {
DescribeEnvironmentManagedActionHistoryError::ElasticBeanstalkService(ref cause) => {
cause
}
DescribeEnvironmentManagedActionHistoryError::Validation(ref cause) => cause,
DescribeEnvironmentManagedActionHistoryError::Credentials(ref err) => err.description(),
DescribeEnvironmentManagedActionHistoryError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeEnvironmentManagedActionHistoryError::ParseError(ref cause) => cause,
DescribeEnvironmentManagedActionHistoryError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentManagedActionsError {
ElasticBeanstalkService(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEnvironmentManagedActionsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeEnvironmentManagedActionsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return DescribeEnvironmentManagedActionsError::ElasticBeanstalkService(
String::from(parsed_error.message),
);
}
_ => {}
}
}
}
DescribeEnvironmentManagedActionsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeEnvironmentManagedActionsError {
fn from(err: XmlParseError) -> DescribeEnvironmentManagedActionsError {
let XmlParseError(message) = err;
DescribeEnvironmentManagedActionsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeEnvironmentManagedActionsError {
fn from(err: CredentialsError) -> DescribeEnvironmentManagedActionsError {
DescribeEnvironmentManagedActionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEnvironmentManagedActionsError {
fn from(err: HttpDispatchError) -> DescribeEnvironmentManagedActionsError {
DescribeEnvironmentManagedActionsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEnvironmentManagedActionsError {
fn from(err: io::Error) -> DescribeEnvironmentManagedActionsError {
DescribeEnvironmentManagedActionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEnvironmentManagedActionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEnvironmentManagedActionsError {
fn description(&self) -> &str {
match *self {
DescribeEnvironmentManagedActionsError::ElasticBeanstalkService(ref cause) => cause,
DescribeEnvironmentManagedActionsError::Validation(ref cause) => cause,
DescribeEnvironmentManagedActionsError::Credentials(ref err) => err.description(),
DescribeEnvironmentManagedActionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeEnvironmentManagedActionsError::ParseError(ref cause) => cause,
DescribeEnvironmentManagedActionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentResourcesError {
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEnvironmentResourcesError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeEnvironmentResourcesError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return DescribeEnvironmentResourcesError::InsufficientPrivileges(
String::from(parsed_error.message),
);
}
_ => {}
}
}
}
DescribeEnvironmentResourcesError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeEnvironmentResourcesError {
fn from(err: XmlParseError) -> DescribeEnvironmentResourcesError {
let XmlParseError(message) = err;
DescribeEnvironmentResourcesError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeEnvironmentResourcesError {
fn from(err: CredentialsError) -> DescribeEnvironmentResourcesError {
DescribeEnvironmentResourcesError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEnvironmentResourcesError {
fn from(err: HttpDispatchError) -> DescribeEnvironmentResourcesError {
DescribeEnvironmentResourcesError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEnvironmentResourcesError {
fn from(err: io::Error) -> DescribeEnvironmentResourcesError {
DescribeEnvironmentResourcesError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEnvironmentResourcesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEnvironmentResourcesError {
fn description(&self) -> &str {
match *self {
DescribeEnvironmentResourcesError::InsufficientPrivileges(ref cause) => cause,
DescribeEnvironmentResourcesError::Validation(ref cause) => cause,
DescribeEnvironmentResourcesError::Credentials(ref err) => err.description(),
DescribeEnvironmentResourcesError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeEnvironmentResourcesError::ParseError(ref cause) => cause,
DescribeEnvironmentResourcesError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentsError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEnvironmentsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeEnvironmentsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
DescribeEnvironmentsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeEnvironmentsError {
fn from(err: XmlParseError) -> DescribeEnvironmentsError {
let XmlParseError(message) = err;
DescribeEnvironmentsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeEnvironmentsError {
fn from(err: CredentialsError) -> DescribeEnvironmentsError {
DescribeEnvironmentsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEnvironmentsError {
fn from(err: HttpDispatchError) -> DescribeEnvironmentsError {
DescribeEnvironmentsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEnvironmentsError {
fn from(err: io::Error) -> DescribeEnvironmentsError {
DescribeEnvironmentsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEnvironmentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEnvironmentsError {
fn description(&self) -> &str {
match *self {
DescribeEnvironmentsError::Validation(ref cause) => cause,
DescribeEnvironmentsError::Credentials(ref err) => err.description(),
DescribeEnvironmentsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeEnvironmentsError::ParseError(ref cause) => cause,
DescribeEnvironmentsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventsError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeEventsError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeEventsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
DescribeEventsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeEventsError {
fn from(err: XmlParseError) -> DescribeEventsError {
let XmlParseError(message) = err;
DescribeEventsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeEventsError {
fn from(err: CredentialsError) -> DescribeEventsError {
DescribeEventsError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeEventsError {
fn from(err: HttpDispatchError) -> DescribeEventsError {
DescribeEventsError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeEventsError {
fn from(err: io::Error) -> DescribeEventsError {
DescribeEventsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventsError {
fn description(&self) -> &str {
match *self {
DescribeEventsError::Validation(ref cause) => cause,
DescribeEventsError::Credentials(ref err) => err.description(),
DescribeEventsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
DescribeEventsError::ParseError(ref cause) => cause,
DescribeEventsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstancesHealthError {
ElasticBeanstalkService(String),
InvalidRequest(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribeInstancesHealthError {
pub fn from_response(res: BufferedHttpResponse) -> DescribeInstancesHealthError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return DescribeInstancesHealthError::ElasticBeanstalkService(String::from(
parsed_error.message,
));
}
"InvalidRequestException" => {
return DescribeInstancesHealthError::InvalidRequest(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DescribeInstancesHealthError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribeInstancesHealthError {
fn from(err: XmlParseError) -> DescribeInstancesHealthError {
let XmlParseError(message) = err;
DescribeInstancesHealthError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribeInstancesHealthError {
fn from(err: CredentialsError) -> DescribeInstancesHealthError {
DescribeInstancesHealthError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribeInstancesHealthError {
fn from(err: HttpDispatchError) -> DescribeInstancesHealthError {
DescribeInstancesHealthError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribeInstancesHealthError {
fn from(err: io::Error) -> DescribeInstancesHealthError {
DescribeInstancesHealthError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribeInstancesHealthError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInstancesHealthError {
fn description(&self) -> &str {
match *self {
DescribeInstancesHealthError::ElasticBeanstalkService(ref cause) => cause,
DescribeInstancesHealthError::InvalidRequest(ref cause) => cause,
DescribeInstancesHealthError::Validation(ref cause) => cause,
DescribeInstancesHealthError::Credentials(ref err) => err.description(),
DescribeInstancesHealthError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribeInstancesHealthError::ParseError(ref cause) => cause,
DescribeInstancesHealthError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePlatformVersionError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl DescribePlatformVersionError {
pub fn from_response(res: BufferedHttpResponse) -> DescribePlatformVersionError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return DescribePlatformVersionError::ElasticBeanstalkService(String::from(
parsed_error.message,
));
}
"InsufficientPrivilegesException" => {
return DescribePlatformVersionError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
DescribePlatformVersionError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for DescribePlatformVersionError {
fn from(err: XmlParseError) -> DescribePlatformVersionError {
let XmlParseError(message) = err;
DescribePlatformVersionError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for DescribePlatformVersionError {
fn from(err: CredentialsError) -> DescribePlatformVersionError {
DescribePlatformVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for DescribePlatformVersionError {
fn from(err: HttpDispatchError) -> DescribePlatformVersionError {
DescribePlatformVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for DescribePlatformVersionError {
fn from(err: io::Error) -> DescribePlatformVersionError {
DescribePlatformVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for DescribePlatformVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePlatformVersionError {
fn description(&self) -> &str {
match *self {
DescribePlatformVersionError::ElasticBeanstalkService(ref cause) => cause,
DescribePlatformVersionError::InsufficientPrivileges(ref cause) => cause,
DescribePlatformVersionError::Validation(ref cause) => cause,
DescribePlatformVersionError::Credentials(ref err) => err.description(),
DescribePlatformVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
DescribePlatformVersionError::ParseError(ref cause) => cause,
DescribePlatformVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAvailableSolutionStacksError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListAvailableSolutionStacksError {
pub fn from_response(res: BufferedHttpResponse) -> ListAvailableSolutionStacksError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
ListAvailableSolutionStacksError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for ListAvailableSolutionStacksError {
fn from(err: XmlParseError) -> ListAvailableSolutionStacksError {
let XmlParseError(message) = err;
ListAvailableSolutionStacksError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for ListAvailableSolutionStacksError {
fn from(err: CredentialsError) -> ListAvailableSolutionStacksError {
ListAvailableSolutionStacksError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListAvailableSolutionStacksError {
fn from(err: HttpDispatchError) -> ListAvailableSolutionStacksError {
ListAvailableSolutionStacksError::HttpDispatch(err)
}
}
impl From<io::Error> for ListAvailableSolutionStacksError {
fn from(err: io::Error) -> ListAvailableSolutionStacksError {
ListAvailableSolutionStacksError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListAvailableSolutionStacksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAvailableSolutionStacksError {
fn description(&self) -> &str {
match *self {
ListAvailableSolutionStacksError::Validation(ref cause) => cause,
ListAvailableSolutionStacksError::Credentials(ref err) => err.description(),
ListAvailableSolutionStacksError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListAvailableSolutionStacksError::ParseError(ref cause) => cause,
ListAvailableSolutionStacksError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPlatformVersionsError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListPlatformVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> ListPlatformVersionsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"ElasticBeanstalkServiceException" => {
return ListPlatformVersionsError::ElasticBeanstalkService(String::from(
parsed_error.message,
));
}
"InsufficientPrivilegesException" => {
return ListPlatformVersionsError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
ListPlatformVersionsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for ListPlatformVersionsError {
fn from(err: XmlParseError) -> ListPlatformVersionsError {
let XmlParseError(message) = err;
ListPlatformVersionsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for ListPlatformVersionsError {
fn from(err: CredentialsError) -> ListPlatformVersionsError {
ListPlatformVersionsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListPlatformVersionsError {
fn from(err: HttpDispatchError) -> ListPlatformVersionsError {
ListPlatformVersionsError::HttpDispatch(err)
}
}
impl From<io::Error> for ListPlatformVersionsError {
fn from(err: io::Error) -> ListPlatformVersionsError {
ListPlatformVersionsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListPlatformVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPlatformVersionsError {
fn description(&self) -> &str {
match *self {
ListPlatformVersionsError::ElasticBeanstalkService(ref cause) => cause,
ListPlatformVersionsError::InsufficientPrivileges(ref cause) => cause,
ListPlatformVersionsError::Validation(ref cause) => cause,
ListPlatformVersionsError::Credentials(ref err) => err.description(),
ListPlatformVersionsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListPlatformVersionsError::ParseError(ref cause) => cause,
ListPlatformVersionsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InsufficientPrivileges(String),
ResourceNotFound(String),
ResourceTypeNotSupported(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> ListTagsForResourceError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return ListTagsForResourceError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"ResourceNotFoundException" => {
return ListTagsForResourceError::ResourceNotFound(String::from(
parsed_error.message,
));
}
"ResourceTypeNotSupportedException" => {
return ListTagsForResourceError::ResourceTypeNotSupported(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
ListTagsForResourceError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for ListTagsForResourceError {
fn from(err: XmlParseError) -> ListTagsForResourceError {
let XmlParseError(message) = err;
ListTagsForResourceError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for ListTagsForResourceError {
fn from(err: CredentialsError) -> ListTagsForResourceError {
ListTagsForResourceError::Credentials(err)
}
}
impl From<HttpDispatchError> for ListTagsForResourceError {
fn from(err: HttpDispatchError) -> ListTagsForResourceError {
ListTagsForResourceError::HttpDispatch(err)
}
}
impl From<io::Error> for ListTagsForResourceError {
fn from(err: io::Error) -> ListTagsForResourceError {
ListTagsForResourceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InsufficientPrivileges(ref cause) => cause,
ListTagsForResourceError::ResourceNotFound(ref cause) => cause,
ListTagsForResourceError::ResourceTypeNotSupported(ref cause) => cause,
ListTagsForResourceError::Validation(ref cause) => cause,
ListTagsForResourceError::Credentials(ref err) => err.description(),
ListTagsForResourceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ListTagsForResourceError::ParseError(ref cause) => cause,
ListTagsForResourceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RebuildEnvironmentError {
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RebuildEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> RebuildEnvironmentError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return RebuildEnvironmentError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
RebuildEnvironmentError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for RebuildEnvironmentError {
fn from(err: XmlParseError) -> RebuildEnvironmentError {
let XmlParseError(message) = err;
RebuildEnvironmentError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for RebuildEnvironmentError {
fn from(err: CredentialsError) -> RebuildEnvironmentError {
RebuildEnvironmentError::Credentials(err)
}
}
impl From<HttpDispatchError> for RebuildEnvironmentError {
fn from(err: HttpDispatchError) -> RebuildEnvironmentError {
RebuildEnvironmentError::HttpDispatch(err)
}
}
impl From<io::Error> for RebuildEnvironmentError {
fn from(err: io::Error) -> RebuildEnvironmentError {
RebuildEnvironmentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RebuildEnvironmentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RebuildEnvironmentError {
fn description(&self) -> &str {
match *self {
RebuildEnvironmentError::InsufficientPrivileges(ref cause) => cause,
RebuildEnvironmentError::Validation(ref cause) => cause,
RebuildEnvironmentError::Credentials(ref err) => err.description(),
RebuildEnvironmentError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RebuildEnvironmentError::ParseError(ref cause) => cause,
RebuildEnvironmentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RequestEnvironmentInfoError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RequestEnvironmentInfoError {
pub fn from_response(res: BufferedHttpResponse) -> RequestEnvironmentInfoError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
RequestEnvironmentInfoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for RequestEnvironmentInfoError {
fn from(err: XmlParseError) -> RequestEnvironmentInfoError {
let XmlParseError(message) = err;
RequestEnvironmentInfoError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for RequestEnvironmentInfoError {
fn from(err: CredentialsError) -> RequestEnvironmentInfoError {
RequestEnvironmentInfoError::Credentials(err)
}
}
impl From<HttpDispatchError> for RequestEnvironmentInfoError {
fn from(err: HttpDispatchError) -> RequestEnvironmentInfoError {
RequestEnvironmentInfoError::HttpDispatch(err)
}
}
impl From<io::Error> for RequestEnvironmentInfoError {
fn from(err: io::Error) -> RequestEnvironmentInfoError {
RequestEnvironmentInfoError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RequestEnvironmentInfoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RequestEnvironmentInfoError {
fn description(&self) -> &str {
match *self {
RequestEnvironmentInfoError::Validation(ref cause) => cause,
RequestEnvironmentInfoError::Credentials(ref err) => err.description(),
RequestEnvironmentInfoError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RequestEnvironmentInfoError::ParseError(ref cause) => cause,
RequestEnvironmentInfoError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestartAppServerError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RestartAppServerError {
pub fn from_response(res: BufferedHttpResponse) -> RestartAppServerError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
RestartAppServerError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for RestartAppServerError {
fn from(err: XmlParseError) -> RestartAppServerError {
let XmlParseError(message) = err;
RestartAppServerError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for RestartAppServerError {
fn from(err: CredentialsError) -> RestartAppServerError {
RestartAppServerError::Credentials(err)
}
}
impl From<HttpDispatchError> for RestartAppServerError {
fn from(err: HttpDispatchError) -> RestartAppServerError {
RestartAppServerError::HttpDispatch(err)
}
}
impl From<io::Error> for RestartAppServerError {
fn from(err: io::Error) -> RestartAppServerError {
RestartAppServerError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RestartAppServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestartAppServerError {
fn description(&self) -> &str {
match *self {
RestartAppServerError::Validation(ref cause) => cause,
RestartAppServerError::Credentials(ref err) => err.description(),
RestartAppServerError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
RestartAppServerError::ParseError(ref cause) => cause,
RestartAppServerError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum RetrieveEnvironmentInfoError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl RetrieveEnvironmentInfoError {
pub fn from_response(res: BufferedHttpResponse) -> RetrieveEnvironmentInfoError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
RetrieveEnvironmentInfoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for RetrieveEnvironmentInfoError {
fn from(err: XmlParseError) -> RetrieveEnvironmentInfoError {
let XmlParseError(message) = err;
RetrieveEnvironmentInfoError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for RetrieveEnvironmentInfoError {
fn from(err: CredentialsError) -> RetrieveEnvironmentInfoError {
RetrieveEnvironmentInfoError::Credentials(err)
}
}
impl From<HttpDispatchError> for RetrieveEnvironmentInfoError {
fn from(err: HttpDispatchError) -> RetrieveEnvironmentInfoError {
RetrieveEnvironmentInfoError::HttpDispatch(err)
}
}
impl From<io::Error> for RetrieveEnvironmentInfoError {
fn from(err: io::Error) -> RetrieveEnvironmentInfoError {
RetrieveEnvironmentInfoError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for RetrieveEnvironmentInfoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RetrieveEnvironmentInfoError {
fn description(&self) -> &str {
match *self {
RetrieveEnvironmentInfoError::Validation(ref cause) => cause,
RetrieveEnvironmentInfoError::Credentials(ref err) => err.description(),
RetrieveEnvironmentInfoError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
RetrieveEnvironmentInfoError::ParseError(ref cause) => cause,
RetrieveEnvironmentInfoError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum SwapEnvironmentCNAMEsError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl SwapEnvironmentCNAMEsError {
pub fn from_response(res: BufferedHttpResponse) -> SwapEnvironmentCNAMEsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
SwapEnvironmentCNAMEsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for SwapEnvironmentCNAMEsError {
fn from(err: XmlParseError) -> SwapEnvironmentCNAMEsError {
let XmlParseError(message) = err;
SwapEnvironmentCNAMEsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for SwapEnvironmentCNAMEsError {
fn from(err: CredentialsError) -> SwapEnvironmentCNAMEsError {
SwapEnvironmentCNAMEsError::Credentials(err)
}
}
impl From<HttpDispatchError> for SwapEnvironmentCNAMEsError {
fn from(err: HttpDispatchError) -> SwapEnvironmentCNAMEsError {
SwapEnvironmentCNAMEsError::HttpDispatch(err)
}
}
impl From<io::Error> for SwapEnvironmentCNAMEsError {
fn from(err: io::Error) -> SwapEnvironmentCNAMEsError {
SwapEnvironmentCNAMEsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for SwapEnvironmentCNAMEsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SwapEnvironmentCNAMEsError {
fn description(&self) -> &str {
match *self {
SwapEnvironmentCNAMEsError::Validation(ref cause) => cause,
SwapEnvironmentCNAMEsError::Credentials(ref err) => err.description(),
SwapEnvironmentCNAMEsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
SwapEnvironmentCNAMEsError::ParseError(ref cause) => cause,
SwapEnvironmentCNAMEsError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum TerminateEnvironmentError {
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl TerminateEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> TerminateEnvironmentError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return TerminateEnvironmentError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
TerminateEnvironmentError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for TerminateEnvironmentError {
fn from(err: XmlParseError) -> TerminateEnvironmentError {
let XmlParseError(message) = err;
TerminateEnvironmentError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for TerminateEnvironmentError {
fn from(err: CredentialsError) -> TerminateEnvironmentError {
TerminateEnvironmentError::Credentials(err)
}
}
impl From<HttpDispatchError> for TerminateEnvironmentError {
fn from(err: HttpDispatchError) -> TerminateEnvironmentError {
TerminateEnvironmentError::HttpDispatch(err)
}
}
impl From<io::Error> for TerminateEnvironmentError {
fn from(err: io::Error) -> TerminateEnvironmentError {
TerminateEnvironmentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for TerminateEnvironmentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TerminateEnvironmentError {
fn description(&self) -> &str {
match *self {
TerminateEnvironmentError::InsufficientPrivileges(ref cause) => cause,
TerminateEnvironmentError::Validation(ref cause) => cause,
TerminateEnvironmentError::Credentials(ref err) => err.description(),
TerminateEnvironmentError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
TerminateEnvironmentError::ParseError(ref cause) => cause,
TerminateEnvironmentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApplicationError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateApplicationError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
UpdateApplicationError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for UpdateApplicationError {
fn from(err: XmlParseError) -> UpdateApplicationError {
let XmlParseError(message) = err;
UpdateApplicationError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for UpdateApplicationError {
fn from(err: CredentialsError) -> UpdateApplicationError {
UpdateApplicationError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateApplicationError {
fn from(err: HttpDispatchError) -> UpdateApplicationError {
UpdateApplicationError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateApplicationError {
fn from(err: io::Error) -> UpdateApplicationError {
UpdateApplicationError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApplicationError {
fn description(&self) -> &str {
match *self {
UpdateApplicationError::Validation(ref cause) => cause,
UpdateApplicationError::Credentials(ref err) => err.description(),
UpdateApplicationError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateApplicationError::ParseError(ref cause) => cause,
UpdateApplicationError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApplicationResourceLifecycleError {
InsufficientPrivileges(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateApplicationResourceLifecycleError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateApplicationResourceLifecycleError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return UpdateApplicationResourceLifecycleError::InsufficientPrivileges(
String::from(parsed_error.message),
);
}
_ => {}
}
}
}
UpdateApplicationResourceLifecycleError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for UpdateApplicationResourceLifecycleError {
fn from(err: XmlParseError) -> UpdateApplicationResourceLifecycleError {
let XmlParseError(message) = err;
UpdateApplicationResourceLifecycleError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for UpdateApplicationResourceLifecycleError {
fn from(err: CredentialsError) -> UpdateApplicationResourceLifecycleError {
UpdateApplicationResourceLifecycleError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateApplicationResourceLifecycleError {
fn from(err: HttpDispatchError) -> UpdateApplicationResourceLifecycleError {
UpdateApplicationResourceLifecycleError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateApplicationResourceLifecycleError {
fn from(err: io::Error) -> UpdateApplicationResourceLifecycleError {
UpdateApplicationResourceLifecycleError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateApplicationResourceLifecycleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApplicationResourceLifecycleError {
fn description(&self) -> &str {
match *self {
UpdateApplicationResourceLifecycleError::InsufficientPrivileges(ref cause) => cause,
UpdateApplicationResourceLifecycleError::Validation(ref cause) => cause,
UpdateApplicationResourceLifecycleError::Credentials(ref err) => err.description(),
UpdateApplicationResourceLifecycleError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateApplicationResourceLifecycleError::ParseError(ref cause) => cause,
UpdateApplicationResourceLifecycleError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApplicationVersionError {
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateApplicationVersionError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateApplicationVersionError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
_ => {}
}
}
}
UpdateApplicationVersionError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for UpdateApplicationVersionError {
fn from(err: XmlParseError) -> UpdateApplicationVersionError {
let XmlParseError(message) = err;
UpdateApplicationVersionError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for UpdateApplicationVersionError {
fn from(err: CredentialsError) -> UpdateApplicationVersionError {
UpdateApplicationVersionError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateApplicationVersionError {
fn from(err: HttpDispatchError) -> UpdateApplicationVersionError {
UpdateApplicationVersionError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateApplicationVersionError {
fn from(err: io::Error) -> UpdateApplicationVersionError {
UpdateApplicationVersionError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateApplicationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApplicationVersionError {
fn description(&self) -> &str {
match *self {
UpdateApplicationVersionError::Validation(ref cause) => cause,
UpdateApplicationVersionError::Credentials(ref err) => err.description(),
UpdateApplicationVersionError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateApplicationVersionError::ParseError(ref cause) => cause,
UpdateApplicationVersionError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConfigurationTemplateError {
InsufficientPrivileges(String),
TooManyBuckets(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateConfigurationTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateConfigurationTemplateError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return UpdateConfigurationTemplateError::InsufficientPrivileges(
String::from(parsed_error.message),
);
}
"TooManyBucketsException" => {
return UpdateConfigurationTemplateError::TooManyBuckets(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
UpdateConfigurationTemplateError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for UpdateConfigurationTemplateError {
fn from(err: XmlParseError) -> UpdateConfigurationTemplateError {
let XmlParseError(message) = err;
UpdateConfigurationTemplateError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for UpdateConfigurationTemplateError {
fn from(err: CredentialsError) -> UpdateConfigurationTemplateError {
UpdateConfigurationTemplateError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateConfigurationTemplateError {
fn from(err: HttpDispatchError) -> UpdateConfigurationTemplateError {
UpdateConfigurationTemplateError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateConfigurationTemplateError {
fn from(err: io::Error) -> UpdateConfigurationTemplateError {
UpdateConfigurationTemplateError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateConfigurationTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConfigurationTemplateError {
fn description(&self) -> &str {
match *self {
UpdateConfigurationTemplateError::InsufficientPrivileges(ref cause) => cause,
UpdateConfigurationTemplateError::TooManyBuckets(ref cause) => cause,
UpdateConfigurationTemplateError::Validation(ref cause) => cause,
UpdateConfigurationTemplateError::Credentials(ref err) => err.description(),
UpdateConfigurationTemplateError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateConfigurationTemplateError::ParseError(ref cause) => cause,
UpdateConfigurationTemplateError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateEnvironmentError {
InsufficientPrivileges(String),
TooManyBuckets(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateEnvironmentError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return UpdateEnvironmentError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"TooManyBucketsException" => {
return UpdateEnvironmentError::TooManyBuckets(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
UpdateEnvironmentError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for UpdateEnvironmentError {
fn from(err: XmlParseError) -> UpdateEnvironmentError {
let XmlParseError(message) = err;
UpdateEnvironmentError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for UpdateEnvironmentError {
fn from(err: CredentialsError) -> UpdateEnvironmentError {
UpdateEnvironmentError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateEnvironmentError {
fn from(err: HttpDispatchError) -> UpdateEnvironmentError {
UpdateEnvironmentError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateEnvironmentError {
fn from(err: io::Error) -> UpdateEnvironmentError {
UpdateEnvironmentError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateEnvironmentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateEnvironmentError {
fn description(&self) -> &str {
match *self {
UpdateEnvironmentError::InsufficientPrivileges(ref cause) => cause,
UpdateEnvironmentError::TooManyBuckets(ref cause) => cause,
UpdateEnvironmentError::Validation(ref cause) => cause,
UpdateEnvironmentError::Credentials(ref err) => err.description(),
UpdateEnvironmentError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateEnvironmentError::ParseError(ref cause) => cause,
UpdateEnvironmentError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTagsForResourceError {
InsufficientPrivileges(String),
OperationInProgress(String),
ResourceNotFound(String),
ResourceTypeNotSupported(String),
TooManyTags(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl UpdateTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> UpdateTagsForResourceError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return UpdateTagsForResourceError::InsufficientPrivileges(String::from(
parsed_error.message,
));
}
"OperationInProgressFailure" => {
return UpdateTagsForResourceError::OperationInProgress(String::from(
parsed_error.message,
));
}
"ResourceNotFoundException" => {
return UpdateTagsForResourceError::ResourceNotFound(String::from(
parsed_error.message,
));
}
"ResourceTypeNotSupportedException" => {
return UpdateTagsForResourceError::ResourceTypeNotSupported(String::from(
parsed_error.message,
));
}
"TooManyTagsException" => {
return UpdateTagsForResourceError::TooManyTags(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
UpdateTagsForResourceError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for UpdateTagsForResourceError {
fn from(err: XmlParseError) -> UpdateTagsForResourceError {
let XmlParseError(message) = err;
UpdateTagsForResourceError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for UpdateTagsForResourceError {
fn from(err: CredentialsError) -> UpdateTagsForResourceError {
UpdateTagsForResourceError::Credentials(err)
}
}
impl From<HttpDispatchError> for UpdateTagsForResourceError {
fn from(err: HttpDispatchError) -> UpdateTagsForResourceError {
UpdateTagsForResourceError::HttpDispatch(err)
}
}
impl From<io::Error> for UpdateTagsForResourceError {
fn from(err: io::Error) -> UpdateTagsForResourceError {
UpdateTagsForResourceError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for UpdateTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTagsForResourceError {
fn description(&self) -> &str {
match *self {
UpdateTagsForResourceError::InsufficientPrivileges(ref cause) => cause,
UpdateTagsForResourceError::OperationInProgress(ref cause) => cause,
UpdateTagsForResourceError::ResourceNotFound(ref cause) => cause,
UpdateTagsForResourceError::ResourceTypeNotSupported(ref cause) => cause,
UpdateTagsForResourceError::TooManyTags(ref cause) => cause,
UpdateTagsForResourceError::Validation(ref cause) => cause,
UpdateTagsForResourceError::Credentials(ref err) => err.description(),
UpdateTagsForResourceError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
UpdateTagsForResourceError::ParseError(ref cause) => cause,
UpdateTagsForResourceError::Unknown(_) => "unknown error",
}
}
}
#[derive(Debug, PartialEq)]
pub enum ValidateConfigurationSettingsError {
InsufficientPrivileges(String),
TooManyBuckets(String),
HttpDispatch(HttpDispatchError),
Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(BufferedHttpResponse),
}
impl ValidateConfigurationSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> ValidateConfigurationSettingsError {
{
let reader = EventReader::new(res.body.as_slice());
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[..] {
"InsufficientPrivilegesException" => {
return ValidateConfigurationSettingsError::InsufficientPrivileges(
String::from(parsed_error.message),
);
}
"TooManyBucketsException" => {
return ValidateConfigurationSettingsError::TooManyBuckets(String::from(
parsed_error.message,
));
}
_ => {}
}
}
}
ValidateConfigurationSettingsError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl From<XmlParseError> for ValidateConfigurationSettingsError {
fn from(err: XmlParseError) -> ValidateConfigurationSettingsError {
let XmlParseError(message) = err;
ValidateConfigurationSettingsError::ParseError(message.to_string())
}
}
impl From<CredentialsError> for ValidateConfigurationSettingsError {
fn from(err: CredentialsError) -> ValidateConfigurationSettingsError {
ValidateConfigurationSettingsError::Credentials(err)
}
}
impl From<HttpDispatchError> for ValidateConfigurationSettingsError {
fn from(err: HttpDispatchError) -> ValidateConfigurationSettingsError {
ValidateConfigurationSettingsError::HttpDispatch(err)
}
}
impl From<io::Error> for ValidateConfigurationSettingsError {
fn from(err: io::Error) -> ValidateConfigurationSettingsError {
ValidateConfigurationSettingsError::HttpDispatch(HttpDispatchError::from(err))
}
}
impl fmt::Display for ValidateConfigurationSettingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ValidateConfigurationSettingsError {
fn description(&self) -> &str {
match *self {
ValidateConfigurationSettingsError::InsufficientPrivileges(ref cause) => cause,
ValidateConfigurationSettingsError::TooManyBuckets(ref cause) => cause,
ValidateConfigurationSettingsError::Validation(ref cause) => cause,
ValidateConfigurationSettingsError::Credentials(ref err) => err.description(),
ValidateConfigurationSettingsError::HttpDispatch(ref dispatch_error) => {
dispatch_error.description()
}
ValidateConfigurationSettingsError::ParseError(ref cause) => cause,
ValidateConfigurationSettingsError::Unknown(_) => "unknown error",
}
}
}
pub trait ElasticBeanstalk {
fn abort_environment_update(
&self,
input: AbortEnvironmentUpdateMessage,
) -> RusotoFuture<(), AbortEnvironmentUpdateError>;
fn apply_environment_managed_action(
&self,
input: ApplyEnvironmentManagedActionRequest,
) -> RusotoFuture<ApplyEnvironmentManagedActionResult, ApplyEnvironmentManagedActionError>;
fn check_dns_availability(
&self,
input: CheckDNSAvailabilityMessage,
) -> RusotoFuture<CheckDNSAvailabilityResultMessage, CheckDNSAvailabilityError>;
fn compose_environments(
&self,
input: ComposeEnvironmentsMessage,
) -> RusotoFuture<EnvironmentDescriptionsMessage, ComposeEnvironmentsError>;
fn create_application(
&self,
input: CreateApplicationMessage,
) -> RusotoFuture<ApplicationDescriptionMessage, CreateApplicationError>;
fn create_application_version(
&self,
input: CreateApplicationVersionMessage,
) -> RusotoFuture<ApplicationVersionDescriptionMessage, CreateApplicationVersionError>;
fn create_configuration_template(
&self,
input: CreateConfigurationTemplateMessage,
) -> RusotoFuture<ConfigurationSettingsDescription, CreateConfigurationTemplateError>;
fn create_environment(
&self,
input: CreateEnvironmentMessage,
) -> RusotoFuture<EnvironmentDescription, CreateEnvironmentError>;
fn create_platform_version(
&self,
input: CreatePlatformVersionRequest,
) -> RusotoFuture<CreatePlatformVersionResult, CreatePlatformVersionError>;
fn create_storage_location(
&self,
) -> RusotoFuture<CreateStorageLocationResultMessage, CreateStorageLocationError>;
fn delete_application(
&self,
input: DeleteApplicationMessage,
) -> RusotoFuture<(), DeleteApplicationError>;
fn delete_application_version(
&self,
input: DeleteApplicationVersionMessage,
) -> RusotoFuture<(), DeleteApplicationVersionError>;
fn delete_configuration_template(
&self,
input: DeleteConfigurationTemplateMessage,
) -> RusotoFuture<(), DeleteConfigurationTemplateError>;
fn delete_environment_configuration(
&self,
input: DeleteEnvironmentConfigurationMessage,
) -> RusotoFuture<(), DeleteEnvironmentConfigurationError>;
fn delete_platform_version(
&self,
input: DeletePlatformVersionRequest,
) -> RusotoFuture<DeletePlatformVersionResult, DeletePlatformVersionError>;
fn describe_account_attributes(
&self,
) -> RusotoFuture<DescribeAccountAttributesResult, DescribeAccountAttributesError>;
fn describe_application_versions(
&self,
input: DescribeApplicationVersionsMessage,
) -> RusotoFuture<ApplicationVersionDescriptionsMessage, DescribeApplicationVersionsError>;
fn describe_applications(
&self,
input: DescribeApplicationsMessage,
) -> RusotoFuture<ApplicationDescriptionsMessage, DescribeApplicationsError>;
fn describe_configuration_options(
&self,
input: DescribeConfigurationOptionsMessage,
) -> RusotoFuture<ConfigurationOptionsDescription, DescribeConfigurationOptionsError>;
fn describe_configuration_settings(
&self,
input: DescribeConfigurationSettingsMessage,
) -> RusotoFuture<ConfigurationSettingsDescriptions, DescribeConfigurationSettingsError>;
fn describe_environment_health(
&self,
input: DescribeEnvironmentHealthRequest,
) -> RusotoFuture<DescribeEnvironmentHealthResult, DescribeEnvironmentHealthError>;
fn describe_environment_managed_action_history(
&self,
input: DescribeEnvironmentManagedActionHistoryRequest,
) -> RusotoFuture<
DescribeEnvironmentManagedActionHistoryResult,
DescribeEnvironmentManagedActionHistoryError,
>;
fn describe_environment_managed_actions(
&self,
input: DescribeEnvironmentManagedActionsRequest,
) -> RusotoFuture<DescribeEnvironmentManagedActionsResult, DescribeEnvironmentManagedActionsError>;
fn describe_environment_resources(
&self,
input: DescribeEnvironmentResourcesMessage,
) -> RusotoFuture<EnvironmentResourceDescriptionsMessage, DescribeEnvironmentResourcesError>;
fn describe_environments(
&self,
input: DescribeEnvironmentsMessage,
) -> RusotoFuture<EnvironmentDescriptionsMessage, DescribeEnvironmentsError>;
fn describe_events(
&self,
input: DescribeEventsMessage,
) -> RusotoFuture<EventDescriptionsMessage, DescribeEventsError>;
fn describe_instances_health(
&self,
input: DescribeInstancesHealthRequest,
) -> RusotoFuture<DescribeInstancesHealthResult, DescribeInstancesHealthError>;
fn describe_platform_version(
&self,
input: DescribePlatformVersionRequest,
) -> RusotoFuture<DescribePlatformVersionResult, DescribePlatformVersionError>;
fn list_available_solution_stacks(
&self,
) -> RusotoFuture<ListAvailableSolutionStacksResultMessage, ListAvailableSolutionStacksError>;
fn list_platform_versions(
&self,
input: ListPlatformVersionsRequest,
) -> RusotoFuture<ListPlatformVersionsResult, ListPlatformVersionsError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceMessage,
) -> RusotoFuture<ResourceTagsDescriptionMessage, ListTagsForResourceError>;
fn rebuild_environment(
&self,
input: RebuildEnvironmentMessage,
) -> RusotoFuture<(), RebuildEnvironmentError>;
fn request_environment_info(
&self,
input: RequestEnvironmentInfoMessage,
) -> RusotoFuture<(), RequestEnvironmentInfoError>;
fn restart_app_server(
&self,
input: RestartAppServerMessage,
) -> RusotoFuture<(), RestartAppServerError>;
fn retrieve_environment_info(
&self,
input: RetrieveEnvironmentInfoMessage,
) -> RusotoFuture<RetrieveEnvironmentInfoResultMessage, RetrieveEnvironmentInfoError>;
fn swap_environment_cnam_es(
&self,
input: SwapEnvironmentCNAMEsMessage,
) -> RusotoFuture<(), SwapEnvironmentCNAMEsError>;
fn terminate_environment(
&self,
input: TerminateEnvironmentMessage,
) -> RusotoFuture<EnvironmentDescription, TerminateEnvironmentError>;
fn update_application(
&self,
input: UpdateApplicationMessage,
) -> RusotoFuture<ApplicationDescriptionMessage, UpdateApplicationError>;
fn update_application_resource_lifecycle(
&self,
input: UpdateApplicationResourceLifecycleMessage,
) -> RusotoFuture<
ApplicationResourceLifecycleDescriptionMessage,
UpdateApplicationResourceLifecycleError,
>;
fn update_application_version(
&self,
input: UpdateApplicationVersionMessage,
) -> RusotoFuture<ApplicationVersionDescriptionMessage, UpdateApplicationVersionError>;
fn update_configuration_template(
&self,
input: UpdateConfigurationTemplateMessage,
) -> RusotoFuture<ConfigurationSettingsDescription, UpdateConfigurationTemplateError>;
fn update_environment(
&self,
input: UpdateEnvironmentMessage,
) -> RusotoFuture<EnvironmentDescription, UpdateEnvironmentError>;
fn update_tags_for_resource(
&self,
input: UpdateTagsForResourceMessage,
) -> RusotoFuture<(), UpdateTagsForResourceError>;
fn validate_configuration_settings(
&self,
input: ValidateConfigurationSettingsMessage,
) -> RusotoFuture<ConfigurationSettingsValidationMessages, ValidateConfigurationSettingsError>;
}
#[derive(Clone)]
pub struct ElasticBeanstalkClient {
client: Client,
region: region::Region,
}
impl ElasticBeanstalkClient {
pub fn new(region: region::Region) -> ElasticBeanstalkClient {
ElasticBeanstalkClient {
client: Client::shared(),
region: region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> ElasticBeanstalkClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
ElasticBeanstalkClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region: region,
}
}
}
impl ElasticBeanstalk for ElasticBeanstalkClient {
fn abort_environment_update(
&self,
input: AbortEnvironmentUpdateMessage,
) -> RusotoFuture<(), AbortEnvironmentUpdateError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AbortEnvironmentUpdate");
params.put("Version", "2010-12-01");
AbortEnvironmentUpdateMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(AbortEnvironmentUpdateError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn apply_environment_managed_action(
&self,
input: ApplyEnvironmentManagedActionRequest,
) -> RusotoFuture<ApplyEnvironmentManagedActionResult, ApplyEnvironmentManagedActionError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ApplyEnvironmentManagedAction");
params.put("Version", "2010-12-01");
ApplyEnvironmentManagedActionRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(ApplyEnvironmentManagedActionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplyEnvironmentManagedActionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplyEnvironmentManagedActionResultDeserializer::deserialize(
"ApplyEnvironmentManagedActionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn check_dns_availability(
&self,
input: CheckDNSAvailabilityMessage,
) -> RusotoFuture<CheckDNSAvailabilityResultMessage, CheckDNSAvailabilityError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CheckDNSAvailability");
params.put("Version", "2010-12-01");
CheckDNSAvailabilityMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(CheckDNSAvailabilityError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CheckDNSAvailabilityResultMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CheckDNSAvailabilityResultMessageDeserializer::deserialize(
"CheckDNSAvailabilityResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn compose_environments(
&self,
input: ComposeEnvironmentsMessage,
) -> RusotoFuture<EnvironmentDescriptionsMessage, ComposeEnvironmentsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ComposeEnvironments");
params.put("Version", "2010-12-01");
ComposeEnvironmentsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(ComposeEnvironmentsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EnvironmentDescriptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EnvironmentDescriptionsMessageDeserializer::deserialize(
"ComposeEnvironmentsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_application(
&self,
input: CreateApplicationMessage,
) -> RusotoFuture<ApplicationDescriptionMessage, CreateApplicationError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateApplication");
params.put("Version", "2010-12-01");
CreateApplicationMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(CreateApplicationError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplicationDescriptionMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplicationDescriptionMessageDeserializer::deserialize(
"CreateApplicationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_application_version(
&self,
input: CreateApplicationVersionMessage,
) -> RusotoFuture<ApplicationVersionDescriptionMessage, CreateApplicationVersionError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateApplicationVersion");
params.put("Version", "2010-12-01");
CreateApplicationVersionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(CreateApplicationVersionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplicationVersionDescriptionMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplicationVersionDescriptionMessageDeserializer::deserialize(
"CreateApplicationVersionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_configuration_template(
&self,
input: CreateConfigurationTemplateMessage,
) -> RusotoFuture<ConfigurationSettingsDescription, CreateConfigurationTemplateError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateConfigurationTemplate");
params.put("Version", "2010-12-01");
CreateConfigurationTemplateMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(CreateConfigurationTemplateError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ConfigurationSettingsDescription::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ConfigurationSettingsDescriptionDeserializer::deserialize(
"CreateConfigurationTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_environment(
&self,
input: CreateEnvironmentMessage,
) -> RusotoFuture<EnvironmentDescription, CreateEnvironmentError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateEnvironment");
params.put("Version", "2010-12-01");
CreateEnvironmentMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(CreateEnvironmentError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EnvironmentDescription::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EnvironmentDescriptionDeserializer::deserialize(
"CreateEnvironmentResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_platform_version(
&self,
input: CreatePlatformVersionRequest,
) -> RusotoFuture<CreatePlatformVersionResult, CreatePlatformVersionError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreatePlatformVersion");
params.put("Version", "2010-12-01");
CreatePlatformVersionRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(CreatePlatformVersionError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreatePlatformVersionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreatePlatformVersionResultDeserializer::deserialize(
"CreatePlatformVersionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_storage_location(
&self,
) -> RusotoFuture<CreateStorageLocationResultMessage, CreateStorageLocationError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateStorageLocation");
params.put("Version", "2010-12-01");
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(CreateStorageLocationError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateStorageLocationResultMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateStorageLocationResultMessageDeserializer::deserialize(
"CreateStorageLocationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_application(
&self,
input: DeleteApplicationMessage,
) -> RusotoFuture<(), DeleteApplicationError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteApplication");
params.put("Version", "2010-12-01");
DeleteApplicationMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DeleteApplicationError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_application_version(
&self,
input: DeleteApplicationVersionMessage,
) -> RusotoFuture<(), DeleteApplicationVersionError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteApplicationVersion");
params.put("Version", "2010-12-01");
DeleteApplicationVersionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DeleteApplicationVersionError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_configuration_template(
&self,
input: DeleteConfigurationTemplateMessage,
) -> RusotoFuture<(), DeleteConfigurationTemplateError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteConfigurationTemplate");
params.put("Version", "2010-12-01");
DeleteConfigurationTemplateMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DeleteConfigurationTemplateError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_environment_configuration(
&self,
input: DeleteEnvironmentConfigurationMessage,
) -> RusotoFuture<(), DeleteEnvironmentConfigurationError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteEnvironmentConfiguration");
params.put("Version", "2010-12-01");
DeleteEnvironmentConfigurationMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DeleteEnvironmentConfigurationError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_platform_version(
&self,
input: DeletePlatformVersionRequest,
) -> RusotoFuture<DeletePlatformVersionResult, DeletePlatformVersionError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeletePlatformVersion");
params.put("Version", "2010-12-01");
DeletePlatformVersionRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DeletePlatformVersionError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeletePlatformVersionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeletePlatformVersionResultDeserializer::deserialize(
"DeletePlatformVersionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_account_attributes(
&self,
) -> RusotoFuture<DescribeAccountAttributesResult, DescribeAccountAttributesError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeAccountAttributes");
params.put("Version", "2010-12-01");
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeAccountAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeAccountAttributesResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeAccountAttributesResultDeserializer::deserialize(
"DescribeAccountAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_application_versions(
&self,
input: DescribeApplicationVersionsMessage,
) -> RusotoFuture<ApplicationVersionDescriptionsMessage, DescribeApplicationVersionsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeApplicationVersions");
params.put("Version", "2010-12-01");
DescribeApplicationVersionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeApplicationVersionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplicationVersionDescriptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplicationVersionDescriptionsMessageDeserializer::deserialize(
"DescribeApplicationVersionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_applications(
&self,
input: DescribeApplicationsMessage,
) -> RusotoFuture<ApplicationDescriptionsMessage, DescribeApplicationsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeApplications");
params.put("Version", "2010-12-01");
DescribeApplicationsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeApplicationsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplicationDescriptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplicationDescriptionsMessageDeserializer::deserialize(
"DescribeApplicationsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_configuration_options(
&self,
input: DescribeConfigurationOptionsMessage,
) -> RusotoFuture<ConfigurationOptionsDescription, DescribeConfigurationOptionsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeConfigurationOptions");
params.put("Version", "2010-12-01");
DescribeConfigurationOptionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeConfigurationOptionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ConfigurationOptionsDescription::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ConfigurationOptionsDescriptionDeserializer::deserialize(
"DescribeConfigurationOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_configuration_settings(
&self,
input: DescribeConfigurationSettingsMessage,
) -> RusotoFuture<ConfigurationSettingsDescriptions, DescribeConfigurationSettingsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeConfigurationSettings");
params.put("Version", "2010-12-01");
DescribeConfigurationSettingsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeConfigurationSettingsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ConfigurationSettingsDescriptions::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ConfigurationSettingsDescriptionsDeserializer::deserialize(
"DescribeConfigurationSettingsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_environment_health(
&self,
input: DescribeEnvironmentHealthRequest,
) -> RusotoFuture<DescribeEnvironmentHealthResult, DescribeEnvironmentHealthError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEnvironmentHealth");
params.put("Version", "2010-12-01");
DescribeEnvironmentHealthRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeEnvironmentHealthError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEnvironmentHealthResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeEnvironmentHealthResultDeserializer::deserialize(
"DescribeEnvironmentHealthResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_environment_managed_action_history(
&self,
input: DescribeEnvironmentManagedActionHistoryRequest,
) -> RusotoFuture<
DescribeEnvironmentManagedActionHistoryResult,
DescribeEnvironmentManagedActionHistoryError,
> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEnvironmentManagedActionHistory");
params.put("Version", "2010-12-01");
DescribeEnvironmentManagedActionHistoryRequestSerializer::serialize(
&mut params,
"",
&input,
);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeEnvironmentManagedActionHistoryError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEnvironmentManagedActionHistoryResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
DescribeEnvironmentManagedActionHistoryResultDeserializer::deserialize(
"DescribeEnvironmentManagedActionHistoryResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_environment_managed_actions(
&self,
input: DescribeEnvironmentManagedActionsRequest,
) -> RusotoFuture<DescribeEnvironmentManagedActionsResult, DescribeEnvironmentManagedActionsError>
{
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEnvironmentManagedActions");
params.put("Version", "2010-12-01");
DescribeEnvironmentManagedActionsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeEnvironmentManagedActionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEnvironmentManagedActionsResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeEnvironmentManagedActionsResultDeserializer::deserialize(
"DescribeEnvironmentManagedActionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_environment_resources(
&self,
input: DescribeEnvironmentResourcesMessage,
) -> RusotoFuture<EnvironmentResourceDescriptionsMessage, DescribeEnvironmentResourcesError>
{
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEnvironmentResources");
params.put("Version", "2010-12-01");
DescribeEnvironmentResourcesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeEnvironmentResourcesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EnvironmentResourceDescriptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EnvironmentResourceDescriptionsMessageDeserializer::deserialize(
"DescribeEnvironmentResourcesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_environments(
&self,
input: DescribeEnvironmentsMessage,
) -> RusotoFuture<EnvironmentDescriptionsMessage, DescribeEnvironmentsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEnvironments");
params.put("Version", "2010-12-01");
DescribeEnvironmentsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeEnvironmentsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EnvironmentDescriptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EnvironmentDescriptionsMessageDeserializer::deserialize(
"DescribeEnvironmentsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_events(
&self,
input: DescribeEventsMessage,
) -> RusotoFuture<EventDescriptionsMessage, DescribeEventsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEvents");
params.put("Version", "2010-12-01");
DescribeEventsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeEventsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EventDescriptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EventDescriptionsMessageDeserializer::deserialize(
"DescribeEventsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_instances_health(
&self,
input: DescribeInstancesHealthRequest,
) -> RusotoFuture<DescribeInstancesHealthResult, DescribeInstancesHealthError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeInstancesHealth");
params.put("Version", "2010-12-01");
DescribeInstancesHealthRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribeInstancesHealthError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeInstancesHealthResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeInstancesHealthResultDeserializer::deserialize(
"DescribeInstancesHealthResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_platform_version(
&self,
input: DescribePlatformVersionRequest,
) -> RusotoFuture<DescribePlatformVersionResult, DescribePlatformVersionError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribePlatformVersion");
params.put("Version", "2010-12-01");
DescribePlatformVersionRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(DescribePlatformVersionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribePlatformVersionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribePlatformVersionResultDeserializer::deserialize(
"DescribePlatformVersionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_available_solution_stacks(
&self,
) -> RusotoFuture<ListAvailableSolutionStacksResultMessage, ListAvailableSolutionStacksError>
{
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListAvailableSolutionStacks");
params.put("Version", "2010-12-01");
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(ListAvailableSolutionStacksError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListAvailableSolutionStacksResultMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListAvailableSolutionStacksResultMessageDeserializer::deserialize(
"ListAvailableSolutionStacksResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_platform_versions(
&self,
input: ListPlatformVersionsRequest,
) -> RusotoFuture<ListPlatformVersionsResult, ListPlatformVersionsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListPlatformVersions");
params.put("Version", "2010-12-01");
ListPlatformVersionsRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(ListPlatformVersionsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListPlatformVersionsResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ListPlatformVersionsResultDeserializer::deserialize(
"ListPlatformVersionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceMessage,
) -> RusotoFuture<ResourceTagsDescriptionMessage, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListTagsForResource");
params.put("Version", "2010-12-01");
ListTagsForResourceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(ListTagsForResourceError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ResourceTagsDescriptionMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ResourceTagsDescriptionMessageDeserializer::deserialize(
"ListTagsForResourceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn rebuild_environment(
&self,
input: RebuildEnvironmentMessage,
) -> RusotoFuture<(), RebuildEnvironmentError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RebuildEnvironment");
params.put("Version", "2010-12-01");
RebuildEnvironmentMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(RebuildEnvironmentError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn request_environment_info(
&self,
input: RequestEnvironmentInfoMessage,
) -> RusotoFuture<(), RequestEnvironmentInfoError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RequestEnvironmentInfo");
params.put("Version", "2010-12-01");
RequestEnvironmentInfoMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(RequestEnvironmentInfoError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn restart_app_server(
&self,
input: RestartAppServerMessage,
) -> RusotoFuture<(), RestartAppServerError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestartAppServer");
params.put("Version", "2010-12-01");
RestartAppServerMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(RestartAppServerError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn retrieve_environment_info(
&self,
input: RetrieveEnvironmentInfoMessage,
) -> RusotoFuture<RetrieveEnvironmentInfoResultMessage, RetrieveEnvironmentInfoError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RetrieveEnvironmentInfo");
params.put("Version", "2010-12-01");
RetrieveEnvironmentInfoMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(RetrieveEnvironmentInfoError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RetrieveEnvironmentInfoResultMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = RetrieveEnvironmentInfoResultMessageDeserializer::deserialize(
"RetrieveEnvironmentInfoResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn swap_environment_cnam_es(
&self,
input: SwapEnvironmentCNAMEsMessage,
) -> RusotoFuture<(), SwapEnvironmentCNAMEsError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SwapEnvironmentCNAMEs");
params.put("Version", "2010-12-01");
SwapEnvironmentCNAMEsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(SwapEnvironmentCNAMEsError::from_response(response))
}),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn terminate_environment(
&self,
input: TerminateEnvironmentMessage,
) -> RusotoFuture<EnvironmentDescription, TerminateEnvironmentError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "TerminateEnvironment");
params.put("Version", "2010-12-01");
TerminateEnvironmentMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(TerminateEnvironmentError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EnvironmentDescription::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EnvironmentDescriptionDeserializer::deserialize(
"TerminateEnvironmentResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_application(
&self,
input: UpdateApplicationMessage,
) -> RusotoFuture<ApplicationDescriptionMessage, UpdateApplicationError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateApplication");
params.put("Version", "2010-12-01");
UpdateApplicationMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(UpdateApplicationError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplicationDescriptionMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplicationDescriptionMessageDeserializer::deserialize(
"UpdateApplicationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_application_resource_lifecycle(
&self,
input: UpdateApplicationResourceLifecycleMessage,
) -> RusotoFuture<
ApplicationResourceLifecycleDescriptionMessage,
UpdateApplicationResourceLifecycleError,
> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateApplicationResourceLifecycle");
params.put("Version", "2010-12-01");
UpdateApplicationResourceLifecycleMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(UpdateApplicationResourceLifecycleError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplicationResourceLifecycleDescriptionMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
ApplicationResourceLifecycleDescriptionMessageDeserializer::deserialize(
"UpdateApplicationResourceLifecycleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_application_version(
&self,
input: UpdateApplicationVersionMessage,
) -> RusotoFuture<ApplicationVersionDescriptionMessage, UpdateApplicationVersionError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateApplicationVersion");
params.put("Version", "2010-12-01");
UpdateApplicationVersionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(UpdateApplicationVersionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplicationVersionDescriptionMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplicationVersionDescriptionMessageDeserializer::deserialize(
"UpdateApplicationVersionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_configuration_template(
&self,
input: UpdateConfigurationTemplateMessage,
) -> RusotoFuture<ConfigurationSettingsDescription, UpdateConfigurationTemplateError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateConfigurationTemplate");
params.put("Version", "2010-12-01");
UpdateConfigurationTemplateMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(UpdateConfigurationTemplateError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ConfigurationSettingsDescription::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ConfigurationSettingsDescriptionDeserializer::deserialize(
"UpdateConfigurationTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_environment(
&self,
input: UpdateEnvironmentMessage,
) -> RusotoFuture<EnvironmentDescription, UpdateEnvironmentError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateEnvironment");
params.put("Version", "2010-12-01");
UpdateEnvironmentMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(UpdateEnvironmentError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EnvironmentDescription::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EnvironmentDescriptionDeserializer::deserialize(
"UpdateEnvironmentResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_tags_for_resource(
&self,
input: UpdateTagsForResourceMessage,
) -> RusotoFuture<(), UpdateTagsForResourceError> {
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateTagsForResource");
params.put("Version", "2010-12-01");
UpdateTagsForResourceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(UpdateTagsForResourceError::from_response(response))
}),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn validate_configuration_settings(
&self,
input: ValidateConfigurationSettingsMessage,
) -> RusotoFuture<ConfigurationSettingsValidationMessages, ValidateConfigurationSettingsError>
{
let mut request = SignedRequest::new("POST", "elasticbeanstalk", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ValidateConfigurationSettings");
params.put("Version", "2010-12-01");
ValidateConfigurationSettingsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(
serde_urlencoded::to_string(¶ms).unwrap().into_bytes(),
));
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(ValidateConfigurationSettingsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ConfigurationSettingsValidationMessages::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_slice(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ConfigurationSettingsValidationMessagesDeserializer::deserialize(
"ValidateConfigurationSettingsResult",
&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_valid_elasticbeanstalk_check_dns_availability() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-check-dns-availability.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CheckDNSAvailabilityMessage::default();
let result = client.check_dns_availability(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_create_application_version() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-create-application-version.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateApplicationVersionMessage::default();
let result = client.create_application_version(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_create_application() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-create-application.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateApplicationMessage::default();
let result = client.create_application(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_create_configuration_template() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-create-configuration-template.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateConfigurationTemplateMessage::default();
let result = client.create_configuration_template(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_create_environment() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-create-environment.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateEnvironmentMessage::default();
let result = client.create_environment(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_create_storage_location() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-create-storage-location.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let result = client.create_storage_location().sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_delete_application() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-delete-application.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DeleteApplicationMessage::default();
let result = client.delete_application(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_describe_application_versions() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-describe-application-versions.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeApplicationVersionsMessage::default();
let result = client.describe_application_versions(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_describe_applications() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-describe-applications.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeApplicationsMessage::default();
let result = client.describe_applications(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_describe_configuration_options() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-describe-configuration-options.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeConfigurationOptionsMessage::default();
let result = client.describe_configuration_options(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_describe_environments() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-describe-environments.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeEnvironmentsMessage::default();
let result = client.describe_environments(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_describe_events() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-describe-events.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeEventsMessage::default();
let result = client.describe_events(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_list_available_solution_stacks() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-list-available-solution-stacks.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let result = client.list_available_solution_stacks().sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_retrieve_environment_info() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-retrieve-environment-info.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = RetrieveEnvironmentInfoMessage::default();
let result = client.retrieve_environment_info(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_terminate_environment() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-terminate-environment.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = TerminateEnvironmentMessage::default();
let result = client.terminate_environment(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_update_application_version() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-update-application-version.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = UpdateApplicationVersionMessage::default();
let result = client.update_application_version(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_elasticbeanstalk_update_application() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"elasticbeanstalk-update-application.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
ElasticBeanstalkClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = UpdateApplicationMessage::default();
let result = client.update_application(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}