use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto::xml::error::*;
use rusoto_core::proto::xml::util::{
characters, deserialize_elements, end_element, find_start_element, peek_at_name, skip_tree,
start_element,
};
use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
use rusoto_core::signature::SignedRequest;
use serde_urlencoded;
use std::str::FromStr;
use xml::reader::ParserConfig;
use xml::EventReader;
struct ARNDeserializer;
impl ARNDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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<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<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<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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationDescription, XmlParseError> {
deserialize_elements::<_, ApplicationDescription, _>(tag_name, stack, |name, stack, obj| {
match name {
"ApplicationArn" => {
obj.application_arn = Some(ApplicationArnDeserializer::deserialize(
"ApplicationArn",
stack,
)?);
}
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"ConfigurationTemplates" => {
obj.configuration_templates.get_or_insert(vec![]).extend(
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.get_or_insert(vec![]).extend(
VersionLabelsListDeserializer::deserialize("Versions", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ApplicationDescriptionListDeserializer;
impl ApplicationDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ApplicationDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ApplicationDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationDescriptionMessage {
pub application: Option<ApplicationDescription>,
}
struct ApplicationDescriptionMessageDeserializer;
impl ApplicationDescriptionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationDescriptionMessage, XmlParseError> {
deserialize_elements::<_, ApplicationDescriptionMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Application" => {
obj.application = Some(ApplicationDescriptionDeserializer::deserialize(
"Application",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationDescriptionsMessage {
pub applications: Option<Vec<ApplicationDescription>>,
}
struct ApplicationDescriptionsMessageDeserializer;
impl ApplicationDescriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationDescriptionsMessage, XmlParseError> {
deserialize_elements::<_, ApplicationDescriptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Applications" => {
obj.applications.get_or_insert(vec![]).extend(
ApplicationDescriptionListDeserializer::deserialize(
"Applications",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationMetrics, XmlParseError> {
deserialize_elements::<_, ApplicationMetrics, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
struct ApplicationNameDeserializer;
impl ApplicationNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct 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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationResourceLifecycleConfig, XmlParseError> {
deserialize_elements::<_, ApplicationResourceLifecycleConfig, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ServiceRole" => {
obj.service_role =
Some(StringDeserializer::deserialize("ServiceRole", stack)?);
}
"VersionLifecycleConfig" => {
obj.version_lifecycle_config =
Some(ApplicationVersionLifecycleConfigDeserializer::deserialize(
"VersionLifecycleConfig",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationResourceLifecycleDescriptionMessage, XmlParseError> {
deserialize_elements::<_, ApplicationResourceLifecycleDescriptionMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ApplicationName" => {
obj.application_name = Some(ApplicationNameDeserializer::deserialize(
"ApplicationName",
stack,
)?);
}
"ResourceLifecycleConfig" => {
obj.resource_lifecycle_config =
Some(ApplicationResourceLifecycleConfigDeserializer::deserialize(
"ResourceLifecycleConfig",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ApplicationVersionArnDeserializer;
impl ApplicationVersionArnDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionDescription, XmlParseError> {
deserialize_elements::<_, ApplicationVersionDescription, _>(
tag_name,
stack,
|name, stack, obj| {
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),
}
Ok(())
},
)
}
}
struct ApplicationVersionDescriptionListDeserializer;
impl ApplicationVersionDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ApplicationVersionDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ApplicationVersionDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplicationVersionDescriptionMessage {
pub application_version: Option<ApplicationVersionDescription>,
}
struct ApplicationVersionDescriptionMessageDeserializer;
impl ApplicationVersionDescriptionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionDescriptionMessage, XmlParseError> {
deserialize_elements::<_, ApplicationVersionDescriptionMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ApplicationVersion" => {
obj.application_version =
Some(ApplicationVersionDescriptionDeserializer::deserialize(
"ApplicationVersion",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionDescriptionsMessage, XmlParseError> {
deserialize_elements::<_, ApplicationVersionDescriptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ApplicationVersions" => {
obj.application_versions.get_or_insert(vec![]).extend(
ApplicationVersionDescriptionListDeserializer::deserialize(
"ApplicationVersions",
stack,
)?,
);
}
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplicationVersionLifecycleConfig, XmlParseError> {
deserialize_elements::<_, ApplicationVersionLifecycleConfig, _>(
tag_name,
stack,
|name, stack, obj| {
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),
}
Ok(())
},
)
}
}
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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplyEnvironmentManagedActionResult, XmlParseError> {
deserialize_elements::<_, ApplyEnvironmentManagedActionResult, _>(
tag_name,
stack,
|name, stack, obj| {
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),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AutoScalingGroup {
pub name: Option<String>,
}
struct AutoScalingGroupDeserializer;
impl AutoScalingGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AutoScalingGroup, XmlParseError> {
deserialize_elements::<_, AutoScalingGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AutoScalingGroupListDeserializer;
impl AutoScalingGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AutoScalingGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AutoScalingGroupDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AvailableSolutionStackDetailsListDeserializer;
impl AvailableSolutionStackDetailsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SolutionStackDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SolutionStackDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AvailableSolutionStackNamesListDeserializer;
impl AvailableSolutionStackNamesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SolutionStackNameDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct BoxedBooleanDeserializer;
impl BoxedBooleanDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct BoxedIntDeserializer;
impl BoxedIntDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Builder {
pub arn: Option<String>,
}
struct BuilderDeserializer;
impl BuilderDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Builder, XmlParseError> {
deserialize_elements::<_, Builder, _>(tag_name, stack, |name, stack, obj| {
match name {
"ARN" => {
obj.arn = Some(ARNDeserializer::deserialize("ARN", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CPUUtilization, XmlParseError> {
deserialize_elements::<_, CPUUtilization, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
struct CauseDeserializer;
impl CauseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct CausesDeserializer;
impl CausesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(CauseDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CheckDNSAvailabilityResultMessage, XmlParseError> {
deserialize_elements::<_, CheckDNSAvailabilityResultMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Available" => {
obj.available = Some(CnameAvailabilityDeserializer::deserialize(
"Available",
stack,
)?);
}
"FullyQualifiedCNAME" => {
obj.fully_qualified_cname = Some(DNSCnameDeserializer::deserialize(
"FullyQualifiedCNAME",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct CnameAvailabilityDeserializer;
impl CnameAvailabilityDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationOptionDescription, XmlParseError> {
deserialize_elements::<_, ConfigurationOptionDescription, _>(
tag_name,
stack,
|name, stack, obj| {
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.get_or_insert(vec![]).extend(
ConfigurationOptionPossibleValuesDeserializer::deserialize(
"ValueOptions",
stack,
)?,
);
}
"ValueType" => {
obj.value_type =
Some(ConfigurationOptionValueTypeDeserializer::deserialize(
"ValueType",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ConfigurationOptionDescriptionsListDeserializer;
impl ConfigurationOptionDescriptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ConfigurationOptionDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ConfigurationOptionDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ConfigurationOptionNameDeserializer;
impl ConfigurationOptionNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationOptionPossibleValueDeserializer;
impl ConfigurationOptionPossibleValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationOptionPossibleValuesDeserializer;
impl ConfigurationOptionPossibleValuesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ConfigurationOptionPossibleValueDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationOptionSetting, XmlParseError> {
deserialize_elements::<_, ConfigurationOptionSetting, _>(
tag_name,
stack,
|name, stack, obj| {
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),
}
Ok(())
},
)
}
}
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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ConfigurationOptionSetting>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ConfigurationOptionSettingDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
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<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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationOptionsDescription, XmlParseError> {
deserialize_elements::<_, ConfigurationOptionsDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Options" => {
obj.options.get_or_insert(vec![]).extend(
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),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationSettingsDescription, XmlParseError> {
deserialize_elements::<_, ConfigurationSettingsDescription, _>(
tag_name,
stack,
|name, stack, obj| {
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.get_or_insert(vec![]).extend(
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),
}
Ok(())
},
)
}
}
struct ConfigurationSettingsDescriptionListDeserializer;
impl ConfigurationSettingsDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ConfigurationSettingsDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ConfigurationSettingsDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigurationSettingsDescriptions {
pub configuration_settings: Option<Vec<ConfigurationSettingsDescription>>,
}
struct ConfigurationSettingsDescriptionsDeserializer;
impl ConfigurationSettingsDescriptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationSettingsDescriptions, XmlParseError> {
deserialize_elements::<_, ConfigurationSettingsDescriptions, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ConfigurationSettings" => {
obj.configuration_settings.get_or_insert(vec![]).extend(
ConfigurationSettingsDescriptionListDeserializer::deserialize(
"ConfigurationSettings",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ConfigurationSettingsValidationMessages {
pub messages: Option<Vec<ValidationMessage>>,
}
struct ConfigurationSettingsValidationMessagesDeserializer;
impl ConfigurationSettingsValidationMessagesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ConfigurationSettingsValidationMessages, XmlParseError> {
deserialize_elements::<_, ConfigurationSettingsValidationMessages, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Messages" => {
obj.messages.get_or_insert(vec![]).extend(
ValidationMessagesListDeserializer::deserialize("Messages", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ConfigurationTemplateNameDeserializer;
impl ConfigurationTemplateNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ConfigurationTemplateNamesListDeserializer;
impl ConfigurationTemplateNamesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ConfigurationTemplateNameDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateApplicationMessage {
pub application_name: String,
pub description: Option<String>,
pub resource_lifecycle_config: Option<ApplicationResourceLifecycleConfig>,
pub tags: Option<Vec<Tag>>,
}
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,
);
}
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), 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 tags: Option<Vec<Tag>>,
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,
);
}
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);
}
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,
);
}
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), 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 tags: Option<Vec<Tag>>,
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,
);
}
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), 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,
pub tags: Option<Vec<Tag>>,
}
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,
);
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreatePlatformVersionResult, XmlParseError> {
deserialize_elements::<_, CreatePlatformVersionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Builder" => {
obj.builder = Some(BuilderDeserializer::deserialize("Builder", stack)?);
}
"PlatformSummary" => {
obj.platform_summary = Some(PlatformSummaryDeserializer::deserialize(
"PlatformSummary",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStorageLocationResultMessage {
pub s3_bucket: Option<String>,
}
struct CreateStorageLocationResultMessageDeserializer;
impl CreateStorageLocationResultMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateStorageLocationResultMessage, XmlParseError> {
deserialize_elements::<_, CreateStorageLocationResultMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"S3Bucket" => {
obj.s3_bucket = Some(S3BucketDeserializer::deserialize("S3Bucket", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct CreationDateDeserializer;
impl CreationDateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CustomAmi {
pub image_id: Option<String>,
pub virtualization_type: Option<String>,
}
struct CustomAmiDeserializer;
impl CustomAmiDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CustomAmi, XmlParseError> {
deserialize_elements::<_, CustomAmi, _>(tag_name, stack, |name, stack, obj| {
match name {
"ImageId" => {
obj.image_id = Some(ImageIdDeserializer::deserialize("ImageId", stack)?);
}
"VirtualizationType" => {
obj.virtualization_type = Some(VirtualizationTypeDeserializer::deserialize(
"VirtualizationType",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct CustomAmiListDeserializer;
impl CustomAmiListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<CustomAmi>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(CustomAmiDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct DNSCnameDeserializer;
impl DNSCnameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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,
);
}
}
}
#[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);
}
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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeletePlatformVersionResult, XmlParseError> {
deserialize_elements::<_, DeletePlatformVersionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PlatformSummary" => {
obj.platform_summary = Some(PlatformSummaryDeserializer::deserialize(
"PlatformSummary",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Deployment, XmlParseError> {
deserialize_elements::<_, Deployment, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
struct DeploymentTimestampDeserializer;
impl DeploymentTimestampDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccountAttributesResult {
pub resource_quotas: Option<ResourceQuotas>,
}
struct DescribeAccountAttributesResultDeserializer;
impl DescribeAccountAttributesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeAccountAttributesResult, XmlParseError> {
deserialize_elements::<_, DescribeAccountAttributesResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ResourceQuotas" => {
obj.resource_quotas = Some(ResourceQuotasDeserializer::deserialize(
"ResourceQuotas",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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);
}
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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEnvironmentHealthResult, XmlParseError> {
deserialize_elements::<_, DescribeEnvironmentHealthResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ApplicationMetrics" => {
obj.application_metrics =
Some(ApplicationMetricsDeserializer::deserialize(
"ApplicationMetrics",
stack,
)?);
}
"Causes" => {
obj.causes
.get_or_insert(vec![])
.extend(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),
}
Ok(())
},
)
}
}
#[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);
}
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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEnvironmentManagedActionHistoryResult, XmlParseError> {
deserialize_elements::<_, DescribeEnvironmentManagedActionHistoryResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ManagedActionHistoryItems" => {
obj.managed_action_history_items
.get_or_insert(vec![])
.extend(ManagedActionHistoryItemsDeserializer::deserialize(
"ManagedActionHistoryItems",
stack,
)?);
}
"NextToken" => {
obj.next_token = Some(StringDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEnvironmentManagedActionsResult, XmlParseError> {
deserialize_elements::<_, DescribeEnvironmentManagedActionsResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ManagedActions" => {
obj.managed_actions.get_or_insert(vec![]).extend(
ManagedActionsDeserializer::deserialize("ManagedActions", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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);
}
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);
}
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);
}
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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeInstancesHealthResult, XmlParseError> {
deserialize_elements::<_, DescribeInstancesHealthResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"InstanceHealthList" => {
obj.instance_health_list.get_or_insert(vec![]).extend(
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),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribePlatformVersionResult, XmlParseError> {
deserialize_elements::<_, DescribePlatformVersionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PlatformDescription" => {
obj.platform_description =
Some(PlatformDescriptionDeserializer::deserialize(
"PlatformDescription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DescriptionDeserializer;
impl DescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct Ec2InstanceIdDeserializer;
impl Ec2InstanceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EndpointURLDeserializer;
impl EndpointURLDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EnvironmentArnDeserializer;
impl EnvironmentArnDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentDescription, XmlParseError> {
deserialize_elements::<_, EnvironmentDescription, _>(tag_name, stack, |name, stack, obj| {
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.get_or_insert(vec![]).extend(
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),
}
Ok(())
})
}
}
struct EnvironmentDescriptionsListDeserializer;
impl EnvironmentDescriptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EnvironmentDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EnvironmentDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentDescriptionsMessage, XmlParseError> {
deserialize_elements::<_, EnvironmentDescriptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Environments" => {
obj.environments.get_or_insert(vec![]).extend(
EnvironmentDescriptionsListDeserializer::deserialize(
"Environments",
stack,
)?,
);
}
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct EnvironmentHealthDeserializer;
impl EnvironmentHealthDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct 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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentInfoDescription, XmlParseError> {
deserialize_elements::<_, EnvironmentInfoDescription, _>(
tag_name,
stack,
|name, stack, obj| {
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),
}
Ok(())
},
)
}
}
struct EnvironmentInfoDescriptionListDeserializer;
impl EnvironmentInfoDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EnvironmentInfoDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EnvironmentInfoDescriptionDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct EnvironmentInfoTypeDeserializer;
impl EnvironmentInfoTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnvironmentLink {
pub environment_name: Option<String>,
pub link_name: Option<String>,
}
struct EnvironmentLinkDeserializer;
impl EnvironmentLinkDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentLink, XmlParseError> {
deserialize_elements::<_, EnvironmentLink, _>(tag_name, stack, |name, stack, obj| {
match name {
"EnvironmentName" => {
obj.environment_name =
Some(StringDeserializer::deserialize("EnvironmentName", stack)?);
}
"LinkName" => {
obj.link_name = Some(StringDeserializer::deserialize("LinkName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EnvironmentLinksDeserializer;
impl EnvironmentLinksDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EnvironmentLink>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EnvironmentLinkDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct EnvironmentNameDeserializer;
impl EnvironmentNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct 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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentResourceDescription, XmlParseError> {
deserialize_elements::<_, EnvironmentResourceDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AutoScalingGroups" => {
obj.auto_scaling_groups.get_or_insert(vec![]).extend(
AutoScalingGroupListDeserializer::deserialize(
"AutoScalingGroups",
stack,
)?,
);
}
"EnvironmentName" => {
obj.environment_name = Some(EnvironmentNameDeserializer::deserialize(
"EnvironmentName",
stack,
)?);
}
"Instances" => {
obj.instances
.get_or_insert(vec![])
.extend(InstanceListDeserializer::deserialize("Instances", stack)?);
}
"LaunchConfigurations" => {
obj.launch_configurations.get_or_insert(vec![]).extend(
LaunchConfigurationListDeserializer::deserialize(
"LaunchConfigurations",
stack,
)?,
);
}
"LaunchTemplates" => {
obj.launch_templates.get_or_insert(vec![]).extend(
LaunchTemplateListDeserializer::deserialize("LaunchTemplates", stack)?,
);
}
"LoadBalancers" => {
obj.load_balancers.get_or_insert(vec![]).extend(
LoadBalancerListDeserializer::deserialize("LoadBalancers", stack)?,
);
}
"Queues" => {
obj.queues
.get_or_insert(vec![])
.extend(QueueListDeserializer::deserialize("Queues", stack)?);
}
"Triggers" => {
obj.triggers
.get_or_insert(vec![])
.extend(TriggerListDeserializer::deserialize("Triggers", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnvironmentResourceDescriptionsMessage {
pub environment_resources: Option<EnvironmentResourceDescription>,
}
struct EnvironmentResourceDescriptionsMessageDeserializer;
impl EnvironmentResourceDescriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentResourceDescriptionsMessage, XmlParseError> {
deserialize_elements::<_, EnvironmentResourceDescriptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EnvironmentResources" => {
obj.environment_resources =
Some(EnvironmentResourceDescriptionDeserializer::deserialize(
"EnvironmentResources",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnvironmentResourcesDescription {
pub load_balancer: Option<LoadBalancerDescription>,
}
struct EnvironmentResourcesDescriptionDeserializer;
impl EnvironmentResourcesDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentResourcesDescription, XmlParseError> {
deserialize_elements::<_, EnvironmentResourcesDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LoadBalancer" => {
obj.load_balancer = Some(LoadBalancerDescriptionDeserializer::deserialize(
"LoadBalancer",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct EnvironmentStatusDeserializer;
impl EnvironmentStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnvironmentTier {
pub name: Option<String>,
pub type_: Option<String>,
pub version: Option<String>,
}
struct EnvironmentTierDeserializer;
impl EnvironmentTierDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnvironmentTier, XmlParseError> {
deserialize_elements::<_, EnvironmentTier, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventDescription, XmlParseError> {
deserialize_elements::<_, EventDescription, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
struct EventDescriptionListDeserializer;
impl EventDescriptionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventDescription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(EventDescriptionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventDescriptionsMessage, XmlParseError> {
deserialize_elements::<_, EventDescriptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Events" => {
obj.events.get_or_insert(vec![]).extend(
EventDescriptionListDeserializer::deserialize("Events", stack)?,
);
}
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct EventMessageDeserializer;
impl EventMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct EventSeverityDeserializer;
impl EventSeverityDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct FailureTypeDeserializer;
impl FailureTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct FileTypeExtensionDeserializer;
impl FileTypeExtensionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ImageIdDeserializer;
impl ImageIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Instance {
pub id: Option<String>,
}
struct InstanceDeserializer;
impl InstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Instance, XmlParseError> {
deserialize_elements::<_, Instance, _>(tag_name, stack, |name, stack, obj| {
match name {
"Id" => {
obj.id = Some(ResourceIdDeserializer::deserialize("Id", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct InstanceHealthListDeserializer;
impl InstanceHealthListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SingleInstanceHealth>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SingleInstanceHealthDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<InstanceHealthSummary, XmlParseError> {
deserialize_elements::<_, InstanceHealthSummary, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
struct InstanceIdDeserializer;
impl InstanceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct InstanceListDeserializer;
impl InstanceListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Instance>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(InstanceDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct 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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Latency, XmlParseError> {
deserialize_elements::<_, Latency, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LaunchConfiguration {
pub name: Option<String>,
}
struct LaunchConfigurationDeserializer;
impl LaunchConfigurationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LaunchConfiguration, XmlParseError> {
deserialize_elements::<_, LaunchConfiguration, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LaunchConfigurationListDeserializer;
impl LaunchConfigurationListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LaunchConfiguration>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LaunchConfigurationDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LaunchTemplate {
pub id: Option<String>,
}
struct LaunchTemplateDeserializer;
impl LaunchTemplateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LaunchTemplate, XmlParseError> {
deserialize_elements::<_, LaunchTemplate, _>(tag_name, stack, |name, stack, obj| {
match name {
"Id" => {
obj.id = Some(ResourceIdDeserializer::deserialize("Id", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LaunchTemplateListDeserializer;
impl LaunchTemplateListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LaunchTemplate>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LaunchTemplateDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct LaunchedAtDeserializer;
impl LaunchedAtDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListAvailableSolutionStacksResultMessage {
pub solution_stack_details: Option<Vec<SolutionStackDescription>>,
pub solution_stacks: Option<Vec<String>>,
}
struct ListAvailableSolutionStacksResultMessageDeserializer;
impl ListAvailableSolutionStacksResultMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListAvailableSolutionStacksResultMessage, XmlParseError> {
deserialize_elements::<_, ListAvailableSolutionStacksResultMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SolutionStackDetails" => {
obj.solution_stack_details.get_or_insert(vec![]).extend(
AvailableSolutionStackDetailsListDeserializer::deserialize(
"SolutionStackDetails",
stack,
)?,
);
}
"SolutionStacks" => {
obj.solution_stacks.get_or_insert(vec![]).extend(
AvailableSolutionStackNamesListDeserializer::deserialize(
"SolutionStacks",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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);
}
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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListPlatformVersionsResult, XmlParseError> {
deserialize_elements::<_, ListPlatformVersionsResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token = Some(TokenDeserializer::deserialize("NextToken", stack)?);
}
"PlatformSummaryList" => {
obj.platform_summary_list.get_or_insert(vec![]).extend(
PlatformSummaryListDeserializer::deserialize(
"PlatformSummaryList",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Listener, XmlParseError> {
deserialize_elements::<_, Listener, _>(tag_name, stack, |name, stack, obj| {
match name {
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
"Protocol" => {
obj.protocol = Some(StringDeserializer::deserialize("Protocol", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LoadAverageDeserializer;
impl LoadAverageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<f64>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LoadAverageValueDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct LoadAverageValueDeserializer;
impl LoadAverageValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LoadBalancer {
pub name: Option<String>,
}
struct LoadBalancerDeserializer;
impl LoadBalancerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancer, XmlParseError> {
deserialize_elements::<_, LoadBalancer, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoadBalancerDescription, XmlParseError> {
deserialize_elements::<_, LoadBalancerDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Domain" => {
obj.domain = Some(StringDeserializer::deserialize("Domain", stack)?);
}
"Listeners" => {
obj.listeners.get_or_insert(vec![]).extend(
LoadBalancerListenersDescriptionDeserializer::deserialize(
"Listeners",
stack,
)?,
);
}
"LoadBalancerName" => {
obj.load_balancer_name =
Some(StringDeserializer::deserialize("LoadBalancerName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct LoadBalancerListDeserializer;
impl LoadBalancerListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<LoadBalancer>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(LoadBalancerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct LoadBalancerListenersDescriptionDeserializer;
impl LoadBalancerListenersDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Listener>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ListenerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct MaintainerDeserializer;
impl MaintainerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ManagedAction, XmlParseError> {
deserialize_elements::<_, ManagedAction, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ManagedActionHistoryItem, XmlParseError> {
deserialize_elements::<_, ManagedActionHistoryItem, _>(
tag_name,
stack,
|name, stack, obj| {
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),
}
Ok(())
},
)
}
}
struct ManagedActionHistoryItemsDeserializer;
impl ManagedActionHistoryItemsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ManagedActionHistoryItem>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ManagedActionHistoryItemDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ManagedActionsDeserializer;
impl ManagedActionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ManagedAction>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ManagedActionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<MaxAgeRule, XmlParseError> {
deserialize_elements::<_, MaxAgeRule, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
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);
}
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
if let Some(ref field_value) = obj.max_age_in_days {
params.put(&format!("{}{}", prefix, "MaxAgeInDays"), &field_value);
}
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<MaxCountRule, XmlParseError> {
deserialize_elements::<_, MaxCountRule, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
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);
}
params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
if let Some(ref field_value) = obj.max_count {
params.put(&format!("{}{}", prefix, "MaxCount"), &field_value);
}
}
}
struct MessageDeserializer;
impl MessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NextTokenDeserializer;
impl NextTokenDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NullableDoubleDeserializer;
impl NullableDoubleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NullableIntegerDeserializer;
impl NullableIntegerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NullableLongDeserializer;
impl NullableLongDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct OperatingSystemNameDeserializer;
impl OperatingSystemNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct OperatingSystemVersionDeserializer;
impl OperatingSystemVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct OptionNamespaceDeserializer;
impl OptionNamespaceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct OptionRestrictionMaxLengthDeserializer;
impl OptionRestrictionMaxLengthDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct OptionRestrictionMaxValueDeserializer;
impl OptionRestrictionMaxValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct OptionRestrictionMinValueDeserializer;
impl OptionRestrictionMinValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionRestrictionRegex {
pub label: Option<String>,
pub pattern: Option<String>,
}
struct OptionRestrictionRegexDeserializer;
impl OptionRestrictionRegexDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionRestrictionRegex, XmlParseError> {
deserialize_elements::<_, OptionRestrictionRegex, _>(tag_name, stack, |name, stack, obj| {
match name {
"Label" => {
obj.label = Some(RegexLabelDeserializer::deserialize("Label", stack)?);
}
"Pattern" => {
obj.pattern = Some(RegexPatternDeserializer::deserialize("Pattern", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformDescription, XmlParseError> {
deserialize_elements::<_, PlatformDescription, _>(tag_name, stack, |name, stack, obj| {
match name {
"CustomAmiList" => {
obj.custom_ami_list.get_or_insert(vec![]).extend(
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.get_or_insert(vec![]).extend(
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.get_or_insert(vec![]).extend(
PlatformProgrammingLanguagesDeserializer::deserialize(
"ProgrammingLanguages",
stack,
)?,
);
}
"SolutionStackName" => {
obj.solution_stack_name = Some(SolutionStackNameDeserializer::deserialize(
"SolutionStackName",
stack,
)?);
}
"SupportedAddonList" => {
obj.supported_addon_list.get_or_insert(vec![]).extend(
SupportedAddonListDeserializer::deserialize("SupportedAddonList", stack)?,
);
}
"SupportedTierList" => {
obj.supported_tier_list.get_or_insert(vec![]).extend(
SupportedTierListDeserializer::deserialize("SupportedTierList", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformFramework, XmlParseError> {
deserialize_elements::<_, PlatformFramework, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"Version" => {
obj.version = Some(StringDeserializer::deserialize("Version", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PlatformFrameworksDeserializer;
impl PlatformFrameworksDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PlatformFramework>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PlatformFrameworkDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PlatformNameDeserializer;
impl PlatformNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PlatformOwnerDeserializer;
impl PlatformOwnerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PlatformProgrammingLanguage {
pub name: Option<String>,
pub version: Option<String>,
}
struct PlatformProgrammingLanguageDeserializer;
impl PlatformProgrammingLanguageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformProgrammingLanguage, XmlParseError> {
deserialize_elements::<_, PlatformProgrammingLanguage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"Version" => {
obj.version = Some(StringDeserializer::deserialize("Version", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct PlatformProgrammingLanguagesDeserializer;
impl PlatformProgrammingLanguagesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PlatformProgrammingLanguage>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PlatformProgrammingLanguageDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PlatformStatusDeserializer;
impl PlatformStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PlatformSummary, XmlParseError> {
deserialize_elements::<_, PlatformSummary, _>(tag_name, stack, |name, stack, obj| {
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.get_or_insert(vec![]).extend(
SupportedAddonListDeserializer::deserialize("SupportedAddonList", stack)?,
);
}
"SupportedTierList" => {
obj.supported_tier_list.get_or_insert(vec![]).extend(
SupportedTierListDeserializer::deserialize("SupportedTierList", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PlatformSummaryListDeserializer;
impl PlatformSummaryListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PlatformSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PlatformSummaryDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PlatformVersionDeserializer;
impl PlatformVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Queue {
pub name: Option<String>,
pub url: Option<String>,
}
struct QueueDeserializer;
impl QueueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Queue, XmlParseError> {
deserialize_elements::<_, Queue, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"URL" => {
obj.url = Some(StringDeserializer::deserialize("URL", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct QueueListDeserializer;
impl QueueListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Queue>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(QueueDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<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<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<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<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<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<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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceQuota, XmlParseError> {
deserialize_elements::<_, ResourceQuota, _>(tag_name, stack, |name, stack, obj| {
match name {
"Maximum" => {
obj.maximum = Some(BoxedIntDeserializer::deserialize("Maximum", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceQuotas, XmlParseError> {
deserialize_elements::<_, ResourceQuotas, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceTagsDescriptionMessage, XmlParseError> {
deserialize_elements::<_, ResourceTagsDescriptionMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ResourceArn" => {
obj.resource_arn =
Some(ResourceArnDeserializer::deserialize("ResourceArn", stack)?);
}
"ResourceTags" => {
obj.resource_tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("ResourceTags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RetrieveEnvironmentInfoResultMessage, XmlParseError> {
deserialize_elements::<_, RetrieveEnvironmentInfoResultMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EnvironmentInfo" => {
obj.environment_info.get_or_insert(vec![]).extend(
EnvironmentInfoDescriptionListDeserializer::deserialize(
"EnvironmentInfo",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct S3BucketDeserializer;
impl S3BucketDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct S3KeyDeserializer;
impl S3KeyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct S3Location {
pub s3_bucket: Option<String>,
pub s3_key: Option<String>,
}
struct S3LocationDeserializer;
impl S3LocationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<S3Location, XmlParseError> {
deserialize_elements::<_, S3Location, _>(tag_name, stack, |name, stack, obj| {
match name {
"S3Bucket" => {
obj.s3_bucket = Some(S3BucketDeserializer::deserialize("S3Bucket", stack)?);
}
"S3Key" => {
obj.s3_key = Some(S3KeyDeserializer::deserialize("S3Key", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SingleInstanceHealth, XmlParseError> {
deserialize_elements::<_, SingleInstanceHealth, _>(tag_name, stack, |name, stack, obj| {
match name {
"ApplicationMetrics" => {
obj.application_metrics = Some(ApplicationMetricsDeserializer::deserialize(
"ApplicationMetrics",
stack,
)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"Causes" => {
obj.causes
.get_or_insert(vec![])
.extend(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),
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SolutionStackDescription, XmlParseError> {
deserialize_elements::<_, SolutionStackDescription, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PermittedFileTypes" => {
obj.permitted_file_types.get_or_insert(vec![]).extend(
SolutionStackFileTypeListDeserializer::deserialize(
"PermittedFileTypes",
stack,
)?,
);
}
"SolutionStackName" => {
obj.solution_stack_name = Some(SolutionStackNameDeserializer::deserialize(
"SolutionStackName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct SolutionStackFileTypeListDeserializer;
impl SolutionStackFileTypeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(FileTypeExtensionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SolutionStackNameDeserializer;
impl SolutionStackNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SourceBuildInformation {
pub source_location: String,
pub source_repository: String,
pub source_type: String,
}
struct SourceBuildInformationDeserializer;
impl SourceBuildInformationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SourceBuildInformation, XmlParseError> {
deserialize_elements::<_, SourceBuildInformation, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
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<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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StatusCodes, XmlParseError> {
deserialize_elements::<_, StatusCodes, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
struct StringDeserializer;
impl StringDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SupportedAddonDeserializer;
impl SupportedAddonDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SupportedAddonListDeserializer;
impl SupportedAddonListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SupportedAddonDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SupportedTierDeserializer;
impl SupportedTierDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct SupportedTierListDeserializer;
impl SupportedTierListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(SupportedTierDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SystemStatus, XmlParseError> {
deserialize_elements::<_, SystemStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"CPUUtilization" => {
obj.cpu_utilization = Some(CPUUtilizationDeserializer::deserialize(
"CPUUtilization",
stack,
)?);
}
"LoadAverage" => {
obj.load_average
.get_or_insert(vec![])
.extend(LoadAverageDeserializer::deserialize("LoadAverage", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Tag {
pub key: Option<String>,
pub value: Option<String>,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = Some(TagKeyDeserializer::deserialize("Key", stack)?);
}
"Value" => {
obj.value = Some(TagValueDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Tag>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TagDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TagListSerializer;
impl TagListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TagSerializer::serialize(params, &key, obj);
}
}
}
struct TagValueDeserializer;
impl TagValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct 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);
}
if let Some(ref field_value) = obj.terminate_resources {
params.put(&format!("{}{}", prefix, "TerminateResources"), &field_value);
}
}
}
struct TimestampDeserializer;
impl TimestampDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TokenDeserializer;
impl TokenDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Trigger {
pub name: Option<String>,
}
struct TriggerDeserializer;
impl TriggerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Trigger, XmlParseError> {
deserialize_elements::<_, Trigger, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(ResourceIdDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TriggerListDeserializer;
impl TriggerListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Trigger>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TriggerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[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<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<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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ValidationMessage, XmlParseError> {
deserialize_elements::<_, ValidationMessage, _>(tag_name, stack, |name, stack, obj| {
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),
}
Ok(())
})
}
}
struct ValidationMessageStringDeserializer;
impl ValidationMessageStringDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ValidationMessagesListDeserializer;
impl ValidationMessagesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ValidationMessage>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ValidationMessageDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ValidationSeverityDeserializer;
impl ValidationSeverityDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct VersionLabelDeserializer;
impl VersionLabelDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct 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<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(VersionLabelDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
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<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),
}
impl AbortEnvironmentUpdateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AbortEnvironmentUpdateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
AbortEnvironmentUpdateError::InsufficientPrivileges(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ApplyEnvironmentManagedActionError {
ElasticBeanstalkService(String),
ManagedActionInvalidState(String),
}
impl ApplyEnvironmentManagedActionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ApplyEnvironmentManagedActionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
ApplyEnvironmentManagedActionError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
"ManagedActionInvalidStateException" => {
return RusotoError::Service(
ApplyEnvironmentManagedActionError::ManagedActionInvalidState(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CheckDNSAvailabilityError {}
impl CheckDNSAvailabilityError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CheckDNSAvailabilityError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CheckDNSAvailabilityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CheckDNSAvailabilityError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ComposeEnvironmentsError {
InsufficientPrivileges(String),
TooManyEnvironments(String),
}
impl ComposeEnvironmentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ComposeEnvironmentsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
ComposeEnvironmentsError::InsufficientPrivileges(parsed_error.message),
)
}
"TooManyEnvironmentsException" => {
return RusotoError::Service(ComposeEnvironmentsError::TooManyEnvironments(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateApplicationError {
TooManyApplications(String),
}
impl CreateApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApplicationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"TooManyApplicationsException" => {
return RusotoError::Service(CreateApplicationError::TooManyApplications(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateApplicationVersionError {
CodeBuildNotInServiceRegion(String),
InsufficientPrivileges(String),
S3LocationNotInServiceRegion(String),
TooManyApplicationVersions(String),
TooManyApplications(String),
}
impl CreateApplicationVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApplicationVersionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"CodeBuildNotInServiceRegionException" => {
return RusotoError::Service(
CreateApplicationVersionError::CodeBuildNotInServiceRegion(
parsed_error.message,
),
)
}
"InsufficientPrivilegesException" => {
return RusotoError::Service(
CreateApplicationVersionError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"S3LocationNotInServiceRegionException" => {
return RusotoError::Service(
CreateApplicationVersionError::S3LocationNotInServiceRegion(
parsed_error.message,
),
)
}
"TooManyApplicationVersionsException" => {
return RusotoError::Service(
CreateApplicationVersionError::TooManyApplicationVersions(
parsed_error.message,
),
)
}
"TooManyApplicationsException" => {
return RusotoError::Service(
CreateApplicationVersionError::TooManyApplications(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConfigurationTemplateError {
InsufficientPrivileges(String),
TooManyBuckets(String),
TooManyConfigurationTemplates(String),
}
impl CreateConfigurationTemplateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateConfigurationTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
CreateConfigurationTemplateError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"TooManyBucketsException" => {
return RusotoError::Service(
CreateConfigurationTemplateError::TooManyBuckets(parsed_error.message),
)
}
"TooManyConfigurationTemplatesException" => {
return RusotoError::Service(
CreateConfigurationTemplateError::TooManyConfigurationTemplates(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateEnvironmentError {
InsufficientPrivileges(String),
TooManyEnvironments(String),
}
impl CreateEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateEnvironmentError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
CreateEnvironmentError::InsufficientPrivileges(parsed_error.message),
)
}
"TooManyEnvironmentsException" => {
return RusotoError::Service(CreateEnvironmentError::TooManyEnvironments(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePlatformVersionError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
TooManyPlatforms(String),
}
impl CreatePlatformVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePlatformVersionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
CreatePlatformVersionError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
"InsufficientPrivilegesException" => {
return RusotoError::Service(
CreatePlatformVersionError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"TooManyPlatformsException" => {
return RusotoError::Service(CreatePlatformVersionError::TooManyPlatforms(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStorageLocationError {
InsufficientPrivileges(String),
S3SubscriptionRequired(String),
TooManyBuckets(String),
}
impl CreateStorageLocationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStorageLocationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
CreateStorageLocationError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"S3SubscriptionRequiredException" => {
return RusotoError::Service(
CreateStorageLocationError::S3SubscriptionRequired(
parsed_error.message,
),
)
}
"TooManyBucketsException" => {
return RusotoError::Service(CreateStorageLocationError::TooManyBuckets(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteApplicationError {
OperationInProgress(String),
}
impl DeleteApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApplicationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"OperationInProgressFailure" => {
return RusotoError::Service(DeleteApplicationError::OperationInProgress(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteApplicationVersionError {
InsufficientPrivileges(String),
OperationInProgress(String),
S3LocationNotInServiceRegion(String),
SourceBundleDeletion(String),
}
impl DeleteApplicationVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApplicationVersionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
DeleteApplicationVersionError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"OperationInProgressFailure" => {
return RusotoError::Service(
DeleteApplicationVersionError::OperationInProgress(
parsed_error.message,
),
)
}
"S3LocationNotInServiceRegionException" => {
return RusotoError::Service(
DeleteApplicationVersionError::S3LocationNotInServiceRegion(
parsed_error.message,
),
)
}
"SourceBundleDeletionFailure" => {
return RusotoError::Service(
DeleteApplicationVersionError::SourceBundleDeletion(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConfigurationTemplateError {
OperationInProgress(String),
}
impl DeleteConfigurationTemplateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteConfigurationTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"OperationInProgressFailure" => {
return RusotoError::Service(
DeleteConfigurationTemplateError::OperationInProgress(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteEnvironmentConfigurationError {}
impl DeleteEnvironmentConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteEnvironmentConfigurationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteEnvironmentConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteEnvironmentConfigurationError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePlatformVersionError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
OperationInProgress(String),
PlatformVersionStillReferenced(String),
}
impl DeletePlatformVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePlatformVersionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
DeletePlatformVersionError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
"InsufficientPrivilegesException" => {
return RusotoError::Service(
DeletePlatformVersionError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"OperationInProgressFailure" => {
return RusotoError::Service(
DeletePlatformVersionError::OperationInProgress(parsed_error.message),
)
}
"PlatformVersionStillReferencedException" => {
return RusotoError::Service(
DeletePlatformVersionError::PlatformVersionStillReferenced(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountAttributesError {
InsufficientPrivileges(String),
}
impl DescribeAccountAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
DescribeAccountAttributesError::InsufficientPrivileges(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeApplicationVersionsError {}
impl DescribeApplicationVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeApplicationVersionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeApplicationVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeApplicationVersionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeApplicationsError {}
impl DescribeApplicationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeApplicationsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeApplicationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeApplicationsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationOptionsError {
TooManyBuckets(String),
}
impl DescribeConfigurationOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeConfigurationOptionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"TooManyBucketsException" => {
return RusotoError::Service(
DescribeConfigurationOptionsError::TooManyBuckets(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationSettingsError {
TooManyBuckets(String),
}
impl DescribeConfigurationSettingsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeConfigurationSettingsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"TooManyBucketsException" => {
return RusotoError::Service(
DescribeConfigurationSettingsError::TooManyBuckets(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentHealthError {
ElasticBeanstalkService(String),
InvalidRequest(String),
}
impl DescribeEnvironmentHealthError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEnvironmentHealthError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
DescribeEnvironmentHealthError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DescribeEnvironmentHealthError::InvalidRequest(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentManagedActionHistoryError {
ElasticBeanstalkService(String),
}
impl DescribeEnvironmentManagedActionHistoryError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEnvironmentManagedActionHistoryError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
DescribeEnvironmentManagedActionHistoryError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentManagedActionsError {
ElasticBeanstalkService(String),
}
impl DescribeEnvironmentManagedActionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEnvironmentManagedActionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
DescribeEnvironmentManagedActionsError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentResourcesError {
InsufficientPrivileges(String),
}
impl DescribeEnvironmentResourcesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEnvironmentResourcesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
DescribeEnvironmentResourcesError::InsufficientPrivileges(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEnvironmentsError {}
impl DescribeEnvironmentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEnvironmentsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEnvironmentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEnvironmentsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventsError {}
impl DescribeEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEventsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInstancesHealthError {
ElasticBeanstalkService(String),
InvalidRequest(String),
}
impl DescribeInstancesHealthError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeInstancesHealthError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
DescribeInstancesHealthError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeInstancesHealthError::InvalidRequest(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePlatformVersionError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
}
impl DescribePlatformVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribePlatformVersionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
DescribePlatformVersionError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
"InsufficientPrivilegesException" => {
return RusotoError::Service(
DescribePlatformVersionError::InsufficientPrivileges(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAvailableSolutionStacksError {}
impl ListAvailableSolutionStacksError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListAvailableSolutionStacksError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListAvailableSolutionStacksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAvailableSolutionStacksError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPlatformVersionsError {
ElasticBeanstalkService(String),
InsufficientPrivileges(String),
}
impl ListPlatformVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPlatformVersionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ElasticBeanstalkServiceException" => {
return RusotoError::Service(
ListPlatformVersionsError::ElasticBeanstalkService(
parsed_error.message,
),
)
}
"InsufficientPrivilegesException" => {
return RusotoError::Service(
ListPlatformVersionsError::InsufficientPrivileges(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InsufficientPrivileges(String),
ResourceNotFound(String),
ResourceTypeNotSupported(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
ListTagsForResourceError::InsufficientPrivileges(parsed_error.message),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
parsed_error.message,
))
}
"ResourceTypeNotSupportedException" => {
return RusotoError::Service(
ListTagsForResourceError::ResourceTypeNotSupported(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InsufficientPrivileges(ref cause) => cause,
ListTagsForResourceError::ResourceNotFound(ref cause) => cause,
ListTagsForResourceError::ResourceTypeNotSupported(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RebuildEnvironmentError {
InsufficientPrivileges(String),
}
impl RebuildEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RebuildEnvironmentError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
RebuildEnvironmentError::InsufficientPrivileges(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RequestEnvironmentInfoError {}
impl RequestEnvironmentInfoError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RequestEnvironmentInfoError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RequestEnvironmentInfoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RequestEnvironmentInfoError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum RestartAppServerError {}
impl RestartAppServerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestartAppServerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RestartAppServerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestartAppServerError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum RetrieveEnvironmentInfoError {}
impl RetrieveEnvironmentInfoError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RetrieveEnvironmentInfoError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RetrieveEnvironmentInfoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RetrieveEnvironmentInfoError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SwapEnvironmentCNAMEsError {}
impl SwapEnvironmentCNAMEsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SwapEnvironmentCNAMEsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for SwapEnvironmentCNAMEsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SwapEnvironmentCNAMEsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum TerminateEnvironmentError {
InsufficientPrivileges(String),
}
impl TerminateEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TerminateEnvironmentError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
TerminateEnvironmentError::InsufficientPrivileges(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApplicationError {}
impl UpdateApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApplicationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApplicationError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApplicationResourceLifecycleError {
InsufficientPrivileges(String),
}
impl UpdateApplicationResourceLifecycleError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateApplicationResourceLifecycleError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
UpdateApplicationResourceLifecycleError::InsufficientPrivileges(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApplicationVersionError {}
impl UpdateApplicationVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApplicationVersionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateApplicationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApplicationVersionError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConfigurationTemplateError {
InsufficientPrivileges(String),
TooManyBuckets(String),
}
impl UpdateConfigurationTemplateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateConfigurationTemplateError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
UpdateConfigurationTemplateError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"TooManyBucketsException" => {
return RusotoError::Service(
UpdateConfigurationTemplateError::TooManyBuckets(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateEnvironmentError {
InsufficientPrivileges(String),
TooManyBuckets(String),
}
impl UpdateEnvironmentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateEnvironmentError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
UpdateEnvironmentError::InsufficientPrivileges(parsed_error.message),
)
}
"TooManyBucketsException" => {
return RusotoError::Service(UpdateEnvironmentError::TooManyBuckets(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTagsForResourceError {
InsufficientPrivileges(String),
OperationInProgress(String),
ResourceNotFound(String),
ResourceTypeNotSupported(String),
TooManyTags(String),
}
impl UpdateTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTagsForResourceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
UpdateTagsForResourceError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"OperationInProgressFailure" => {
return RusotoError::Service(
UpdateTagsForResourceError::OperationInProgress(parsed_error.message),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateTagsForResourceError::ResourceNotFound(
parsed_error.message,
))
}
"ResourceTypeNotSupportedException" => {
return RusotoError::Service(
UpdateTagsForResourceError::ResourceTypeNotSupported(
parsed_error.message,
),
)
}
"TooManyTagsException" => {
return RusotoError::Service(UpdateTagsForResourceError::TooManyTags(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ValidateConfigurationSettingsError {
InsufficientPrivileges(String),
TooManyBuckets(String),
}
impl ValidateConfigurationSettingsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ValidateConfigurationSettingsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InsufficientPrivilegesException" => {
return RusotoError::Service(
ValidateConfigurationSettingsError::InsufficientPrivileges(
parsed_error.message,
),
)
}
"TooManyBucketsException" => {
return RusotoError::Service(
ValidateConfigurationSettingsError::TooManyBuckets(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for 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,
}
}
}
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,
}
}
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,
}
}
}
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()));
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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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()));
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()));
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()));
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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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()));
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()));
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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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()));
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()));
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_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = 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);
}
}