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 AccountDeserializer;
impl AccountDeserializer {
#[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 AccountGateResult {
pub status: Option<String>,
pub status_reason: Option<String>,
}
struct AccountGateResultDeserializer;
impl AccountGateResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountGateResult, XmlParseError> {
deserialize_elements::<_, AccountGateResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"Status" => {
obj.status = Some(AccountGateStatusDeserializer::deserialize("Status", stack)?);
}
"StatusReason" => {
obj.status_reason = Some(AccountGateStatusReasonDeserializer::deserialize(
"StatusReason",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AccountGateStatusDeserializer;
impl AccountGateStatusDeserializer {
#[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 AccountGateStatusReasonDeserializer;
impl AccountGateStatusReasonDeserializer {
#[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 AccountLimit {
pub name: Option<String>,
pub value: Option<i64>,
}
struct AccountLimitDeserializer;
impl AccountLimitDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountLimit, XmlParseError> {
deserialize_elements::<_, AccountLimit, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(LimitNameDeserializer::deserialize("Name", stack)?);
}
"Value" => {
obj.value = Some(LimitValueDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AccountLimitListDeserializer;
impl AccountLimitListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AccountLimit>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(AccountLimitDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AccountListSerializer;
impl AccountListSerializer {
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 AllowedValueDeserializer;
impl AllowedValueDeserializer {
#[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 AllowedValuesDeserializer;
impl AllowedValuesDeserializer {
#[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(AllowedValueDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
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)
}
}
struct BoxedIntegerDeserializer;
impl BoxedIntegerDeserializer {
#[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 CancelUpdateStackInput {
pub client_request_token: Option<String>,
pub stack_name: String,
}
struct CancelUpdateStackInputSerializer;
impl CancelUpdateStackInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CancelUpdateStackInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.client_request_token {
params.put(&format!("{}{}", prefix, "ClientRequestToken"), &field_value);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
struct CapabilitiesDeserializer;
impl CapabilitiesDeserializer {
#[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(CapabilityDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct CapabilitiesSerializer;
impl CapabilitiesSerializer {
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 CapabilitiesReasonDeserializer;
impl CapabilitiesReasonDeserializer {
#[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 CapabilityDeserializer;
impl CapabilityDeserializer {
#[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 CausingEntityDeserializer;
impl CausingEntityDeserializer {
#[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 Change {
pub resource_change: Option<ResourceChange>,
pub type_: Option<String>,
}
struct ChangeDeserializer;
impl ChangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Change, XmlParseError> {
deserialize_elements::<_, Change, _>(tag_name, stack, |name, stack, obj| {
match name {
"ResourceChange" => {
obj.resource_change = Some(ResourceChangeDeserializer::deserialize(
"ResourceChange",
stack,
)?);
}
"Type" => {
obj.type_ = Some(ChangeTypeDeserializer::deserialize("Type", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ChangeActionDeserializer;
impl ChangeActionDeserializer {
#[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 ChangeSetIdDeserializer;
impl ChangeSetIdDeserializer {
#[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 ChangeSetNameDeserializer;
impl ChangeSetNameDeserializer {
#[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 ChangeSetStatusDeserializer;
impl ChangeSetStatusDeserializer {
#[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 ChangeSetStatusReasonDeserializer;
impl ChangeSetStatusReasonDeserializer {
#[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 ChangeSetSummariesDeserializer;
impl ChangeSetSummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ChangeSetSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ChangeSetSummaryDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangeSetSummary {
pub change_set_id: Option<String>,
pub change_set_name: Option<String>,
pub creation_time: Option<String>,
pub description: Option<String>,
pub execution_status: Option<String>,
pub stack_id: Option<String>,
pub stack_name: Option<String>,
pub status: Option<String>,
pub status_reason: Option<String>,
}
struct ChangeSetSummaryDeserializer;
impl ChangeSetSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ChangeSetSummary, XmlParseError> {
deserialize_elements::<_, ChangeSetSummary, _>(tag_name, stack, |name, stack, obj| {
match name {
"ChangeSetId" => {
obj.change_set_id =
Some(ChangeSetIdDeserializer::deserialize("ChangeSetId", stack)?);
}
"ChangeSetName" => {
obj.change_set_name = Some(ChangeSetNameDeserializer::deserialize(
"ChangeSetName",
stack,
)?);
}
"CreationTime" => {
obj.creation_time = Some(CreationTimeDeserializer::deserialize(
"CreationTime",
stack,
)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"ExecutionStatus" => {
obj.execution_status = Some(ExecutionStatusDeserializer::deserialize(
"ExecutionStatus",
stack,
)?);
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackName" => {
obj.stack_name = Some(StackNameDeserializer::deserialize("StackName", stack)?);
}
"Status" => {
obj.status = Some(ChangeSetStatusDeserializer::deserialize("Status", stack)?);
}
"StatusReason" => {
obj.status_reason = Some(ChangeSetStatusReasonDeserializer::deserialize(
"StatusReason",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ChangeSourceDeserializer;
impl ChangeSourceDeserializer {
#[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 ChangeTypeDeserializer;
impl ChangeTypeDeserializer {
#[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 ChangesDeserializer;
impl ChangesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Change>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ChangeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ClientRequestTokenDeserializer;
impl ClientRequestTokenDeserializer {
#[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 ContinueUpdateRollbackInput {
pub client_request_token: Option<String>,
pub resources_to_skip: Option<Vec<String>>,
pub role_arn: Option<String>,
pub stack_name: String,
}
struct ContinueUpdateRollbackInputSerializer;
impl ContinueUpdateRollbackInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ContinueUpdateRollbackInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.client_request_token {
params.put(&format!("{}{}", prefix, "ClientRequestToken"), &field_value);
}
if let Some(ref field_value) = obj.resources_to_skip {
ResourcesToSkipSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourcesToSkip"),
field_value,
);
}
if let Some(ref field_value) = obj.role_arn {
params.put(&format!("{}{}", prefix, "RoleARN"), &field_value);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ContinueUpdateRollbackOutput {}
struct ContinueUpdateRollbackOutputDeserializer;
impl ContinueUpdateRollbackOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ContinueUpdateRollbackOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = ContinueUpdateRollbackOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateChangeSetInput {
pub capabilities: Option<Vec<String>>,
pub change_set_name: String,
pub change_set_type: Option<String>,
pub client_token: Option<String>,
pub description: Option<String>,
pub notification_ar_ns: Option<Vec<String>>,
pub parameters: Option<Vec<Parameter>>,
pub resource_types: Option<Vec<String>>,
pub role_arn: Option<String>,
pub rollback_configuration: Option<RollbackConfiguration>,
pub stack_name: String,
pub tags: Option<Vec<Tag>>,
pub template_body: Option<String>,
pub template_url: Option<String>,
pub use_previous_template: Option<bool>,
}
struct CreateChangeSetInputSerializer;
impl CreateChangeSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateChangeSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.capabilities {
CapabilitiesSerializer::serialize(
params,
&format!("{}{}", prefix, "Capabilities"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "ChangeSetName"),
&obj.change_set_name,
);
if let Some(ref field_value) = obj.change_set_type {
params.put(&format!("{}{}", prefix, "ChangeSetType"), &field_value);
}
if let Some(ref field_value) = obj.client_token {
params.put(&format!("{}{}", prefix, "ClientToken"), &field_value);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.notification_ar_ns {
NotificationARNsSerializer::serialize(
params,
&format!("{}{}", prefix, "NotificationARNs"),
field_value,
);
}
if let Some(ref field_value) = obj.parameters {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameters"),
field_value,
);
}
if let Some(ref field_value) = obj.resource_types {
ResourceTypesSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceTypes"),
field_value,
);
}
if let Some(ref field_value) = obj.role_arn {
params.put(&format!("{}{}", prefix, "RoleARN"), &field_value);
}
if let Some(ref field_value) = obj.rollback_configuration {
RollbackConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "RollbackConfiguration"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
if let Some(ref field_value) = obj.template_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
if let Some(ref field_value) = obj.use_previous_template {
params.put(
&format!("{}{}", prefix, "UsePreviousTemplate"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateChangeSetOutput {
pub id: Option<String>,
pub stack_id: Option<String>,
}
struct CreateChangeSetOutputDeserializer;
impl CreateChangeSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateChangeSetOutput, XmlParseError> {
deserialize_elements::<_, CreateChangeSetOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Id" => {
obj.id = Some(ChangeSetIdDeserializer::deserialize("Id", stack)?);
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStackInput {
pub capabilities: Option<Vec<String>>,
pub client_request_token: Option<String>,
pub disable_rollback: Option<bool>,
pub enable_termination_protection: Option<bool>,
pub notification_ar_ns: Option<Vec<String>>,
pub on_failure: Option<String>,
pub parameters: Option<Vec<Parameter>>,
pub resource_types: Option<Vec<String>>,
pub role_arn: Option<String>,
pub rollback_configuration: Option<RollbackConfiguration>,
pub stack_name: String,
pub stack_policy_body: Option<String>,
pub stack_policy_url: Option<String>,
pub tags: Option<Vec<Tag>>,
pub template_body: Option<String>,
pub template_url: Option<String>,
pub timeout_in_minutes: Option<i64>,
}
struct CreateStackInputSerializer;
impl CreateStackInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateStackInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.capabilities {
CapabilitiesSerializer::serialize(
params,
&format!("{}{}", prefix, "Capabilities"),
field_value,
);
}
if let Some(ref field_value) = obj.client_request_token {
params.put(&format!("{}{}", prefix, "ClientRequestToken"), &field_value);
}
if let Some(ref field_value) = obj.disable_rollback {
params.put(&format!("{}{}", prefix, "DisableRollback"), &field_value);
}
if let Some(ref field_value) = obj.enable_termination_protection {
params.put(
&format!("{}{}", prefix, "EnableTerminationProtection"),
&field_value,
);
}
if let Some(ref field_value) = obj.notification_ar_ns {
NotificationARNsSerializer::serialize(
params,
&format!("{}{}", prefix, "NotificationARNs"),
field_value,
);
}
if let Some(ref field_value) = obj.on_failure {
params.put(&format!("{}{}", prefix, "OnFailure"), &field_value);
}
if let Some(ref field_value) = obj.parameters {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameters"),
field_value,
);
}
if let Some(ref field_value) = obj.resource_types {
ResourceTypesSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceTypes"),
field_value,
);
}
if let Some(ref field_value) = obj.role_arn {
params.put(&format!("{}{}", prefix, "RoleARN"), &field_value);
}
if let Some(ref field_value) = obj.rollback_configuration {
RollbackConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "RollbackConfiguration"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
if let Some(ref field_value) = obj.stack_policy_body {
params.put(&format!("{}{}", prefix, "StackPolicyBody"), &field_value);
}
if let Some(ref field_value) = obj.stack_policy_url {
params.put(&format!("{}{}", prefix, "StackPolicyURL"), &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_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
if let Some(ref field_value) = obj.timeout_in_minutes {
params.put(&format!("{}{}", prefix, "TimeoutInMinutes"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStackInstancesInput {
pub accounts: Vec<String>,
pub operation_id: Option<String>,
pub operation_preferences: Option<StackSetOperationPreferences>,
pub parameter_overrides: Option<Vec<Parameter>>,
pub regions: Vec<String>,
pub stack_set_name: String,
}
struct CreateStackInstancesInputSerializer;
impl CreateStackInstancesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateStackInstancesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
AccountListSerializer::serialize(
params,
&format!("{}{}", prefix, "Accounts"),
&obj.accounts,
);
if let Some(ref field_value) = obj.operation_id {
params.put(&format!("{}{}", prefix, "OperationId"), &field_value);
}
if let Some(ref field_value) = obj.operation_preferences {
StackSetOperationPreferencesSerializer::serialize(
params,
&format!("{}{}", prefix, "OperationPreferences"),
field_value,
);
}
if let Some(ref field_value) = obj.parameter_overrides {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "ParameterOverrides"),
field_value,
);
}
RegionListSerializer::serialize(params, &format!("{}{}", prefix, "Regions"), &obj.regions);
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStackInstancesOutput {
pub operation_id: Option<String>,
}
struct CreateStackInstancesOutputDeserializer;
impl CreateStackInstancesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateStackInstancesOutput, XmlParseError> {
deserialize_elements::<_, CreateStackInstancesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"OperationId" => {
obj.operation_id = Some(ClientRequestTokenDeserializer::deserialize(
"OperationId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStackOutput {
pub stack_id: Option<String>,
}
struct CreateStackOutputDeserializer;
impl CreateStackOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateStackOutput, XmlParseError> {
deserialize_elements::<_, CreateStackOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStackSetInput {
pub administration_role_arn: Option<String>,
pub capabilities: Option<Vec<String>>,
pub client_request_token: Option<String>,
pub description: Option<String>,
pub execution_role_name: Option<String>,
pub parameters: Option<Vec<Parameter>>,
pub stack_set_name: String,
pub tags: Option<Vec<Tag>>,
pub template_body: Option<String>,
pub template_url: Option<String>,
}
struct CreateStackSetInputSerializer;
impl CreateStackSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateStackSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.administration_role_arn {
params.put(
&format!("{}{}", prefix, "AdministrationRoleARN"),
&field_value,
);
}
if let Some(ref field_value) = obj.capabilities {
CapabilitiesSerializer::serialize(
params,
&format!("{}{}", prefix, "Capabilities"),
field_value,
);
}
if let Some(ref field_value) = obj.client_request_token {
params.put(&format!("{}{}", prefix, "ClientRequestToken"), &field_value);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.execution_role_name {
params.put(&format!("{}{}", prefix, "ExecutionRoleName"), &field_value);
}
if let Some(ref field_value) = obj.parameters {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameters"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
if let Some(ref field_value) = obj.template_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateStackSetOutput {
pub stack_set_id: Option<String>,
}
struct CreateStackSetOutputDeserializer;
impl CreateStackSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateStackSetOutput, XmlParseError> {
deserialize_elements::<_, CreateStackSetOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"StackSetId" => {
obj.stack_set_id =
Some(StackSetIdDeserializer::deserialize("StackSetId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct CreationTimeDeserializer;
impl CreationTimeDeserializer {
#[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 DeleteChangeSetInput {
pub change_set_name: String,
pub stack_name: Option<String>,
}
struct DeleteChangeSetInputSerializer;
impl DeleteChangeSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteChangeSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ChangeSetName"),
&obj.change_set_name,
);
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteChangeSetOutput {}
struct DeleteChangeSetOutputDeserializer;
impl DeleteChangeSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteChangeSetOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteChangeSetOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteStackInput {
pub client_request_token: Option<String>,
pub retain_resources: Option<Vec<String>>,
pub role_arn: Option<String>,
pub stack_name: String,
}
struct DeleteStackInputSerializer;
impl DeleteStackInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteStackInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.client_request_token {
params.put(&format!("{}{}", prefix, "ClientRequestToken"), &field_value);
}
if let Some(ref field_value) = obj.retain_resources {
RetainResourcesSerializer::serialize(
params,
&format!("{}{}", prefix, "RetainResources"),
field_value,
);
}
if let Some(ref field_value) = obj.role_arn {
params.put(&format!("{}{}", prefix, "RoleARN"), &field_value);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteStackInstancesInput {
pub accounts: Vec<String>,
pub operation_id: Option<String>,
pub operation_preferences: Option<StackSetOperationPreferences>,
pub regions: Vec<String>,
pub retain_stacks: bool,
pub stack_set_name: String,
}
struct DeleteStackInstancesInputSerializer;
impl DeleteStackInstancesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteStackInstancesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
AccountListSerializer::serialize(
params,
&format!("{}{}", prefix, "Accounts"),
&obj.accounts,
);
if let Some(ref field_value) = obj.operation_id {
params.put(&format!("{}{}", prefix, "OperationId"), &field_value);
}
if let Some(ref field_value) = obj.operation_preferences {
StackSetOperationPreferencesSerializer::serialize(
params,
&format!("{}{}", prefix, "OperationPreferences"),
field_value,
);
}
RegionListSerializer::serialize(params, &format!("{}{}", prefix, "Regions"), &obj.regions);
params.put(&format!("{}{}", prefix, "RetainStacks"), &obj.retain_stacks);
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteStackInstancesOutput {
pub operation_id: Option<String>,
}
struct DeleteStackInstancesOutputDeserializer;
impl DeleteStackInstancesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteStackInstancesOutput, XmlParseError> {
deserialize_elements::<_, DeleteStackInstancesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"OperationId" => {
obj.operation_id = Some(ClientRequestTokenDeserializer::deserialize(
"OperationId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteStackSetInput {
pub stack_set_name: String,
}
struct DeleteStackSetInputSerializer;
impl DeleteStackSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteStackSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteStackSetOutput {}
struct DeleteStackSetOutputDeserializer;
impl DeleteStackSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteStackSetOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteStackSetOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DeletionTimeDeserializer;
impl DeletionTimeDeserializer {
#[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 DescribeAccountLimitsInput {
pub next_token: Option<String>,
}
struct DescribeAccountLimitsInputSerializer;
impl DescribeAccountLimitsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeAccountLimitsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccountLimitsOutput {
pub account_limits: Option<Vec<AccountLimit>>,
pub next_token: Option<String>,
}
struct DescribeAccountLimitsOutputDeserializer;
impl DescribeAccountLimitsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeAccountLimitsOutput, XmlParseError> {
deserialize_elements::<_, DescribeAccountLimitsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AccountLimits" => {
obj.account_limits.get_or_insert(vec![]).extend(
AccountLimitListDeserializer::deserialize("AccountLimits", stack)?,
);
}
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeChangeSetInput {
pub change_set_name: String,
pub next_token: Option<String>,
pub stack_name: Option<String>,
}
struct DescribeChangeSetInputSerializer;
impl DescribeChangeSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeChangeSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ChangeSetName"),
&obj.change_set_name,
);
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeChangeSetOutput {
pub capabilities: Option<Vec<String>>,
pub change_set_id: Option<String>,
pub change_set_name: Option<String>,
pub changes: Option<Vec<Change>>,
pub creation_time: Option<String>,
pub description: Option<String>,
pub execution_status: Option<String>,
pub next_token: Option<String>,
pub notification_ar_ns: Option<Vec<String>>,
pub parameters: Option<Vec<Parameter>>,
pub rollback_configuration: Option<RollbackConfiguration>,
pub stack_id: Option<String>,
pub stack_name: Option<String>,
pub status: Option<String>,
pub status_reason: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct DescribeChangeSetOutputDeserializer;
impl DescribeChangeSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeChangeSetOutput, XmlParseError> {
deserialize_elements::<_, DescribeChangeSetOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Capabilities" => {
obj.capabilities.get_or_insert(vec![]).extend(
CapabilitiesDeserializer::deserialize("Capabilities", stack)?,
);
}
"ChangeSetId" => {
obj.change_set_id =
Some(ChangeSetIdDeserializer::deserialize("ChangeSetId", stack)?);
}
"ChangeSetName" => {
obj.change_set_name = Some(ChangeSetNameDeserializer::deserialize(
"ChangeSetName",
stack,
)?);
}
"Changes" => {
obj.changes
.get_or_insert(vec![])
.extend(ChangesDeserializer::deserialize("Changes", stack)?);
}
"CreationTime" => {
obj.creation_time = Some(CreationTimeDeserializer::deserialize(
"CreationTime",
stack,
)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"ExecutionStatus" => {
obj.execution_status = Some(ExecutionStatusDeserializer::deserialize(
"ExecutionStatus",
stack,
)?);
}
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"NotificationARNs" => {
obj.notification_ar_ns.get_or_insert(vec![]).extend(
NotificationARNsDeserializer::deserialize("NotificationARNs", stack)?,
);
}
"Parameters" => {
obj.parameters
.get_or_insert(vec![])
.extend(ParametersDeserializer::deserialize("Parameters", stack)?);
}
"RollbackConfiguration" => {
obj.rollback_configuration =
Some(RollbackConfigurationDeserializer::deserialize(
"RollbackConfiguration",
stack,
)?);
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackName" => {
obj.stack_name =
Some(StackNameDeserializer::deserialize("StackName", stack)?);
}
"Status" => {
obj.status =
Some(ChangeSetStatusDeserializer::deserialize("Status", stack)?);
}
"StatusReason" => {
obj.status_reason = Some(ChangeSetStatusReasonDeserializer::deserialize(
"StatusReason",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagsDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackDriftDetectionStatusInput {
pub stack_drift_detection_id: String,
}
struct DescribeStackDriftDetectionStatusInputSerializer;
impl DescribeStackDriftDetectionStatusInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackDriftDetectionStatusInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "StackDriftDetectionId"),
&obj.stack_drift_detection_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackDriftDetectionStatusOutput {
pub detection_status: String,
pub detection_status_reason: Option<String>,
pub drifted_stack_resource_count: Option<i64>,
pub stack_drift_detection_id: String,
pub stack_drift_status: Option<String>,
pub stack_id: String,
pub timestamp: String,
}
struct DescribeStackDriftDetectionStatusOutputDeserializer;
impl DescribeStackDriftDetectionStatusOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackDriftDetectionStatusOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackDriftDetectionStatusOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DetectionStatus" => {
obj.detection_status = StackDriftDetectionStatusDeserializer::deserialize(
"DetectionStatus",
stack,
)?;
}
"DetectionStatusReason" => {
obj.detection_status_reason =
Some(StackDriftDetectionStatusReasonDeserializer::deserialize(
"DetectionStatusReason",
stack,
)?);
}
"DriftedStackResourceCount" => {
obj.drifted_stack_resource_count =
Some(BoxedIntegerDeserializer::deserialize(
"DriftedStackResourceCount",
stack,
)?);
}
"StackDriftDetectionId" => {
obj.stack_drift_detection_id =
StackDriftDetectionIdDeserializer::deserialize(
"StackDriftDetectionId",
stack,
)?;
}
"StackDriftStatus" => {
obj.stack_drift_status = Some(StackDriftStatusDeserializer::deserialize(
"StackDriftStatus",
stack,
)?);
}
"StackId" => {
obj.stack_id = StackIdDeserializer::deserialize("StackId", stack)?;
}
"Timestamp" => {
obj.timestamp = TimestampDeserializer::deserialize("Timestamp", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackEventsInput {
pub next_token: Option<String>,
pub stack_name: Option<String>,
}
struct DescribeStackEventsInputSerializer;
impl DescribeStackEventsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackEventsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackEventsOutput {
pub next_token: Option<String>,
pub stack_events: Option<Vec<StackEvent>>,
}
struct DescribeStackEventsOutputDeserializer;
impl DescribeStackEventsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackEventsOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackEventsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"StackEvents" => {
obj.stack_events
.get_or_insert(vec![])
.extend(StackEventsDeserializer::deserialize("StackEvents", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackInstanceInput {
pub stack_instance_account: String,
pub stack_instance_region: String,
pub stack_set_name: String,
}
struct DescribeStackInstanceInputSerializer;
impl DescribeStackInstanceInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackInstanceInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "StackInstanceAccount"),
&obj.stack_instance_account,
);
params.put(
&format!("{}{}", prefix, "StackInstanceRegion"),
&obj.stack_instance_region,
);
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackInstanceOutput {
pub stack_instance: Option<StackInstance>,
}
struct DescribeStackInstanceOutputDeserializer;
impl DescribeStackInstanceOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackInstanceOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackInstanceOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"StackInstance" => {
obj.stack_instance = Some(StackInstanceDeserializer::deserialize(
"StackInstance",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackResourceDriftsInput {
pub max_results: Option<i64>,
pub next_token: Option<String>,
pub stack_name: String,
pub stack_resource_drift_status_filters: Option<Vec<String>>,
}
struct DescribeStackResourceDriftsInputSerializer;
impl DescribeStackResourceDriftsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackResourceDriftsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_results {
params.put(&format!("{}{}", prefix, "MaxResults"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
if let Some(ref field_value) = obj.stack_resource_drift_status_filters {
StackResourceDriftStatusFiltersSerializer::serialize(
params,
&format!("{}{}", prefix, "StackResourceDriftStatusFilters"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackResourceDriftsOutput {
pub next_token: Option<String>,
pub stack_resource_drifts: Vec<StackResourceDrift>,
}
struct DescribeStackResourceDriftsOutputDeserializer;
impl DescribeStackResourceDriftsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackResourceDriftsOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackResourceDriftsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"StackResourceDrifts" => {
obj.stack_resource_drifts.extend(
StackResourceDriftsDeserializer::deserialize(
"StackResourceDrifts",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackResourceInput {
pub logical_resource_id: String,
pub stack_name: String,
}
struct DescribeStackResourceInputSerializer;
impl DescribeStackResourceInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackResourceInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LogicalResourceId"),
&obj.logical_resource_id,
);
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackResourceOutput {
pub stack_resource_detail: Option<StackResourceDetail>,
}
struct DescribeStackResourceOutputDeserializer;
impl DescribeStackResourceOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackResourceOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackResourceOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"StackResourceDetail" => {
obj.stack_resource_detail =
Some(StackResourceDetailDeserializer::deserialize(
"StackResourceDetail",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackResourcesInput {
pub logical_resource_id: Option<String>,
pub physical_resource_id: Option<String>,
pub stack_name: Option<String>,
}
struct DescribeStackResourcesInputSerializer;
impl DescribeStackResourcesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackResourcesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.logical_resource_id {
params.put(&format!("{}{}", prefix, "LogicalResourceId"), &field_value);
}
if let Some(ref field_value) = obj.physical_resource_id {
params.put(&format!("{}{}", prefix, "PhysicalResourceId"), &field_value);
}
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackResourcesOutput {
pub stack_resources: Option<Vec<StackResource>>,
}
struct DescribeStackResourcesOutputDeserializer;
impl DescribeStackResourcesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackResourcesOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackResourcesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"StackResources" => {
obj.stack_resources.get_or_insert(vec![]).extend(
StackResourcesDeserializer::deserialize("StackResources", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackSetInput {
pub stack_set_name: String,
}
struct DescribeStackSetInputSerializer;
impl DescribeStackSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackSetOperationInput {
pub operation_id: String,
pub stack_set_name: String,
}
struct DescribeStackSetOperationInputSerializer;
impl DescribeStackSetOperationInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStackSetOperationInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "OperationId"), &obj.operation_id);
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackSetOperationOutput {
pub stack_set_operation: Option<StackSetOperation>,
}
struct DescribeStackSetOperationOutputDeserializer;
impl DescribeStackSetOperationOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackSetOperationOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackSetOperationOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"StackSetOperation" => {
obj.stack_set_operation = Some(StackSetOperationDeserializer::deserialize(
"StackSetOperation",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStackSetOutput {
pub stack_set: Option<StackSet>,
}
struct DescribeStackSetOutputDeserializer;
impl DescribeStackSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStackSetOutput, XmlParseError> {
deserialize_elements::<_, DescribeStackSetOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"StackSet" => {
obj.stack_set = Some(StackSetDeserializer::deserialize("StackSet", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStacksInput {
pub next_token: Option<String>,
pub stack_name: Option<String>,
}
struct DescribeStacksInputSerializer;
impl DescribeStacksInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeStacksInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeStacksOutput {
pub next_token: Option<String>,
pub stacks: Option<Vec<Stack>>,
}
struct DescribeStacksOutputDeserializer;
impl DescribeStacksOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeStacksOutput, XmlParseError> {
deserialize_elements::<_, DescribeStacksOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"Stacks" => {
obj.stacks
.get_or_insert(vec![])
.extend(StacksDeserializer::deserialize("Stacks", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DescriptionDeserializer;
impl DescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetectStackDriftInput {
pub logical_resource_ids: Option<Vec<String>>,
pub stack_name: String,
}
struct DetectStackDriftInputSerializer;
impl DetectStackDriftInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DetectStackDriftInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.logical_resource_ids {
LogicalResourceIdsSerializer::serialize(
params,
&format!("{}{}", prefix, "LogicalResourceIds"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetectStackDriftOutput {
pub stack_drift_detection_id: String,
}
struct DetectStackDriftOutputDeserializer;
impl DetectStackDriftOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DetectStackDriftOutput, XmlParseError> {
deserialize_elements::<_, DetectStackDriftOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"StackDriftDetectionId" => {
obj.stack_drift_detection_id = StackDriftDetectionIdDeserializer::deserialize(
"StackDriftDetectionId",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetectStackResourceDriftInput {
pub logical_resource_id: String,
pub stack_name: String,
}
struct DetectStackResourceDriftInputSerializer;
impl DetectStackResourceDriftInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DetectStackResourceDriftInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LogicalResourceId"),
&obj.logical_resource_id,
);
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DetectStackResourceDriftOutput {
pub stack_resource_drift: StackResourceDrift,
}
struct DetectStackResourceDriftOutputDeserializer;
impl DetectStackResourceDriftOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DetectStackResourceDriftOutput, XmlParseError> {
deserialize_elements::<_, DetectStackResourceDriftOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"StackResourceDrift" => {
obj.stack_resource_drift = StackResourceDriftDeserializer::deserialize(
"StackResourceDrift",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DifferenceTypeDeserializer;
impl DifferenceTypeDeserializer {
#[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 DisableRollbackDeserializer;
impl DisableRollbackDeserializer {
#[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 EnableTerminationProtectionDeserializer;
impl EnableTerminationProtectionDeserializer {
#[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 EstimateTemplateCostInput {
pub parameters: Option<Vec<Parameter>>,
pub template_body: Option<String>,
pub template_url: Option<String>,
}
struct EstimateTemplateCostInputSerializer;
impl EstimateTemplateCostInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &EstimateTemplateCostInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.parameters {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameters"),
field_value,
);
}
if let Some(ref field_value) = obj.template_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EstimateTemplateCostOutput {
pub url: Option<String>,
}
struct EstimateTemplateCostOutputDeserializer;
impl EstimateTemplateCostOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EstimateTemplateCostOutput, XmlParseError> {
deserialize_elements::<_, EstimateTemplateCostOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Url" => {
obj.url = Some(UrlDeserializer::deserialize("Url", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct EvaluationTypeDeserializer;
impl EvaluationTypeDeserializer {
#[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 EventIdDeserializer;
impl EventIdDeserializer {
#[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 ExecuteChangeSetInput {
pub change_set_name: String,
pub client_request_token: Option<String>,
pub stack_name: Option<String>,
}
struct ExecuteChangeSetInputSerializer;
impl ExecuteChangeSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ExecuteChangeSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ChangeSetName"),
&obj.change_set_name,
);
if let Some(ref field_value) = obj.client_request_token {
params.put(&format!("{}{}", prefix, "ClientRequestToken"), &field_value);
}
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ExecuteChangeSetOutput {}
struct ExecuteChangeSetOutputDeserializer;
impl ExecuteChangeSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ExecuteChangeSetOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = ExecuteChangeSetOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct ExecutionRoleNameDeserializer;
impl ExecutionRoleNameDeserializer {
#[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 ExecutionStatusDeserializer;
impl ExecutionStatusDeserializer {
#[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 Export {
pub exporting_stack_id: Option<String>,
pub name: Option<String>,
pub value: Option<String>,
}
struct ExportDeserializer;
impl ExportDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Export, XmlParseError> {
deserialize_elements::<_, Export, _>(tag_name, stack, |name, stack, obj| {
match name {
"ExportingStackId" => {
obj.exporting_stack_id =
Some(StackIdDeserializer::deserialize("ExportingStackId", stack)?);
}
"Name" => {
obj.name = Some(ExportNameDeserializer::deserialize("Name", stack)?);
}
"Value" => {
obj.value = Some(ExportValueDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ExportNameDeserializer;
impl ExportNameDeserializer {
#[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 ExportValueDeserializer;
impl ExportValueDeserializer {
#[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 ExportsDeserializer;
impl ExportsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Export>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ExportDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct FailureToleranceCountDeserializer;
impl FailureToleranceCountDeserializer {
#[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 FailureTolerancePercentageDeserializer;
impl FailureTolerancePercentageDeserializer {
#[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 GetStackPolicyInput {
pub stack_name: String,
}
struct GetStackPolicyInputSerializer;
impl GetStackPolicyInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetStackPolicyInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetStackPolicyOutput {
pub stack_policy_body: Option<String>,
}
struct GetStackPolicyOutputDeserializer;
impl GetStackPolicyOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetStackPolicyOutput, XmlParseError> {
deserialize_elements::<_, GetStackPolicyOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"StackPolicyBody" => {
obj.stack_policy_body = Some(StackPolicyBodyDeserializer::deserialize(
"StackPolicyBody",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTemplateInput {
pub change_set_name: Option<String>,
pub stack_name: Option<String>,
pub template_stage: Option<String>,
}
struct GetTemplateInputSerializer;
impl GetTemplateInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetTemplateInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.change_set_name {
params.put(&format!("{}{}", prefix, "ChangeSetName"), &field_value);
}
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
if let Some(ref field_value) = obj.template_stage {
params.put(&format!("{}{}", prefix, "TemplateStage"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTemplateOutput {
pub stages_available: Option<Vec<String>>,
pub template_body: Option<String>,
}
struct GetTemplateOutputDeserializer;
impl GetTemplateOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetTemplateOutput, XmlParseError> {
deserialize_elements::<_, GetTemplateOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"StagesAvailable" => {
obj.stages_available.get_or_insert(vec![]).extend(
StageListDeserializer::deserialize("StagesAvailable", stack)?,
);
}
"TemplateBody" => {
obj.template_body = Some(TemplateBodyDeserializer::deserialize(
"TemplateBody",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTemplateSummaryInput {
pub stack_name: Option<String>,
pub stack_set_name: Option<String>,
pub template_body: Option<String>,
pub template_url: Option<String>,
}
struct GetTemplateSummaryInputSerializer;
impl GetTemplateSummaryInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetTemplateSummaryInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.stack_name {
params.put(&format!("{}{}", prefix, "StackName"), &field_value);
}
if let Some(ref field_value) = obj.stack_set_name {
params.put(&format!("{}{}", prefix, "StackSetName"), &field_value);
}
if let Some(ref field_value) = obj.template_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTemplateSummaryOutput {
pub capabilities: Option<Vec<String>>,
pub capabilities_reason: Option<String>,
pub declared_transforms: Option<Vec<String>>,
pub description: Option<String>,
pub metadata: Option<String>,
pub parameters: Option<Vec<ParameterDeclaration>>,
pub resource_types: Option<Vec<String>>,
pub version: Option<String>,
}
struct GetTemplateSummaryOutputDeserializer;
impl GetTemplateSummaryOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetTemplateSummaryOutput, XmlParseError> {
deserialize_elements::<_, GetTemplateSummaryOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Capabilities" => {
obj.capabilities.get_or_insert(vec![]).extend(
CapabilitiesDeserializer::deserialize("Capabilities", stack)?,
);
}
"CapabilitiesReason" => {
obj.capabilities_reason =
Some(CapabilitiesReasonDeserializer::deserialize(
"CapabilitiesReason",
stack,
)?);
}
"DeclaredTransforms" => {
obj.declared_transforms.get_or_insert(vec![]).extend(
TransformsListDeserializer::deserialize("DeclaredTransforms", stack)?,
);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"Metadata" => {
obj.metadata = Some(MetadataDeserializer::deserialize("Metadata", stack)?);
}
"Parameters" => {
obj.parameters.get_or_insert(vec![]).extend(
ParameterDeclarationsDeserializer::deserialize("Parameters", stack)?,
);
}
"ResourceTypes" => {
obj.resource_types.get_or_insert(vec![]).extend(
ResourceTypesDeserializer::deserialize("ResourceTypes", stack)?,
);
}
"Version" => {
obj.version = Some(VersionDeserializer::deserialize("Version", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ImportsDeserializer;
impl ImportsDeserializer {
#[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(StackNameDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct KeyDeserializer;
impl KeyDeserializer {
#[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 LastUpdatedTimeDeserializer;
impl LastUpdatedTimeDeserializer {
#[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 LimitNameDeserializer;
impl LimitNameDeserializer {
#[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 LimitValueDeserializer;
impl LimitValueDeserializer {
#[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 ListChangeSetsInput {
pub next_token: Option<String>,
pub stack_name: String,
}
struct ListChangeSetsInputSerializer;
impl ListChangeSetsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListChangeSetsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListChangeSetsOutput {
pub next_token: Option<String>,
pub summaries: Option<Vec<ChangeSetSummary>>,
}
struct ListChangeSetsOutputDeserializer;
impl ListChangeSetsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListChangeSetsOutput, XmlParseError> {
deserialize_elements::<_, ListChangeSetsOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"Summaries" => {
obj.summaries.get_or_insert(vec![]).extend(
ChangeSetSummariesDeserializer::deserialize("Summaries", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListExportsInput {
pub next_token: Option<String>,
}
struct ListExportsInputSerializer;
impl ListExportsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListExportsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListExportsOutput {
pub exports: Option<Vec<Export>>,
pub next_token: Option<String>,
}
struct ListExportsOutputDeserializer;
impl ListExportsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListExportsOutput, XmlParseError> {
deserialize_elements::<_, ListExportsOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Exports" => {
obj.exports
.get_or_insert(vec![])
.extend(ExportsDeserializer::deserialize("Exports", stack)?);
}
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListImportsInput {
pub export_name: String,
pub next_token: Option<String>,
}
struct ListImportsInputSerializer;
impl ListImportsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListImportsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ExportName"), &obj.export_name);
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListImportsOutput {
pub imports: Option<Vec<String>>,
pub next_token: Option<String>,
}
struct ListImportsOutputDeserializer;
impl ListImportsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListImportsOutput, XmlParseError> {
deserialize_elements::<_, ListImportsOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Imports" => {
obj.imports
.get_or_insert(vec![])
.extend(ImportsDeserializer::deserialize("Imports", stack)?);
}
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackInstancesInput {
pub max_results: Option<i64>,
pub next_token: Option<String>,
pub stack_instance_account: Option<String>,
pub stack_instance_region: Option<String>,
pub stack_set_name: String,
}
struct ListStackInstancesInputSerializer;
impl ListStackInstancesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListStackInstancesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_results {
params.put(&format!("{}{}", prefix, "MaxResults"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.stack_instance_account {
params.put(
&format!("{}{}", prefix, "StackInstanceAccount"),
&field_value,
);
}
if let Some(ref field_value) = obj.stack_instance_region {
params.put(
&format!("{}{}", prefix, "StackInstanceRegion"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackInstancesOutput {
pub next_token: Option<String>,
pub summaries: Option<Vec<StackInstanceSummary>>,
}
struct ListStackInstancesOutputDeserializer;
impl ListStackInstancesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListStackInstancesOutput, XmlParseError> {
deserialize_elements::<_, ListStackInstancesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"Summaries" => {
obj.summaries.get_or_insert(vec![]).extend(
StackInstanceSummariesDeserializer::deserialize("Summaries", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackResourcesInput {
pub next_token: Option<String>,
pub stack_name: String,
}
struct ListStackResourcesInputSerializer;
impl ListStackResourcesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListStackResourcesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackResourcesOutput {
pub next_token: Option<String>,
pub stack_resource_summaries: Option<Vec<StackResourceSummary>>,
}
struct ListStackResourcesOutputDeserializer;
impl ListStackResourcesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListStackResourcesOutput, XmlParseError> {
deserialize_elements::<_, ListStackResourcesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"StackResourceSummaries" => {
obj.stack_resource_summaries.get_or_insert(vec![]).extend(
StackResourceSummariesDeserializer::deserialize(
"StackResourceSummaries",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackSetOperationResultsInput {
pub max_results: Option<i64>,
pub next_token: Option<String>,
pub operation_id: String,
pub stack_set_name: String,
}
struct ListStackSetOperationResultsInputSerializer;
impl ListStackSetOperationResultsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListStackSetOperationResultsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_results {
params.put(&format!("{}{}", prefix, "MaxResults"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
params.put(&format!("{}{}", prefix, "OperationId"), &obj.operation_id);
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackSetOperationResultsOutput {
pub next_token: Option<String>,
pub summaries: Option<Vec<StackSetOperationResultSummary>>,
}
struct ListStackSetOperationResultsOutputDeserializer;
impl ListStackSetOperationResultsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListStackSetOperationResultsOutput, XmlParseError> {
deserialize_elements::<_, ListStackSetOperationResultsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"Summaries" => {
obj.summaries.get_or_insert(vec![]).extend(
StackSetOperationResultSummariesDeserializer::deserialize(
"Summaries",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackSetOperationsInput {
pub max_results: Option<i64>,
pub next_token: Option<String>,
pub stack_set_name: String,
}
struct ListStackSetOperationsInputSerializer;
impl ListStackSetOperationsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListStackSetOperationsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_results {
params.put(&format!("{}{}", prefix, "MaxResults"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackSetOperationsOutput {
pub next_token: Option<String>,
pub summaries: Option<Vec<StackSetOperationSummary>>,
}
struct ListStackSetOperationsOutputDeserializer;
impl ListStackSetOperationsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListStackSetOperationsOutput, XmlParseError> {
deserialize_elements::<_, ListStackSetOperationsOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token =
Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"Summaries" => {
obj.summaries.get_or_insert(vec![]).extend(
StackSetOperationSummariesDeserializer::deserialize(
"Summaries",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackSetsInput {
pub max_results: Option<i64>,
pub next_token: Option<String>,
pub status: Option<String>,
}
struct ListStackSetsInputSerializer;
impl ListStackSetsInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListStackSetsInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.max_results {
params.put(&format!("{}{}", prefix, "MaxResults"), &field_value);
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.status {
params.put(&format!("{}{}", prefix, "Status"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStackSetsOutput {
pub next_token: Option<String>,
pub summaries: Option<Vec<StackSetSummary>>,
}
struct ListStackSetsOutputDeserializer;
impl ListStackSetsOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListStackSetsOutput, XmlParseError> {
deserialize_elements::<_, ListStackSetsOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"Summaries" => {
obj.summaries.get_or_insert(vec![]).extend(
StackSetSummariesDeserializer::deserialize("Summaries", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStacksInput {
pub next_token: Option<String>,
pub stack_status_filter: Option<Vec<String>>,
}
struct ListStacksInputSerializer;
impl ListStacksInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListStacksInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.next_token {
params.put(&format!("{}{}", prefix, "NextToken"), &field_value);
}
if let Some(ref field_value) = obj.stack_status_filter {
StackStatusFilterSerializer::serialize(
params,
&format!("{}{}", prefix, "StackStatusFilter"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListStacksOutput {
pub next_token: Option<String>,
pub stack_summaries: Option<Vec<StackSummary>>,
}
struct ListStacksOutputDeserializer;
impl ListStacksOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListStacksOutput, XmlParseError> {
deserialize_elements::<_, ListStacksOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"NextToken" => {
obj.next_token = Some(NextTokenDeserializer::deserialize("NextToken", stack)?);
}
"StackSummaries" => {
obj.stack_summaries.get_or_insert(vec![]).extend(
StackSummariesDeserializer::deserialize("StackSummaries", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LogicalResourceIdDeserializer;
impl LogicalResourceIdDeserializer {
#[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 LogicalResourceIdsSerializer;
impl LogicalResourceIdsSerializer {
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 MaxConcurrentCountDeserializer;
impl MaxConcurrentCountDeserializer {
#[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 MaxConcurrentPercentageDeserializer;
impl MaxConcurrentPercentageDeserializer {
#[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 MetadataDeserializer;
impl MetadataDeserializer {
#[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 MonitoringTimeInMinutesDeserializer;
impl MonitoringTimeInMinutesDeserializer {
#[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 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 NoEchoDeserializer;
impl NoEchoDeserializer {
#[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 NotificationARNDeserializer;
impl NotificationARNDeserializer {
#[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 NotificationARNsDeserializer;
impl NotificationARNsDeserializer {
#[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(NotificationARNDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct NotificationARNsSerializer;
impl NotificationARNsSerializer {
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 Output {
pub description: Option<String>,
pub export_name: Option<String>,
pub output_key: Option<String>,
pub output_value: Option<String>,
}
struct OutputDeserializer;
impl OutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Output, XmlParseError> {
deserialize_elements::<_, Output, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"ExportName" => {
obj.export_name =
Some(ExportNameDeserializer::deserialize("ExportName", stack)?);
}
"OutputKey" => {
obj.output_key = Some(OutputKeyDeserializer::deserialize("OutputKey", stack)?);
}
"OutputValue" => {
obj.output_value =
Some(OutputValueDeserializer::deserialize("OutputValue", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct OutputKeyDeserializer;
impl OutputKeyDeserializer {
#[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 OutputValueDeserializer;
impl OutputValueDeserializer {
#[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 OutputsDeserializer;
impl OutputsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Output>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(OutputDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Parameter {
pub parameter_key: Option<String>,
pub parameter_value: Option<String>,
pub resolved_value: Option<String>,
pub use_previous_value: Option<bool>,
}
struct ParameterDeserializer;
impl ParameterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Parameter, XmlParseError> {
deserialize_elements::<_, Parameter, _>(tag_name, stack, |name, stack, obj| {
match name {
"ParameterKey" => {
obj.parameter_key = Some(ParameterKeyDeserializer::deserialize(
"ParameterKey",
stack,
)?);
}
"ParameterValue" => {
obj.parameter_value = Some(ParameterValueDeserializer::deserialize(
"ParameterValue",
stack,
)?);
}
"ResolvedValue" => {
obj.resolved_value = Some(ParameterValueDeserializer::deserialize(
"ResolvedValue",
stack,
)?);
}
"UsePreviousValue" => {
obj.use_previous_value = Some(UsePreviousValueDeserializer::deserialize(
"UsePreviousValue",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ParameterSerializer;
impl ParameterSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Parameter) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.parameter_key {
params.put(&format!("{}{}", prefix, "ParameterKey"), &field_value);
}
if let Some(ref field_value) = obj.parameter_value {
params.put(&format!("{}{}", prefix, "ParameterValue"), &field_value);
}
if let Some(ref field_value) = obj.resolved_value {
params.put(&format!("{}{}", prefix, "ResolvedValue"), &field_value);
}
if let Some(ref field_value) = obj.use_previous_value {
params.put(&format!("{}{}", prefix, "UsePreviousValue"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ParameterConstraints {
pub allowed_values: Option<Vec<String>>,
}
struct ParameterConstraintsDeserializer;
impl ParameterConstraintsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ParameterConstraints, XmlParseError> {
deserialize_elements::<_, ParameterConstraints, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllowedValues" => {
obj.allowed_values.get_or_insert(vec![]).extend(
AllowedValuesDeserializer::deserialize("AllowedValues", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ParameterDeclaration {
pub default_value: Option<String>,
pub description: Option<String>,
pub no_echo: Option<bool>,
pub parameter_constraints: Option<ParameterConstraints>,
pub parameter_key: Option<String>,
pub parameter_type: Option<String>,
}
struct ParameterDeclarationDeserializer;
impl ParameterDeclarationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ParameterDeclaration, XmlParseError> {
deserialize_elements::<_, ParameterDeclaration, _>(tag_name, stack, |name, stack, obj| {
match name {
"DefaultValue" => {
obj.default_value = Some(ParameterValueDeserializer::deserialize(
"DefaultValue",
stack,
)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"NoEcho" => {
obj.no_echo = Some(NoEchoDeserializer::deserialize("NoEcho", stack)?);
}
"ParameterConstraints" => {
obj.parameter_constraints =
Some(ParameterConstraintsDeserializer::deserialize(
"ParameterConstraints",
stack,
)?);
}
"ParameterKey" => {
obj.parameter_key = Some(ParameterKeyDeserializer::deserialize(
"ParameterKey",
stack,
)?);
}
"ParameterType" => {
obj.parameter_type = Some(ParameterTypeDeserializer::deserialize(
"ParameterType",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ParameterDeclarationsDeserializer;
impl ParameterDeclarationsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ParameterDeclaration>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ParameterDeclarationDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ParameterKeyDeserializer;
impl ParameterKeyDeserializer {
#[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 ParameterTypeDeserializer;
impl ParameterTypeDeserializer {
#[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 ParameterValueDeserializer;
impl ParameterValueDeserializer {
#[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 ParametersDeserializer;
impl ParametersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Parameter>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ParameterDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ParametersSerializer;
impl ParametersSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Parameter>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ParameterSerializer::serialize(params, &key, obj);
}
}
}
struct PhysicalResourceIdDeserializer;
impl PhysicalResourceIdDeserializer {
#[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 PhysicalResourceIdContextDeserializer;
impl PhysicalResourceIdContextDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PhysicalResourceIdContextKeyValuePair>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(
PhysicalResourceIdContextKeyValuePairDeserializer::deserialize(
"member", stack,
)?,
);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PhysicalResourceIdContextKeyValuePair {
pub key: String,
pub value: String,
}
struct PhysicalResourceIdContextKeyValuePairDeserializer;
impl PhysicalResourceIdContextKeyValuePairDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PhysicalResourceIdContextKeyValuePair, XmlParseError> {
deserialize_elements::<_, PhysicalResourceIdContextKeyValuePair, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Key" => {
obj.key = KeyDeserializer::deserialize("Key", stack)?;
}
"Value" => {
obj.value = ValueDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct PropertiesDeserializer;
impl PropertiesDeserializer {
#[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 PropertyDifference {
pub actual_value: String,
pub difference_type: String,
pub expected_value: String,
pub property_path: String,
}
struct PropertyDifferenceDeserializer;
impl PropertyDifferenceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PropertyDifference, XmlParseError> {
deserialize_elements::<_, PropertyDifference, _>(tag_name, stack, |name, stack, obj| {
match name {
"ActualValue" => {
obj.actual_value =
PropertyValueDeserializer::deserialize("ActualValue", stack)?;
}
"DifferenceType" => {
obj.difference_type =
DifferenceTypeDeserializer::deserialize("DifferenceType", stack)?;
}
"ExpectedValue" => {
obj.expected_value =
PropertyValueDeserializer::deserialize("ExpectedValue", stack)?;
}
"PropertyPath" => {
obj.property_path =
PropertyPathDeserializer::deserialize("PropertyPath", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct PropertyDifferencesDeserializer;
impl PropertyDifferencesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PropertyDifference>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(PropertyDifferenceDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PropertyNameDeserializer;
impl PropertyNameDeserializer {
#[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 PropertyPathDeserializer;
impl PropertyPathDeserializer {
#[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 PropertyValueDeserializer;
impl PropertyValueDeserializer {
#[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 ReasonDeserializer;
impl ReasonDeserializer {
#[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 RegionDeserializer;
impl RegionDeserializer {
#[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 RegionListDeserializer;
impl RegionListDeserializer {
#[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(RegionDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RegionListSerializer;
impl RegionListSerializer {
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 ReplacementDeserializer;
impl ReplacementDeserializer {
#[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 RequiresRecreationDeserializer;
impl RequiresRecreationDeserializer {
#[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 ResourceAttributeDeserializer;
impl ResourceAttributeDeserializer {
#[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 ResourceChange {
pub action: Option<String>,
pub details: Option<Vec<ResourceChangeDetail>>,
pub logical_resource_id: Option<String>,
pub physical_resource_id: Option<String>,
pub replacement: Option<String>,
pub resource_type: Option<String>,
pub scope: Option<Vec<String>>,
}
struct ResourceChangeDeserializer;
impl ResourceChangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceChange, XmlParseError> {
deserialize_elements::<_, ResourceChange, _>(tag_name, stack, |name, stack, obj| {
match name {
"Action" => {
obj.action = Some(ChangeActionDeserializer::deserialize("Action", stack)?);
}
"Details" => {
obj.details.get_or_insert(vec![]).extend(
ResourceChangeDetailsDeserializer::deserialize("Details", stack)?,
);
}
"LogicalResourceId" => {
obj.logical_resource_id = Some(LogicalResourceIdDeserializer::deserialize(
"LogicalResourceId",
stack,
)?);
}
"PhysicalResourceId" => {
obj.physical_resource_id = Some(PhysicalResourceIdDeserializer::deserialize(
"PhysicalResourceId",
stack,
)?);
}
"Replacement" => {
obj.replacement =
Some(ReplacementDeserializer::deserialize("Replacement", stack)?);
}
"ResourceType" => {
obj.resource_type = Some(ResourceTypeDeserializer::deserialize(
"ResourceType",
stack,
)?);
}
"Scope" => {
obj.scope
.get_or_insert(vec![])
.extend(ScopeDeserializer::deserialize("Scope", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceChangeDetail {
pub causing_entity: Option<String>,
pub change_source: Option<String>,
pub evaluation: Option<String>,
pub target: Option<ResourceTargetDefinition>,
}
struct ResourceChangeDetailDeserializer;
impl ResourceChangeDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceChangeDetail, XmlParseError> {
deserialize_elements::<_, ResourceChangeDetail, _>(tag_name, stack, |name, stack, obj| {
match name {
"CausingEntity" => {
obj.causing_entity = Some(CausingEntityDeserializer::deserialize(
"CausingEntity",
stack,
)?);
}
"ChangeSource" => {
obj.change_source = Some(ChangeSourceDeserializer::deserialize(
"ChangeSource",
stack,
)?);
}
"Evaluation" => {
obj.evaluation = Some(EvaluationTypeDeserializer::deserialize(
"Evaluation",
stack,
)?);
}
"Target" => {
obj.target = Some(ResourceTargetDefinitionDeserializer::deserialize(
"Target", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ResourceChangeDetailsDeserializer;
impl ResourceChangeDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ResourceChangeDetail>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ResourceChangeDetailDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ResourcePropertiesDeserializer;
impl ResourcePropertiesDeserializer {
#[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 ResourceStatusDeserializer;
impl ResourceStatusDeserializer {
#[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 ResourceStatusReasonDeserializer;
impl ResourceStatusReasonDeserializer {
#[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 ResourceTargetDefinition {
pub attribute: Option<String>,
pub name: Option<String>,
pub requires_recreation: Option<String>,
}
struct ResourceTargetDefinitionDeserializer;
impl ResourceTargetDefinitionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceTargetDefinition, XmlParseError> {
deserialize_elements::<_, ResourceTargetDefinition, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Attribute" => {
obj.attribute = Some(ResourceAttributeDeserializer::deserialize(
"Attribute",
stack,
)?);
}
"Name" => {
obj.name = Some(PropertyNameDeserializer::deserialize("Name", stack)?);
}
"RequiresRecreation" => {
obj.requires_recreation =
Some(RequiresRecreationDeserializer::deserialize(
"RequiresRecreation",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ResourceTypeDeserializer;
impl ResourceTypeDeserializer {
#[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 ResourceTypesDeserializer;
impl ResourceTypesDeserializer {
#[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(ResourceTypeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ResourceTypesSerializer;
impl ResourceTypesSerializer {
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 ResourcesToSkipSerializer;
impl ResourcesToSkipSerializer {
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 RetainResourcesSerializer;
impl RetainResourcesSerializer {
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 RetainStacksNullableDeserializer;
impl RetainStacksNullableDeserializer {
#[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 RoleARNDeserializer;
impl RoleARNDeserializer {
#[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 RollbackConfiguration {
pub monitoring_time_in_minutes: Option<i64>,
pub rollback_triggers: Option<Vec<RollbackTrigger>>,
}
struct RollbackConfigurationDeserializer;
impl RollbackConfigurationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RollbackConfiguration, XmlParseError> {
deserialize_elements::<_, RollbackConfiguration, _>(tag_name, stack, |name, stack, obj| {
match name {
"MonitoringTimeInMinutes" => {
obj.monitoring_time_in_minutes =
Some(MonitoringTimeInMinutesDeserializer::deserialize(
"MonitoringTimeInMinutes",
stack,
)?);
}
"RollbackTriggers" => {
obj.rollback_triggers.get_or_insert(vec![]).extend(
RollbackTriggersDeserializer::deserialize("RollbackTriggers", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RollbackConfigurationSerializer;
impl RollbackConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RollbackConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.monitoring_time_in_minutes {
params.put(
&format!("{}{}", prefix, "MonitoringTimeInMinutes"),
&field_value,
);
}
if let Some(ref field_value) = obj.rollback_triggers {
RollbackTriggersSerializer::serialize(
params,
&format!("{}{}", prefix, "RollbackTriggers"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RollbackTrigger {
pub arn: String,
pub type_: String,
}
struct RollbackTriggerDeserializer;
impl RollbackTriggerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RollbackTrigger, XmlParseError> {
deserialize_elements::<_, RollbackTrigger, _>(tag_name, stack, |name, stack, obj| {
match name {
"Arn" => {
obj.arn = ArnDeserializer::deserialize("Arn", stack)?;
}
"Type" => {
obj.type_ = TypeDeserializer::deserialize("Type", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RollbackTriggerSerializer;
impl RollbackTriggerSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RollbackTrigger) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Arn"), &obj.arn);
params.put(&format!("{}{}", prefix, "Type"), &obj.type_);
}
}
struct RollbackTriggersDeserializer;
impl RollbackTriggersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RollbackTrigger>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(RollbackTriggerDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RollbackTriggersSerializer;
impl RollbackTriggersSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<RollbackTrigger>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
RollbackTriggerSerializer::serialize(params, &key, obj);
}
}
}
struct ScopeDeserializer;
impl ScopeDeserializer {
#[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(ResourceAttributeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SetStackPolicyInput {
pub stack_name: String,
pub stack_policy_body: Option<String>,
pub stack_policy_url: Option<String>,
}
struct SetStackPolicyInputSerializer;
impl SetStackPolicyInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SetStackPolicyInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
if let Some(ref field_value) = obj.stack_policy_body {
params.put(&format!("{}{}", prefix, "StackPolicyBody"), &field_value);
}
if let Some(ref field_value) = obj.stack_policy_url {
params.put(&format!("{}{}", prefix, "StackPolicyURL"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SignalResourceInput {
pub logical_resource_id: String,
pub stack_name: String,
pub status: String,
pub unique_id: String,
}
struct SignalResourceInputSerializer;
impl SignalResourceInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &SignalResourceInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "LogicalResourceId"),
&obj.logical_resource_id,
);
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
params.put(&format!("{}{}", prefix, "Status"), &obj.status);
params.put(&format!("{}{}", prefix, "UniqueId"), &obj.unique_id);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Stack {
pub capabilities: Option<Vec<String>>,
pub change_set_id: Option<String>,
pub creation_time: String,
pub deletion_time: Option<String>,
pub description: Option<String>,
pub disable_rollback: Option<bool>,
pub drift_information: Option<StackDriftInformation>,
pub enable_termination_protection: Option<bool>,
pub last_updated_time: Option<String>,
pub notification_ar_ns: Option<Vec<String>>,
pub outputs: Option<Vec<Output>>,
pub parameters: Option<Vec<Parameter>>,
pub parent_id: Option<String>,
pub role_arn: Option<String>,
pub rollback_configuration: Option<RollbackConfiguration>,
pub root_id: Option<String>,
pub stack_id: Option<String>,
pub stack_name: String,
pub stack_status: String,
pub stack_status_reason: Option<String>,
pub tags: Option<Vec<Tag>>,
pub timeout_in_minutes: Option<i64>,
}
struct StackDeserializer;
impl StackDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Stack, XmlParseError> {
deserialize_elements::<_, Stack, _>(tag_name, stack, |name, stack, obj| {
match name {
"Capabilities" => {
obj.capabilities.get_or_insert(vec![]).extend(
CapabilitiesDeserializer::deserialize("Capabilities", stack)?,
);
}
"ChangeSetId" => {
obj.change_set_id =
Some(ChangeSetIdDeserializer::deserialize("ChangeSetId", stack)?);
}
"CreationTime" => {
obj.creation_time =
CreationTimeDeserializer::deserialize("CreationTime", stack)?;
}
"DeletionTime" => {
obj.deletion_time = Some(DeletionTimeDeserializer::deserialize(
"DeletionTime",
stack,
)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"DisableRollback" => {
obj.disable_rollback = Some(DisableRollbackDeserializer::deserialize(
"DisableRollback",
stack,
)?);
}
"DriftInformation" => {
obj.drift_information = Some(StackDriftInformationDeserializer::deserialize(
"DriftInformation",
stack,
)?);
}
"EnableTerminationProtection" => {
obj.enable_termination_protection =
Some(EnableTerminationProtectionDeserializer::deserialize(
"EnableTerminationProtection",
stack,
)?);
}
"LastUpdatedTime" => {
obj.last_updated_time = Some(LastUpdatedTimeDeserializer::deserialize(
"LastUpdatedTime",
stack,
)?);
}
"NotificationARNs" => {
obj.notification_ar_ns.get_or_insert(vec![]).extend(
NotificationARNsDeserializer::deserialize("NotificationARNs", stack)?,
);
}
"Outputs" => {
obj.outputs
.get_or_insert(vec![])
.extend(OutputsDeserializer::deserialize("Outputs", stack)?);
}
"Parameters" => {
obj.parameters
.get_or_insert(vec![])
.extend(ParametersDeserializer::deserialize("Parameters", stack)?);
}
"ParentId" => {
obj.parent_id = Some(StackIdDeserializer::deserialize("ParentId", stack)?);
}
"RoleARN" => {
obj.role_arn = Some(RoleARNDeserializer::deserialize("RoleARN", stack)?);
}
"RollbackConfiguration" => {
obj.rollback_configuration =
Some(RollbackConfigurationDeserializer::deserialize(
"RollbackConfiguration",
stack,
)?);
}
"RootId" => {
obj.root_id = Some(StackIdDeserializer::deserialize("RootId", stack)?);
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackName" => {
obj.stack_name = StackNameDeserializer::deserialize("StackName", stack)?;
}
"StackStatus" => {
obj.stack_status = StackStatusDeserializer::deserialize("StackStatus", stack)?;
}
"StackStatusReason" => {
obj.stack_status_reason = Some(StackStatusReasonDeserializer::deserialize(
"StackStatusReason",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagsDeserializer::deserialize("Tags", stack)?);
}
"TimeoutInMinutes" => {
obj.timeout_in_minutes = Some(TimeoutMinutesDeserializer::deserialize(
"TimeoutInMinutes",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackDriftDetectionIdDeserializer;
impl StackDriftDetectionIdDeserializer {
#[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 StackDriftDetectionStatusDeserializer;
impl StackDriftDetectionStatusDeserializer {
#[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 StackDriftDetectionStatusReasonDeserializer;
impl StackDriftDetectionStatusReasonDeserializer {
#[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 StackDriftInformation {
pub last_check_timestamp: Option<String>,
pub stack_drift_status: String,
}
struct StackDriftInformationDeserializer;
impl StackDriftInformationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackDriftInformation, XmlParseError> {
deserialize_elements::<_, StackDriftInformation, _>(tag_name, stack, |name, stack, obj| {
match name {
"LastCheckTimestamp" => {
obj.last_check_timestamp = Some(TimestampDeserializer::deserialize(
"LastCheckTimestamp",
stack,
)?);
}
"StackDriftStatus" => {
obj.stack_drift_status =
StackDriftStatusDeserializer::deserialize("StackDriftStatus", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackDriftInformationSummary {
pub last_check_timestamp: Option<String>,
pub stack_drift_status: String,
}
struct StackDriftInformationSummaryDeserializer;
impl StackDriftInformationSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackDriftInformationSummary, XmlParseError> {
deserialize_elements::<_, StackDriftInformationSummary, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LastCheckTimestamp" => {
obj.last_check_timestamp = Some(TimestampDeserializer::deserialize(
"LastCheckTimestamp",
stack,
)?);
}
"StackDriftStatus" => {
obj.stack_drift_status =
StackDriftStatusDeserializer::deserialize("StackDriftStatus", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct StackDriftStatusDeserializer;
impl StackDriftStatusDeserializer {
#[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 StackEvent {
pub client_request_token: Option<String>,
pub event_id: String,
pub logical_resource_id: Option<String>,
pub physical_resource_id: Option<String>,
pub resource_properties: Option<String>,
pub resource_status: Option<String>,
pub resource_status_reason: Option<String>,
pub resource_type: Option<String>,
pub stack_id: String,
pub stack_name: String,
pub timestamp: String,
}
struct StackEventDeserializer;
impl StackEventDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackEvent, XmlParseError> {
deserialize_elements::<_, StackEvent, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClientRequestToken" => {
obj.client_request_token = Some(ClientRequestTokenDeserializer::deserialize(
"ClientRequestToken",
stack,
)?);
}
"EventId" => {
obj.event_id = EventIdDeserializer::deserialize("EventId", stack)?;
}
"LogicalResourceId" => {
obj.logical_resource_id = Some(LogicalResourceIdDeserializer::deserialize(
"LogicalResourceId",
stack,
)?);
}
"PhysicalResourceId" => {
obj.physical_resource_id = Some(PhysicalResourceIdDeserializer::deserialize(
"PhysicalResourceId",
stack,
)?);
}
"ResourceProperties" => {
obj.resource_properties = Some(ResourcePropertiesDeserializer::deserialize(
"ResourceProperties",
stack,
)?);
}
"ResourceStatus" => {
obj.resource_status = Some(ResourceStatusDeserializer::deserialize(
"ResourceStatus",
stack,
)?);
}
"ResourceStatusReason" => {
obj.resource_status_reason =
Some(ResourceStatusReasonDeserializer::deserialize(
"ResourceStatusReason",
stack,
)?);
}
"ResourceType" => {
obj.resource_type = Some(ResourceTypeDeserializer::deserialize(
"ResourceType",
stack,
)?);
}
"StackId" => {
obj.stack_id = StackIdDeserializer::deserialize("StackId", stack)?;
}
"StackName" => {
obj.stack_name = StackNameDeserializer::deserialize("StackName", stack)?;
}
"Timestamp" => {
obj.timestamp = TimestampDeserializer::deserialize("Timestamp", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackEventsDeserializer;
impl StackEventsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackEvent>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackEventDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct StackIdDeserializer;
impl StackIdDeserializer {
#[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 StackInstance {
pub account: Option<String>,
pub parameter_overrides: Option<Vec<Parameter>>,
pub region: Option<String>,
pub stack_id: Option<String>,
pub stack_set_id: Option<String>,
pub status: Option<String>,
pub status_reason: Option<String>,
}
struct StackInstanceDeserializer;
impl StackInstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackInstance, XmlParseError> {
deserialize_elements::<_, StackInstance, _>(tag_name, stack, |name, stack, obj| {
match name {
"Account" => {
obj.account = Some(AccountDeserializer::deserialize("Account", stack)?);
}
"ParameterOverrides" => {
obj.parameter_overrides.get_or_insert(vec![]).extend(
ParametersDeserializer::deserialize("ParameterOverrides", stack)?,
);
}
"Region" => {
obj.region = Some(RegionDeserializer::deserialize("Region", stack)?);
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackSetId" => {
obj.stack_set_id =
Some(StackSetIdDeserializer::deserialize("StackSetId", stack)?);
}
"Status" => {
obj.status = Some(StackInstanceStatusDeserializer::deserialize(
"Status", stack,
)?);
}
"StatusReason" => {
obj.status_reason =
Some(ReasonDeserializer::deserialize("StatusReason", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackInstanceStatusDeserializer;
impl StackInstanceStatusDeserializer {
#[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 StackInstanceSummariesDeserializer;
impl StackInstanceSummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackInstanceSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackInstanceSummaryDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackInstanceSummary {
pub account: Option<String>,
pub region: Option<String>,
pub stack_id: Option<String>,
pub stack_set_id: Option<String>,
pub status: Option<String>,
pub status_reason: Option<String>,
}
struct StackInstanceSummaryDeserializer;
impl StackInstanceSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackInstanceSummary, XmlParseError> {
deserialize_elements::<_, StackInstanceSummary, _>(tag_name, stack, |name, stack, obj| {
match name {
"Account" => {
obj.account = Some(AccountDeserializer::deserialize("Account", stack)?);
}
"Region" => {
obj.region = Some(RegionDeserializer::deserialize("Region", stack)?);
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackSetId" => {
obj.stack_set_id =
Some(StackSetIdDeserializer::deserialize("StackSetId", stack)?);
}
"Status" => {
obj.status = Some(StackInstanceStatusDeserializer::deserialize(
"Status", stack,
)?);
}
"StatusReason" => {
obj.status_reason =
Some(ReasonDeserializer::deserialize("StatusReason", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackNameDeserializer;
impl StackNameDeserializer {
#[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 StackPolicyBodyDeserializer;
impl StackPolicyBodyDeserializer {
#[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 StackResource {
pub description: Option<String>,
pub drift_information: Option<StackResourceDriftInformation>,
pub logical_resource_id: String,
pub physical_resource_id: Option<String>,
pub resource_status: String,
pub resource_status_reason: Option<String>,
pub resource_type: String,
pub stack_id: Option<String>,
pub stack_name: Option<String>,
pub timestamp: String,
}
struct StackResourceDeserializer;
impl StackResourceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackResource, XmlParseError> {
deserialize_elements::<_, StackResource, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"DriftInformation" => {
obj.drift_information =
Some(StackResourceDriftInformationDeserializer::deserialize(
"DriftInformation",
stack,
)?);
}
"LogicalResourceId" => {
obj.logical_resource_id =
LogicalResourceIdDeserializer::deserialize("LogicalResourceId", stack)?;
}
"PhysicalResourceId" => {
obj.physical_resource_id = Some(PhysicalResourceIdDeserializer::deserialize(
"PhysicalResourceId",
stack,
)?);
}
"ResourceStatus" => {
obj.resource_status =
ResourceStatusDeserializer::deserialize("ResourceStatus", stack)?;
}
"ResourceStatusReason" => {
obj.resource_status_reason =
Some(ResourceStatusReasonDeserializer::deserialize(
"ResourceStatusReason",
stack,
)?);
}
"ResourceType" => {
obj.resource_type =
ResourceTypeDeserializer::deserialize("ResourceType", stack)?;
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackName" => {
obj.stack_name = Some(StackNameDeserializer::deserialize("StackName", stack)?);
}
"Timestamp" => {
obj.timestamp = TimestampDeserializer::deserialize("Timestamp", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackResourceDetail {
pub description: Option<String>,
pub drift_information: Option<StackResourceDriftInformation>,
pub last_updated_timestamp: String,
pub logical_resource_id: String,
pub metadata: Option<String>,
pub physical_resource_id: Option<String>,
pub resource_status: String,
pub resource_status_reason: Option<String>,
pub resource_type: String,
pub stack_id: Option<String>,
pub stack_name: Option<String>,
}
struct StackResourceDetailDeserializer;
impl StackResourceDetailDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackResourceDetail, XmlParseError> {
deserialize_elements::<_, StackResourceDetail, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"DriftInformation" => {
obj.drift_information =
Some(StackResourceDriftInformationDeserializer::deserialize(
"DriftInformation",
stack,
)?);
}
"LastUpdatedTimestamp" => {
obj.last_updated_timestamp =
TimestampDeserializer::deserialize("LastUpdatedTimestamp", stack)?;
}
"LogicalResourceId" => {
obj.logical_resource_id =
LogicalResourceIdDeserializer::deserialize("LogicalResourceId", stack)?;
}
"Metadata" => {
obj.metadata = Some(MetadataDeserializer::deserialize("Metadata", stack)?);
}
"PhysicalResourceId" => {
obj.physical_resource_id = Some(PhysicalResourceIdDeserializer::deserialize(
"PhysicalResourceId",
stack,
)?);
}
"ResourceStatus" => {
obj.resource_status =
ResourceStatusDeserializer::deserialize("ResourceStatus", stack)?;
}
"ResourceStatusReason" => {
obj.resource_status_reason =
Some(ResourceStatusReasonDeserializer::deserialize(
"ResourceStatusReason",
stack,
)?);
}
"ResourceType" => {
obj.resource_type =
ResourceTypeDeserializer::deserialize("ResourceType", stack)?;
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackName" => {
obj.stack_name = Some(StackNameDeserializer::deserialize("StackName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackResourceDrift {
pub actual_properties: Option<String>,
pub expected_properties: Option<String>,
pub logical_resource_id: String,
pub physical_resource_id: Option<String>,
pub physical_resource_id_context: Option<Vec<PhysicalResourceIdContextKeyValuePair>>,
pub property_differences: Option<Vec<PropertyDifference>>,
pub resource_type: String,
pub stack_id: String,
pub stack_resource_drift_status: String,
pub timestamp: String,
}
struct StackResourceDriftDeserializer;
impl StackResourceDriftDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackResourceDrift, XmlParseError> {
deserialize_elements::<_, StackResourceDrift, _>(tag_name, stack, |name, stack, obj| {
match name {
"ActualProperties" => {
obj.actual_properties = Some(PropertiesDeserializer::deserialize(
"ActualProperties",
stack,
)?);
}
"ExpectedProperties" => {
obj.expected_properties = Some(PropertiesDeserializer::deserialize(
"ExpectedProperties",
stack,
)?);
}
"LogicalResourceId" => {
obj.logical_resource_id =
LogicalResourceIdDeserializer::deserialize("LogicalResourceId", stack)?;
}
"PhysicalResourceId" => {
obj.physical_resource_id = Some(PhysicalResourceIdDeserializer::deserialize(
"PhysicalResourceId",
stack,
)?);
}
"PhysicalResourceIdContext" => {
obj.physical_resource_id_context
.get_or_insert(vec![])
.extend(PhysicalResourceIdContextDeserializer::deserialize(
"PhysicalResourceIdContext",
stack,
)?);
}
"PropertyDifferences" => {
obj.property_differences.get_or_insert(vec![]).extend(
PropertyDifferencesDeserializer::deserialize("PropertyDifferences", stack)?,
);
}
"ResourceType" => {
obj.resource_type =
ResourceTypeDeserializer::deserialize("ResourceType", stack)?;
}
"StackId" => {
obj.stack_id = StackIdDeserializer::deserialize("StackId", stack)?;
}
"StackResourceDriftStatus" => {
obj.stack_resource_drift_status =
StackResourceDriftStatusDeserializer::deserialize(
"StackResourceDriftStatus",
stack,
)?;
}
"Timestamp" => {
obj.timestamp = TimestampDeserializer::deserialize("Timestamp", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackResourceDriftInformation {
pub last_check_timestamp: Option<String>,
pub stack_resource_drift_status: String,
}
struct StackResourceDriftInformationDeserializer;
impl StackResourceDriftInformationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackResourceDriftInformation, XmlParseError> {
deserialize_elements::<_, StackResourceDriftInformation, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LastCheckTimestamp" => {
obj.last_check_timestamp = Some(TimestampDeserializer::deserialize(
"LastCheckTimestamp",
stack,
)?);
}
"StackResourceDriftStatus" => {
obj.stack_resource_drift_status =
StackResourceDriftStatusDeserializer::deserialize(
"StackResourceDriftStatus",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackResourceDriftInformationSummary {
pub last_check_timestamp: Option<String>,
pub stack_resource_drift_status: String,
}
struct StackResourceDriftInformationSummaryDeserializer;
impl StackResourceDriftInformationSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackResourceDriftInformationSummary, XmlParseError> {
deserialize_elements::<_, StackResourceDriftInformationSummary, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LastCheckTimestamp" => {
obj.last_check_timestamp = Some(TimestampDeserializer::deserialize(
"LastCheckTimestamp",
stack,
)?);
}
"StackResourceDriftStatus" => {
obj.stack_resource_drift_status =
StackResourceDriftStatusDeserializer::deserialize(
"StackResourceDriftStatus",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct StackResourceDriftStatusDeserializer;
impl StackResourceDriftStatusDeserializer {
#[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 StackResourceDriftStatusFiltersSerializer;
impl StackResourceDriftStatusFiltersSerializer {
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 StackResourceDriftsDeserializer;
impl StackResourceDriftsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackResourceDrift>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackResourceDriftDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct StackResourceSummariesDeserializer;
impl StackResourceSummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackResourceSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackResourceSummaryDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackResourceSummary {
pub drift_information: Option<StackResourceDriftInformationSummary>,
pub last_updated_timestamp: String,
pub logical_resource_id: String,
pub physical_resource_id: Option<String>,
pub resource_status: String,
pub resource_status_reason: Option<String>,
pub resource_type: String,
}
struct StackResourceSummaryDeserializer;
impl StackResourceSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackResourceSummary, XmlParseError> {
deserialize_elements::<_, StackResourceSummary, _>(tag_name, stack, |name, stack, obj| {
match name {
"DriftInformation" => {
obj.drift_information = Some(
StackResourceDriftInformationSummaryDeserializer::deserialize(
"DriftInformation",
stack,
)?,
);
}
"LastUpdatedTimestamp" => {
obj.last_updated_timestamp =
TimestampDeserializer::deserialize("LastUpdatedTimestamp", stack)?;
}
"LogicalResourceId" => {
obj.logical_resource_id =
LogicalResourceIdDeserializer::deserialize("LogicalResourceId", stack)?;
}
"PhysicalResourceId" => {
obj.physical_resource_id = Some(PhysicalResourceIdDeserializer::deserialize(
"PhysicalResourceId",
stack,
)?);
}
"ResourceStatus" => {
obj.resource_status =
ResourceStatusDeserializer::deserialize("ResourceStatus", stack)?;
}
"ResourceStatusReason" => {
obj.resource_status_reason =
Some(ResourceStatusReasonDeserializer::deserialize(
"ResourceStatusReason",
stack,
)?);
}
"ResourceType" => {
obj.resource_type =
ResourceTypeDeserializer::deserialize("ResourceType", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackResourcesDeserializer;
impl StackResourcesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackResource>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackResourceDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackSet {
pub administration_role_arn: Option<String>,
pub capabilities: Option<Vec<String>>,
pub description: Option<String>,
pub execution_role_name: Option<String>,
pub parameters: Option<Vec<Parameter>>,
pub stack_set_arn: Option<String>,
pub stack_set_id: Option<String>,
pub stack_set_name: Option<String>,
pub status: Option<String>,
pub tags: Option<Vec<Tag>>,
pub template_body: Option<String>,
}
struct StackSetDeserializer;
impl StackSetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackSet, XmlParseError> {
deserialize_elements::<_, StackSet, _>(tag_name, stack, |name, stack, obj| {
match name {
"AdministrationRoleARN" => {
obj.administration_role_arn = Some(RoleARNDeserializer::deserialize(
"AdministrationRoleARN",
stack,
)?);
}
"Capabilities" => {
obj.capabilities.get_or_insert(vec![]).extend(
CapabilitiesDeserializer::deserialize("Capabilities", stack)?,
);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"ExecutionRoleName" => {
obj.execution_role_name = Some(ExecutionRoleNameDeserializer::deserialize(
"ExecutionRoleName",
stack,
)?);
}
"Parameters" => {
obj.parameters
.get_or_insert(vec![])
.extend(ParametersDeserializer::deserialize("Parameters", stack)?);
}
"StackSetARN" => {
obj.stack_set_arn =
Some(StackSetARNDeserializer::deserialize("StackSetARN", stack)?);
}
"StackSetId" => {
obj.stack_set_id =
Some(StackSetIdDeserializer::deserialize("StackSetId", stack)?);
}
"StackSetName" => {
obj.stack_set_name = Some(StackSetNameDeserializer::deserialize(
"StackSetName",
stack,
)?);
}
"Status" => {
obj.status = Some(StackSetStatusDeserializer::deserialize("Status", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagsDeserializer::deserialize("Tags", stack)?);
}
"TemplateBody" => {
obj.template_body = Some(TemplateBodyDeserializer::deserialize(
"TemplateBody",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackSetARNDeserializer;
impl StackSetARNDeserializer {
#[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 StackSetIdDeserializer;
impl StackSetIdDeserializer {
#[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 StackSetNameDeserializer;
impl StackSetNameDeserializer {
#[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 StackSetOperation {
pub action: Option<String>,
pub administration_role_arn: Option<String>,
pub creation_timestamp: Option<String>,
pub end_timestamp: Option<String>,
pub execution_role_name: Option<String>,
pub operation_id: Option<String>,
pub operation_preferences: Option<StackSetOperationPreferences>,
pub retain_stacks: Option<bool>,
pub stack_set_id: Option<String>,
pub status: Option<String>,
}
struct StackSetOperationDeserializer;
impl StackSetOperationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackSetOperation, XmlParseError> {
deserialize_elements::<_, StackSetOperation, _>(tag_name, stack, |name, stack, obj| {
match name {
"Action" => {
obj.action = Some(StackSetOperationActionDeserializer::deserialize(
"Action", stack,
)?);
}
"AdministrationRoleARN" => {
obj.administration_role_arn = Some(RoleARNDeserializer::deserialize(
"AdministrationRoleARN",
stack,
)?);
}
"CreationTimestamp" => {
obj.creation_timestamp = Some(TimestampDeserializer::deserialize(
"CreationTimestamp",
stack,
)?);
}
"EndTimestamp" => {
obj.end_timestamp =
Some(TimestampDeserializer::deserialize("EndTimestamp", stack)?);
}
"ExecutionRoleName" => {
obj.execution_role_name = Some(ExecutionRoleNameDeserializer::deserialize(
"ExecutionRoleName",
stack,
)?);
}
"OperationId" => {
obj.operation_id = Some(ClientRequestTokenDeserializer::deserialize(
"OperationId",
stack,
)?);
}
"OperationPreferences" => {
obj.operation_preferences =
Some(StackSetOperationPreferencesDeserializer::deserialize(
"OperationPreferences",
stack,
)?);
}
"RetainStacks" => {
obj.retain_stacks = Some(RetainStacksNullableDeserializer::deserialize(
"RetainStacks",
stack,
)?);
}
"StackSetId" => {
obj.stack_set_id =
Some(StackSetIdDeserializer::deserialize("StackSetId", stack)?);
}
"Status" => {
obj.status = Some(StackSetOperationStatusDeserializer::deserialize(
"Status", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackSetOperationActionDeserializer;
impl StackSetOperationActionDeserializer {
#[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 StackSetOperationPreferences {
pub failure_tolerance_count: Option<i64>,
pub failure_tolerance_percentage: Option<i64>,
pub max_concurrent_count: Option<i64>,
pub max_concurrent_percentage: Option<i64>,
pub region_order: Option<Vec<String>>,
}
struct StackSetOperationPreferencesDeserializer;
impl StackSetOperationPreferencesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackSetOperationPreferences, XmlParseError> {
deserialize_elements::<_, StackSetOperationPreferences, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"FailureToleranceCount" => {
obj.failure_tolerance_count =
Some(FailureToleranceCountDeserializer::deserialize(
"FailureToleranceCount",
stack,
)?);
}
"FailureTolerancePercentage" => {
obj.failure_tolerance_percentage =
Some(FailureTolerancePercentageDeserializer::deserialize(
"FailureTolerancePercentage",
stack,
)?);
}
"MaxConcurrentCount" => {
obj.max_concurrent_count =
Some(MaxConcurrentCountDeserializer::deserialize(
"MaxConcurrentCount",
stack,
)?);
}
"MaxConcurrentPercentage" => {
obj.max_concurrent_percentage =
Some(MaxConcurrentPercentageDeserializer::deserialize(
"MaxConcurrentPercentage",
stack,
)?);
}
"RegionOrder" => {
obj.region_order
.get_or_insert(vec![])
.extend(RegionListDeserializer::deserialize("RegionOrder", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct StackSetOperationPreferencesSerializer;
impl StackSetOperationPreferencesSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StackSetOperationPreferences) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.failure_tolerance_count {
params.put(
&format!("{}{}", prefix, "FailureToleranceCount"),
&field_value,
);
}
if let Some(ref field_value) = obj.failure_tolerance_percentage {
params.put(
&format!("{}{}", prefix, "FailureTolerancePercentage"),
&field_value,
);
}
if let Some(ref field_value) = obj.max_concurrent_count {
params.put(&format!("{}{}", prefix, "MaxConcurrentCount"), &field_value);
}
if let Some(ref field_value) = obj.max_concurrent_percentage {
params.put(
&format!("{}{}", prefix, "MaxConcurrentPercentage"),
&field_value,
);
}
if let Some(ref field_value) = obj.region_order {
RegionListSerializer::serialize(
params,
&format!("{}{}", prefix, "RegionOrder"),
field_value,
);
}
}
}
struct StackSetOperationResultStatusDeserializer;
impl StackSetOperationResultStatusDeserializer {
#[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 StackSetOperationResultSummariesDeserializer;
impl StackSetOperationResultSummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackSetOperationResultSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackSetOperationResultSummaryDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackSetOperationResultSummary {
pub account: Option<String>,
pub account_gate_result: Option<AccountGateResult>,
pub region: Option<String>,
pub status: Option<String>,
pub status_reason: Option<String>,
}
struct StackSetOperationResultSummaryDeserializer;
impl StackSetOperationResultSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackSetOperationResultSummary, XmlParseError> {
deserialize_elements::<_, StackSetOperationResultSummary, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Account" => {
obj.account = Some(AccountDeserializer::deserialize("Account", stack)?);
}
"AccountGateResult" => {
obj.account_gate_result = Some(AccountGateResultDeserializer::deserialize(
"AccountGateResult",
stack,
)?);
}
"Region" => {
obj.region = Some(RegionDeserializer::deserialize("Region", stack)?);
}
"Status" => {
obj.status = Some(StackSetOperationResultStatusDeserializer::deserialize(
"Status", stack,
)?);
}
"StatusReason" => {
obj.status_reason =
Some(ReasonDeserializer::deserialize("StatusReason", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct StackSetOperationStatusDeserializer;
impl StackSetOperationStatusDeserializer {
#[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 StackSetOperationSummariesDeserializer;
impl StackSetOperationSummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackSetOperationSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackSetOperationSummaryDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackSetOperationSummary {
pub action: Option<String>,
pub creation_timestamp: Option<String>,
pub end_timestamp: Option<String>,
pub operation_id: Option<String>,
pub status: Option<String>,
}
struct StackSetOperationSummaryDeserializer;
impl StackSetOperationSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackSetOperationSummary, XmlParseError> {
deserialize_elements::<_, StackSetOperationSummary, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Action" => {
obj.action = Some(StackSetOperationActionDeserializer::deserialize(
"Action", stack,
)?);
}
"CreationTimestamp" => {
obj.creation_timestamp = Some(TimestampDeserializer::deserialize(
"CreationTimestamp",
stack,
)?);
}
"EndTimestamp" => {
obj.end_timestamp =
Some(TimestampDeserializer::deserialize("EndTimestamp", stack)?);
}
"OperationId" => {
obj.operation_id = Some(ClientRequestTokenDeserializer::deserialize(
"OperationId",
stack,
)?);
}
"Status" => {
obj.status = Some(StackSetOperationStatusDeserializer::deserialize(
"Status", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct StackSetStatusDeserializer;
impl StackSetStatusDeserializer {
#[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 StackSetSummariesDeserializer;
impl StackSetSummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackSetSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackSetSummaryDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackSetSummary {
pub description: Option<String>,
pub stack_set_id: Option<String>,
pub stack_set_name: Option<String>,
pub status: Option<String>,
}
struct StackSetSummaryDeserializer;
impl StackSetSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackSetSummary, XmlParseError> {
deserialize_elements::<_, StackSetSummary, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"StackSetId" => {
obj.stack_set_id =
Some(StackSetIdDeserializer::deserialize("StackSetId", stack)?);
}
"StackSetName" => {
obj.stack_set_name = Some(StackSetNameDeserializer::deserialize(
"StackSetName",
stack,
)?);
}
"Status" => {
obj.status = Some(StackSetStatusDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StackStatusDeserializer;
impl StackStatusDeserializer {
#[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 StackStatusFilterSerializer;
impl StackStatusFilterSerializer {
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 StackStatusReasonDeserializer;
impl StackStatusReasonDeserializer {
#[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 StackSummariesDeserializer;
impl StackSummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<StackSummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackSummaryDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StackSummary {
pub creation_time: String,
pub deletion_time: Option<String>,
pub drift_information: Option<StackDriftInformationSummary>,
pub last_updated_time: Option<String>,
pub parent_id: Option<String>,
pub root_id: Option<String>,
pub stack_id: Option<String>,
pub stack_name: String,
pub stack_status: String,
pub stack_status_reason: Option<String>,
pub template_description: Option<String>,
}
struct StackSummaryDeserializer;
impl StackSummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StackSummary, XmlParseError> {
deserialize_elements::<_, StackSummary, _>(tag_name, stack, |name, stack, obj| {
match name {
"CreationTime" => {
obj.creation_time =
CreationTimeDeserializer::deserialize("CreationTime", stack)?;
}
"DeletionTime" => {
obj.deletion_time = Some(DeletionTimeDeserializer::deserialize(
"DeletionTime",
stack,
)?);
}
"DriftInformation" => {
obj.drift_information =
Some(StackDriftInformationSummaryDeserializer::deserialize(
"DriftInformation",
stack,
)?);
}
"LastUpdatedTime" => {
obj.last_updated_time = Some(LastUpdatedTimeDeserializer::deserialize(
"LastUpdatedTime",
stack,
)?);
}
"ParentId" => {
obj.parent_id = Some(StackIdDeserializer::deserialize("ParentId", stack)?);
}
"RootId" => {
obj.root_id = Some(StackIdDeserializer::deserialize("RootId", stack)?);
}
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
"StackName" => {
obj.stack_name = StackNameDeserializer::deserialize("StackName", stack)?;
}
"StackStatus" => {
obj.stack_status = StackStatusDeserializer::deserialize("StackStatus", stack)?;
}
"StackStatusReason" => {
obj.stack_status_reason = Some(StackStatusReasonDeserializer::deserialize(
"StackStatusReason",
stack,
)?);
}
"TemplateDescription" => {
obj.template_description = Some(TemplateDescriptionDeserializer::deserialize(
"TemplateDescription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StacksDeserializer;
impl StacksDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Stack>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StackDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct StageListDeserializer;
impl StageListDeserializer {
#[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(TemplateStageDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StopStackSetOperationInput {
pub operation_id: String,
pub stack_set_name: String,
}
struct StopStackSetOperationInputSerializer;
impl StopStackSetOperationInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StopStackSetOperationInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "OperationId"), &obj.operation_id);
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StopStackSetOperationOutput {}
struct StopStackSetOperationOutputDeserializer;
impl StopStackSetOperationOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StopStackSetOperationOutput, XmlParseError> {
start_element(tag_name, stack)?;
let obj = StopStackSetOperationOutput::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Tag {
pub key: String,
pub value: String,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = TagKeyDeserializer::deserialize("Key", stack)?;
}
"Value" => {
obj.value = TagValueDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TagSerializer;
impl TagSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Tag) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Key"), &obj.key);
params.put(&format!("{}{}", prefix, "Value"), &obj.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 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 TagsDeserializer;
impl TagsDeserializer {
#[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 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);
}
}
}
struct TemplateBodyDeserializer;
impl TemplateBodyDeserializer {
#[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 TemplateDescriptionDeserializer;
impl TemplateDescriptionDeserializer {
#[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 TemplateParameter {
pub default_value: Option<String>,
pub description: Option<String>,
pub no_echo: Option<bool>,
pub parameter_key: Option<String>,
}
struct TemplateParameterDeserializer;
impl TemplateParameterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TemplateParameter, XmlParseError> {
deserialize_elements::<_, TemplateParameter, _>(tag_name, stack, |name, stack, obj| {
match name {
"DefaultValue" => {
obj.default_value = Some(ParameterValueDeserializer::deserialize(
"DefaultValue",
stack,
)?);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"NoEcho" => {
obj.no_echo = Some(NoEchoDeserializer::deserialize("NoEcho", stack)?);
}
"ParameterKey" => {
obj.parameter_key = Some(ParameterKeyDeserializer::deserialize(
"ParameterKey",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TemplateParametersDeserializer;
impl TemplateParametersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TemplateParameter>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(TemplateParameterDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TemplateStageDeserializer;
impl TemplateStageDeserializer {
#[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 TimeoutMinutesDeserializer;
impl TimeoutMinutesDeserializer {
#[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 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 TransformNameDeserializer;
impl TransformNameDeserializer {
#[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 TransformsListDeserializer;
impl TransformsListDeserializer {
#[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(TransformNameDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TypeDeserializer;
impl TypeDeserializer {
#[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 UpdateStackInput {
pub capabilities: Option<Vec<String>>,
pub client_request_token: Option<String>,
pub notification_ar_ns: Option<Vec<String>>,
pub parameters: Option<Vec<Parameter>>,
pub resource_types: Option<Vec<String>>,
pub role_arn: Option<String>,
pub rollback_configuration: Option<RollbackConfiguration>,
pub stack_name: String,
pub stack_policy_body: Option<String>,
pub stack_policy_during_update_body: Option<String>,
pub stack_policy_during_update_url: Option<String>,
pub stack_policy_url: Option<String>,
pub tags: Option<Vec<Tag>>,
pub template_body: Option<String>,
pub template_url: Option<String>,
pub use_previous_template: Option<bool>,
}
struct UpdateStackInputSerializer;
impl UpdateStackInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateStackInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.capabilities {
CapabilitiesSerializer::serialize(
params,
&format!("{}{}", prefix, "Capabilities"),
field_value,
);
}
if let Some(ref field_value) = obj.client_request_token {
params.put(&format!("{}{}", prefix, "ClientRequestToken"), &field_value);
}
if let Some(ref field_value) = obj.notification_ar_ns {
NotificationARNsSerializer::serialize(
params,
&format!("{}{}", prefix, "NotificationARNs"),
field_value,
);
}
if let Some(ref field_value) = obj.parameters {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameters"),
field_value,
);
}
if let Some(ref field_value) = obj.resource_types {
ResourceTypesSerializer::serialize(
params,
&format!("{}{}", prefix, "ResourceTypes"),
field_value,
);
}
if let Some(ref field_value) = obj.role_arn {
params.put(&format!("{}{}", prefix, "RoleARN"), &field_value);
}
if let Some(ref field_value) = obj.rollback_configuration {
RollbackConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "RollbackConfiguration"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
if let Some(ref field_value) = obj.stack_policy_body {
params.put(&format!("{}{}", prefix, "StackPolicyBody"), &field_value);
}
if let Some(ref field_value) = obj.stack_policy_during_update_body {
params.put(
&format!("{}{}", prefix, "StackPolicyDuringUpdateBody"),
&field_value,
);
}
if let Some(ref field_value) = obj.stack_policy_during_update_url {
params.put(
&format!("{}{}", prefix, "StackPolicyDuringUpdateURL"),
&field_value,
);
}
if let Some(ref field_value) = obj.stack_policy_url {
params.put(&format!("{}{}", prefix, "StackPolicyURL"), &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_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
if let Some(ref field_value) = obj.use_previous_template {
params.put(
&format!("{}{}", prefix, "UsePreviousTemplate"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateStackInstancesInput {
pub accounts: Vec<String>,
pub operation_id: Option<String>,
pub operation_preferences: Option<StackSetOperationPreferences>,
pub parameter_overrides: Option<Vec<Parameter>>,
pub regions: Vec<String>,
pub stack_set_name: String,
}
struct UpdateStackInstancesInputSerializer;
impl UpdateStackInstancesInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateStackInstancesInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
AccountListSerializer::serialize(
params,
&format!("{}{}", prefix, "Accounts"),
&obj.accounts,
);
if let Some(ref field_value) = obj.operation_id {
params.put(&format!("{}{}", prefix, "OperationId"), &field_value);
}
if let Some(ref field_value) = obj.operation_preferences {
StackSetOperationPreferencesSerializer::serialize(
params,
&format!("{}{}", prefix, "OperationPreferences"),
field_value,
);
}
if let Some(ref field_value) = obj.parameter_overrides {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "ParameterOverrides"),
field_value,
);
}
RegionListSerializer::serialize(params, &format!("{}{}", prefix, "Regions"), &obj.regions);
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateStackInstancesOutput {
pub operation_id: Option<String>,
}
struct UpdateStackInstancesOutputDeserializer;
impl UpdateStackInstancesOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateStackInstancesOutput, XmlParseError> {
deserialize_elements::<_, UpdateStackInstancesOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"OperationId" => {
obj.operation_id = Some(ClientRequestTokenDeserializer::deserialize(
"OperationId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateStackOutput {
pub stack_id: Option<String>,
}
struct UpdateStackOutputDeserializer;
impl UpdateStackOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateStackOutput, XmlParseError> {
deserialize_elements::<_, UpdateStackOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateStackSetInput {
pub accounts: Option<Vec<String>>,
pub administration_role_arn: Option<String>,
pub capabilities: Option<Vec<String>>,
pub description: Option<String>,
pub execution_role_name: Option<String>,
pub operation_id: Option<String>,
pub operation_preferences: Option<StackSetOperationPreferences>,
pub parameters: Option<Vec<Parameter>>,
pub regions: Option<Vec<String>>,
pub stack_set_name: String,
pub tags: Option<Vec<Tag>>,
pub template_body: Option<String>,
pub template_url: Option<String>,
pub use_previous_template: Option<bool>,
}
struct UpdateStackSetInputSerializer;
impl UpdateStackSetInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateStackSetInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.accounts {
AccountListSerializer::serialize(
params,
&format!("{}{}", prefix, "Accounts"),
field_value,
);
}
if let Some(ref field_value) = obj.administration_role_arn {
params.put(
&format!("{}{}", prefix, "AdministrationRoleARN"),
&field_value,
);
}
if let Some(ref field_value) = obj.capabilities {
CapabilitiesSerializer::serialize(
params,
&format!("{}{}", prefix, "Capabilities"),
field_value,
);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.execution_role_name {
params.put(&format!("{}{}", prefix, "ExecutionRoleName"), &field_value);
}
if let Some(ref field_value) = obj.operation_id {
params.put(&format!("{}{}", prefix, "OperationId"), &field_value);
}
if let Some(ref field_value) = obj.operation_preferences {
StackSetOperationPreferencesSerializer::serialize(
params,
&format!("{}{}", prefix, "OperationPreferences"),
field_value,
);
}
if let Some(ref field_value) = obj.parameters {
ParametersSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameters"),
field_value,
);
}
if let Some(ref field_value) = obj.regions {
RegionListSerializer::serialize(
params,
&format!("{}{}", prefix, "Regions"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "StackSetName"),
&obj.stack_set_name,
);
if let Some(ref field_value) = obj.tags {
TagsSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
}
if let Some(ref field_value) = obj.template_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
if let Some(ref field_value) = obj.use_previous_template {
params.put(
&format!("{}{}", prefix, "UsePreviousTemplate"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateStackSetOutput {
pub operation_id: Option<String>,
}
struct UpdateStackSetOutputDeserializer;
impl UpdateStackSetOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateStackSetOutput, XmlParseError> {
deserialize_elements::<_, UpdateStackSetOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"OperationId" => {
obj.operation_id = Some(ClientRequestTokenDeserializer::deserialize(
"OperationId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTerminationProtectionInput {
pub enable_termination_protection: bool,
pub stack_name: String,
}
struct UpdateTerminationProtectionInputSerializer;
impl UpdateTerminationProtectionInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &UpdateTerminationProtectionInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "EnableTerminationProtection"),
&obj.enable_termination_protection,
);
params.put(&format!("{}{}", prefix, "StackName"), &obj.stack_name);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTerminationProtectionOutput {
pub stack_id: Option<String>,
}
struct UpdateTerminationProtectionOutputDeserializer;
impl UpdateTerminationProtectionOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateTerminationProtectionOutput, XmlParseError> {
deserialize_elements::<_, UpdateTerminationProtectionOutput, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"StackId" => {
obj.stack_id = Some(StackIdDeserializer::deserialize("StackId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct UrlDeserializer;
impl UrlDeserializer {
#[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 UsePreviousValueDeserializer;
impl UsePreviousValueDeserializer {
#[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 ValidateTemplateInput {
pub template_body: Option<String>,
pub template_url: Option<String>,
}
struct ValidateTemplateInputSerializer;
impl ValidateTemplateInputSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ValidateTemplateInput) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.template_body {
params.put(&format!("{}{}", prefix, "TemplateBody"), &field_value);
}
if let Some(ref field_value) = obj.template_url {
params.put(&format!("{}{}", prefix, "TemplateURL"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ValidateTemplateOutput {
pub capabilities: Option<Vec<String>>,
pub capabilities_reason: Option<String>,
pub declared_transforms: Option<Vec<String>>,
pub description: Option<String>,
pub parameters: Option<Vec<TemplateParameter>>,
}
struct ValidateTemplateOutputDeserializer;
impl ValidateTemplateOutputDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ValidateTemplateOutput, XmlParseError> {
deserialize_elements::<_, ValidateTemplateOutput, _>(tag_name, stack, |name, stack, obj| {
match name {
"Capabilities" => {
obj.capabilities.get_or_insert(vec![]).extend(
CapabilitiesDeserializer::deserialize("Capabilities", stack)?,
);
}
"CapabilitiesReason" => {
obj.capabilities_reason = Some(CapabilitiesReasonDeserializer::deserialize(
"CapabilitiesReason",
stack,
)?);
}
"DeclaredTransforms" => {
obj.declared_transforms.get_or_insert(vec![]).extend(
TransformsListDeserializer::deserialize("DeclaredTransforms", stack)?,
);
}
"Description" => {
obj.description =
Some(DescriptionDeserializer::deserialize("Description", stack)?);
}
"Parameters" => {
obj.parameters.get_or_insert(vec![]).extend(
TemplateParametersDeserializer::deserialize("Parameters", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ValueDeserializer;
impl ValueDeserializer {
#[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 VersionDeserializer;
impl VersionDeserializer {
#[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 CancelUpdateStackError {
TokenAlreadyExists(String),
}
impl CancelUpdateStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelUpdateStackError> {
{
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[..] {
"TokenAlreadyExistsException" => {
return RusotoError::Service(CancelUpdateStackError::TokenAlreadyExists(
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 CancelUpdateStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelUpdateStackError {
fn description(&self) -> &str {
match *self {
CancelUpdateStackError::TokenAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ContinueUpdateRollbackError {
TokenAlreadyExists(String),
}
impl ContinueUpdateRollbackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ContinueUpdateRollbackError> {
{
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[..] {
"TokenAlreadyExistsException" => {
return RusotoError::Service(
ContinueUpdateRollbackError::TokenAlreadyExists(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 ContinueUpdateRollbackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ContinueUpdateRollbackError {
fn description(&self) -> &str {
match *self {
ContinueUpdateRollbackError::TokenAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateChangeSetError {
AlreadyExists(String),
InsufficientCapabilities(String),
LimitExceeded(String),
}
impl CreateChangeSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateChangeSetError> {
{
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[..] {
"AlreadyExistsException" => {
return RusotoError::Service(CreateChangeSetError::AlreadyExists(
parsed_error.message,
))
}
"InsufficientCapabilitiesException" => {
return RusotoError::Service(
CreateChangeSetError::InsufficientCapabilities(parsed_error.message),
)
}
"LimitExceededException" => {
return RusotoError::Service(CreateChangeSetError::LimitExceeded(
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 CreateChangeSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateChangeSetError {
fn description(&self) -> &str {
match *self {
CreateChangeSetError::AlreadyExists(ref cause) => cause,
CreateChangeSetError::InsufficientCapabilities(ref cause) => cause,
CreateChangeSetError::LimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStackError {
AlreadyExists(String),
InsufficientCapabilities(String),
LimitExceeded(String),
TokenAlreadyExists(String),
}
impl CreateStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStackError> {
{
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[..] {
"AlreadyExistsException" => {
return RusotoError::Service(CreateStackError::AlreadyExists(
parsed_error.message,
))
}
"InsufficientCapabilitiesException" => {
return RusotoError::Service(CreateStackError::InsufficientCapabilities(
parsed_error.message,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateStackError::LimitExceeded(
parsed_error.message,
))
}
"TokenAlreadyExistsException" => {
return RusotoError::Service(CreateStackError::TokenAlreadyExists(
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 CreateStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStackError {
fn description(&self) -> &str {
match *self {
CreateStackError::AlreadyExists(ref cause) => cause,
CreateStackError::InsufficientCapabilities(ref cause) => cause,
CreateStackError::LimitExceeded(ref cause) => cause,
CreateStackError::TokenAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStackInstancesError {
InvalidOperation(String),
LimitExceeded(String),
OperationIdAlreadyExists(String),
OperationInProgress(String),
StackSetNotFound(String),
StaleRequest(String),
}
impl CreateStackInstancesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStackInstancesError> {
{
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[..] {
"InvalidOperationException" => {
return RusotoError::Service(CreateStackInstancesError::InvalidOperation(
parsed_error.message,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateStackInstancesError::LimitExceeded(
parsed_error.message,
))
}
"OperationIdAlreadyExistsException" => {
return RusotoError::Service(
CreateStackInstancesError::OperationIdAlreadyExists(
parsed_error.message,
),
)
}
"OperationInProgressException" => {
return RusotoError::Service(
CreateStackInstancesError::OperationInProgress(parsed_error.message),
)
}
"StackSetNotFoundException" => {
return RusotoError::Service(CreateStackInstancesError::StackSetNotFound(
parsed_error.message,
))
}
"StaleRequestException" => {
return RusotoError::Service(CreateStackInstancesError::StaleRequest(
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 CreateStackInstancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStackInstancesError {
fn description(&self) -> &str {
match *self {
CreateStackInstancesError::InvalidOperation(ref cause) => cause,
CreateStackInstancesError::LimitExceeded(ref cause) => cause,
CreateStackInstancesError::OperationIdAlreadyExists(ref cause) => cause,
CreateStackInstancesError::OperationInProgress(ref cause) => cause,
CreateStackInstancesError::StackSetNotFound(ref cause) => cause,
CreateStackInstancesError::StaleRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStackSetError {
CreatedButModified(String),
LimitExceeded(String),
NameAlreadyExists(String),
}
impl CreateStackSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStackSetError> {
{
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[..] {
"CreatedButModifiedException" => {
return RusotoError::Service(CreateStackSetError::CreatedButModified(
parsed_error.message,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateStackSetError::LimitExceeded(
parsed_error.message,
))
}
"NameAlreadyExistsException" => {
return RusotoError::Service(CreateStackSetError::NameAlreadyExists(
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 CreateStackSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStackSetError {
fn description(&self) -> &str {
match *self {
CreateStackSetError::CreatedButModified(ref cause) => cause,
CreateStackSetError::LimitExceeded(ref cause) => cause,
CreateStackSetError::NameAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteChangeSetError {
InvalidChangeSetStatus(String),
}
impl DeleteChangeSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteChangeSetError> {
{
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[..] {
"InvalidChangeSetStatus" => {
return RusotoError::Service(DeleteChangeSetError::InvalidChangeSetStatus(
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 DeleteChangeSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteChangeSetError {
fn description(&self) -> &str {
match *self {
DeleteChangeSetError::InvalidChangeSetStatus(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteStackError {
TokenAlreadyExists(String),
}
impl DeleteStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStackError> {
{
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[..] {
"TokenAlreadyExistsException" => {
return RusotoError::Service(DeleteStackError::TokenAlreadyExists(
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 DeleteStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteStackError {
fn description(&self) -> &str {
match *self {
DeleteStackError::TokenAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteStackInstancesError {
InvalidOperation(String),
OperationIdAlreadyExists(String),
OperationInProgress(String),
StackSetNotFound(String),
StaleRequest(String),
}
impl DeleteStackInstancesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStackInstancesError> {
{
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[..] {
"InvalidOperationException" => {
return RusotoError::Service(DeleteStackInstancesError::InvalidOperation(
parsed_error.message,
))
}
"OperationIdAlreadyExistsException" => {
return RusotoError::Service(
DeleteStackInstancesError::OperationIdAlreadyExists(
parsed_error.message,
),
)
}
"OperationInProgressException" => {
return RusotoError::Service(
DeleteStackInstancesError::OperationInProgress(parsed_error.message),
)
}
"StackSetNotFoundException" => {
return RusotoError::Service(DeleteStackInstancesError::StackSetNotFound(
parsed_error.message,
))
}
"StaleRequestException" => {
return RusotoError::Service(DeleteStackInstancesError::StaleRequest(
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 DeleteStackInstancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteStackInstancesError {
fn description(&self) -> &str {
match *self {
DeleteStackInstancesError::InvalidOperation(ref cause) => cause,
DeleteStackInstancesError::OperationIdAlreadyExists(ref cause) => cause,
DeleteStackInstancesError::OperationInProgress(ref cause) => cause,
DeleteStackInstancesError::StackSetNotFound(ref cause) => cause,
DeleteStackInstancesError::StaleRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteStackSetError {
OperationInProgress(String),
StackSetNotEmpty(String),
}
impl DeleteStackSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStackSetError> {
{
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[..] {
"OperationInProgressException" => {
return RusotoError::Service(DeleteStackSetError::OperationInProgress(
parsed_error.message,
))
}
"StackSetNotEmptyException" => {
return RusotoError::Service(DeleteStackSetError::StackSetNotEmpty(
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 DeleteStackSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteStackSetError {
fn description(&self) -> &str {
match *self {
DeleteStackSetError::OperationInProgress(ref cause) => cause,
DeleteStackSetError::StackSetNotEmpty(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountLimitsError {}
impl DescribeAccountLimitsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountLimitsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeAccountLimitsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountLimitsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeChangeSetError {
ChangeSetNotFound(String),
}
impl DescribeChangeSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeChangeSetError> {
{
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[..] {
"ChangeSetNotFound" => {
return RusotoError::Service(DescribeChangeSetError::ChangeSetNotFound(
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 DescribeChangeSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeChangeSetError {
fn description(&self) -> &str {
match *self {
DescribeChangeSetError::ChangeSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackDriftDetectionStatusError {}
impl DescribeStackDriftDetectionStatusError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeStackDriftDetectionStatusError> {
{
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 DescribeStackDriftDetectionStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackDriftDetectionStatusError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackEventsError {}
impl DescribeStackEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStackEventsError> {
{
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 DescribeStackEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackEventsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackInstanceError {
StackInstanceNotFound(String),
StackSetNotFound(String),
}
impl DescribeStackInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStackInstanceError> {
{
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[..] {
"StackInstanceNotFoundException" => {
return RusotoError::Service(
DescribeStackInstanceError::StackInstanceNotFound(parsed_error.message),
)
}
"StackSetNotFoundException" => {
return RusotoError::Service(DescribeStackInstanceError::StackSetNotFound(
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 DescribeStackInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackInstanceError {
fn description(&self) -> &str {
match *self {
DescribeStackInstanceError::StackInstanceNotFound(ref cause) => cause,
DescribeStackInstanceError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackResourceError {}
impl DescribeStackResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStackResourceError> {
{
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 DescribeStackResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackResourceError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackResourceDriftsError {}
impl DescribeStackResourceDriftsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeStackResourceDriftsError> {
{
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 DescribeStackResourceDriftsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackResourceDriftsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackResourcesError {}
impl DescribeStackResourcesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStackResourcesError> {
{
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 DescribeStackResourcesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackResourcesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackSetError {
StackSetNotFound(String),
}
impl DescribeStackSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStackSetError> {
{
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[..] {
"StackSetNotFoundException" => {
return RusotoError::Service(DescribeStackSetError::StackSetNotFound(
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 DescribeStackSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackSetError {
fn description(&self) -> &str {
match *self {
DescribeStackSetError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStackSetOperationError {
OperationNotFound(String),
StackSetNotFound(String),
}
impl DescribeStackSetOperationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStackSetOperationError> {
{
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[..] {
"OperationNotFoundException" => {
return RusotoError::Service(
DescribeStackSetOperationError::OperationNotFound(parsed_error.message),
)
}
"StackSetNotFoundException" => {
return RusotoError::Service(
DescribeStackSetOperationError::StackSetNotFound(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 DescribeStackSetOperationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStackSetOperationError {
fn description(&self) -> &str {
match *self {
DescribeStackSetOperationError::OperationNotFound(ref cause) => cause,
DescribeStackSetOperationError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStacksError {}
impl DescribeStacksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStacksError> {
{
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 DescribeStacksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStacksError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DetectStackDriftError {}
impl DetectStackDriftError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetectStackDriftError> {
{
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 DetectStackDriftError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetectStackDriftError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DetectStackResourceDriftError {}
impl DetectStackResourceDriftError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetectStackResourceDriftError> {
{
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 DetectStackResourceDriftError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetectStackResourceDriftError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum EstimateTemplateCostError {}
impl EstimateTemplateCostError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EstimateTemplateCostError> {
{
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 EstimateTemplateCostError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EstimateTemplateCostError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ExecuteChangeSetError {
ChangeSetNotFound(String),
InsufficientCapabilities(String),
InvalidChangeSetStatus(String),
TokenAlreadyExists(String),
}
impl ExecuteChangeSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ExecuteChangeSetError> {
{
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[..] {
"ChangeSetNotFound" => {
return RusotoError::Service(ExecuteChangeSetError::ChangeSetNotFound(
parsed_error.message,
))
}
"InsufficientCapabilitiesException" => {
return RusotoError::Service(
ExecuteChangeSetError::InsufficientCapabilities(parsed_error.message),
)
}
"InvalidChangeSetStatus" => {
return RusotoError::Service(ExecuteChangeSetError::InvalidChangeSetStatus(
parsed_error.message,
))
}
"TokenAlreadyExistsException" => {
return RusotoError::Service(ExecuteChangeSetError::TokenAlreadyExists(
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 ExecuteChangeSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ExecuteChangeSetError {
fn description(&self) -> &str {
match *self {
ExecuteChangeSetError::ChangeSetNotFound(ref cause) => cause,
ExecuteChangeSetError::InsufficientCapabilities(ref cause) => cause,
ExecuteChangeSetError::InvalidChangeSetStatus(ref cause) => cause,
ExecuteChangeSetError::TokenAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetStackPolicyError {}
impl GetStackPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetStackPolicyError> {
{
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 GetStackPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetStackPolicyError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTemplateError {
ChangeSetNotFound(String),
}
impl GetTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTemplateError> {
{
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[..] {
"ChangeSetNotFound" => {
return RusotoError::Service(GetTemplateError::ChangeSetNotFound(
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 GetTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTemplateError {
fn description(&self) -> &str {
match *self {
GetTemplateError::ChangeSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTemplateSummaryError {
StackSetNotFound(String),
}
impl GetTemplateSummaryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTemplateSummaryError> {
{
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[..] {
"StackSetNotFoundException" => {
return RusotoError::Service(GetTemplateSummaryError::StackSetNotFound(
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 GetTemplateSummaryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTemplateSummaryError {
fn description(&self) -> &str {
match *self {
GetTemplateSummaryError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListChangeSetsError {}
impl ListChangeSetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListChangeSetsError> {
{
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 ListChangeSetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListChangeSetsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListExportsError {}
impl ListExportsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListExportsError> {
{
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 ListExportsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListExportsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListImportsError {}
impl ListImportsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListImportsError> {
{
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 ListImportsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListImportsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListStackInstancesError {
StackSetNotFound(String),
}
impl ListStackInstancesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStackInstancesError> {
{
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[..] {
"StackSetNotFoundException" => {
return RusotoError::Service(ListStackInstancesError::StackSetNotFound(
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 ListStackInstancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListStackInstancesError {
fn description(&self) -> &str {
match *self {
ListStackInstancesError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListStackResourcesError {}
impl ListStackResourcesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStackResourcesError> {
{
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 ListStackResourcesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListStackResourcesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListStackSetOperationResultsError {
OperationNotFound(String),
StackSetNotFound(String),
}
impl ListStackSetOperationResultsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListStackSetOperationResultsError> {
{
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[..] {
"OperationNotFoundException" => {
return RusotoError::Service(
ListStackSetOperationResultsError::OperationNotFound(
parsed_error.message,
),
)
}
"StackSetNotFoundException" => {
return RusotoError::Service(
ListStackSetOperationResultsError::StackSetNotFound(
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 ListStackSetOperationResultsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListStackSetOperationResultsError {
fn description(&self) -> &str {
match *self {
ListStackSetOperationResultsError::OperationNotFound(ref cause) => cause,
ListStackSetOperationResultsError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListStackSetOperationsError {
StackSetNotFound(String),
}
impl ListStackSetOperationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStackSetOperationsError> {
{
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[..] {
"StackSetNotFoundException" => {
return RusotoError::Service(ListStackSetOperationsError::StackSetNotFound(
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 ListStackSetOperationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListStackSetOperationsError {
fn description(&self) -> &str {
match *self {
ListStackSetOperationsError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListStackSetsError {}
impl ListStackSetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStackSetsError> {
{
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 ListStackSetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListStackSetsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListStacksError {}
impl ListStacksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStacksError> {
{
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 ListStacksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListStacksError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SetStackPolicyError {}
impl SetStackPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetStackPolicyError> {
{
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 SetStackPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetStackPolicyError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum SignalResourceError {}
impl SignalResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SignalResourceError> {
{
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 SignalResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SignalResourceError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum StopStackSetOperationError {
InvalidOperation(String),
OperationNotFound(String),
StackSetNotFound(String),
}
impl StopStackSetOperationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopStackSetOperationError> {
{
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[..] {
"InvalidOperationException" => {
return RusotoError::Service(StopStackSetOperationError::InvalidOperation(
parsed_error.message,
))
}
"OperationNotFoundException" => {
return RusotoError::Service(StopStackSetOperationError::OperationNotFound(
parsed_error.message,
))
}
"StackSetNotFoundException" => {
return RusotoError::Service(StopStackSetOperationError::StackSetNotFound(
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 StopStackSetOperationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopStackSetOperationError {
fn description(&self) -> &str {
match *self {
StopStackSetOperationError::InvalidOperation(ref cause) => cause,
StopStackSetOperationError::OperationNotFound(ref cause) => cause,
StopStackSetOperationError::StackSetNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateStackError {
InsufficientCapabilities(String),
TokenAlreadyExists(String),
}
impl UpdateStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStackError> {
{
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[..] {
"InsufficientCapabilitiesException" => {
return RusotoError::Service(UpdateStackError::InsufficientCapabilities(
parsed_error.message,
))
}
"TokenAlreadyExistsException" => {
return RusotoError::Service(UpdateStackError::TokenAlreadyExists(
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 UpdateStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateStackError {
fn description(&self) -> &str {
match *self {
UpdateStackError::InsufficientCapabilities(ref cause) => cause,
UpdateStackError::TokenAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateStackInstancesError {
InvalidOperation(String),
OperationIdAlreadyExists(String),
OperationInProgress(String),
StackInstanceNotFound(String),
StackSetNotFound(String),
StaleRequest(String),
}
impl UpdateStackInstancesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStackInstancesError> {
{
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[..] {
"InvalidOperationException" => {
return RusotoError::Service(UpdateStackInstancesError::InvalidOperation(
parsed_error.message,
))
}
"OperationIdAlreadyExistsException" => {
return RusotoError::Service(
UpdateStackInstancesError::OperationIdAlreadyExists(
parsed_error.message,
),
)
}
"OperationInProgressException" => {
return RusotoError::Service(
UpdateStackInstancesError::OperationInProgress(parsed_error.message),
)
}
"StackInstanceNotFoundException" => {
return RusotoError::Service(
UpdateStackInstancesError::StackInstanceNotFound(parsed_error.message),
)
}
"StackSetNotFoundException" => {
return RusotoError::Service(UpdateStackInstancesError::StackSetNotFound(
parsed_error.message,
))
}
"StaleRequestException" => {
return RusotoError::Service(UpdateStackInstancesError::StaleRequest(
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 UpdateStackInstancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateStackInstancesError {
fn description(&self) -> &str {
match *self {
UpdateStackInstancesError::InvalidOperation(ref cause) => cause,
UpdateStackInstancesError::OperationIdAlreadyExists(ref cause) => cause,
UpdateStackInstancesError::OperationInProgress(ref cause) => cause,
UpdateStackInstancesError::StackInstanceNotFound(ref cause) => cause,
UpdateStackInstancesError::StackSetNotFound(ref cause) => cause,
UpdateStackInstancesError::StaleRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateStackSetError {
InvalidOperation(String),
OperationIdAlreadyExists(String),
OperationInProgress(String),
StackInstanceNotFound(String),
StackSetNotFound(String),
StaleRequest(String),
}
impl UpdateStackSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStackSetError> {
{
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[..] {
"InvalidOperationException" => {
return RusotoError::Service(UpdateStackSetError::InvalidOperation(
parsed_error.message,
))
}
"OperationIdAlreadyExistsException" => {
return RusotoError::Service(UpdateStackSetError::OperationIdAlreadyExists(
parsed_error.message,
))
}
"OperationInProgressException" => {
return RusotoError::Service(UpdateStackSetError::OperationInProgress(
parsed_error.message,
))
}
"StackInstanceNotFoundException" => {
return RusotoError::Service(UpdateStackSetError::StackInstanceNotFound(
parsed_error.message,
))
}
"StackSetNotFoundException" => {
return RusotoError::Service(UpdateStackSetError::StackSetNotFound(
parsed_error.message,
))
}
"StaleRequestException" => {
return RusotoError::Service(UpdateStackSetError::StaleRequest(
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 UpdateStackSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateStackSetError {
fn description(&self) -> &str {
match *self {
UpdateStackSetError::InvalidOperation(ref cause) => cause,
UpdateStackSetError::OperationIdAlreadyExists(ref cause) => cause,
UpdateStackSetError::OperationInProgress(ref cause) => cause,
UpdateStackSetError::StackInstanceNotFound(ref cause) => cause,
UpdateStackSetError::StackSetNotFound(ref cause) => cause,
UpdateStackSetError::StaleRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTerminationProtectionError {}
impl UpdateTerminationProtectionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateTerminationProtectionError> {
{
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 UpdateTerminationProtectionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTerminationProtectionError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ValidateTemplateError {}
impl ValidateTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ValidateTemplateError> {
{
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 ValidateTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ValidateTemplateError {
fn description(&self) -> &str {
match *self {}
}
}
pub trait CloudFormation {
fn cancel_update_stack(
&self,
input: CancelUpdateStackInput,
) -> RusotoFuture<(), CancelUpdateStackError>;
fn continue_update_rollback(
&self,
input: ContinueUpdateRollbackInput,
) -> RusotoFuture<ContinueUpdateRollbackOutput, ContinueUpdateRollbackError>;
fn create_change_set(
&self,
input: CreateChangeSetInput,
) -> RusotoFuture<CreateChangeSetOutput, CreateChangeSetError>;
fn create_stack(
&self,
input: CreateStackInput,
) -> RusotoFuture<CreateStackOutput, CreateStackError>;
fn create_stack_instances(
&self,
input: CreateStackInstancesInput,
) -> RusotoFuture<CreateStackInstancesOutput, CreateStackInstancesError>;
fn create_stack_set(
&self,
input: CreateStackSetInput,
) -> RusotoFuture<CreateStackSetOutput, CreateStackSetError>;
fn delete_change_set(
&self,
input: DeleteChangeSetInput,
) -> RusotoFuture<DeleteChangeSetOutput, DeleteChangeSetError>;
fn delete_stack(&self, input: DeleteStackInput) -> RusotoFuture<(), DeleteStackError>;
fn delete_stack_instances(
&self,
input: DeleteStackInstancesInput,
) -> RusotoFuture<DeleteStackInstancesOutput, DeleteStackInstancesError>;
fn delete_stack_set(
&self,
input: DeleteStackSetInput,
) -> RusotoFuture<DeleteStackSetOutput, DeleteStackSetError>;
fn describe_account_limits(
&self,
input: DescribeAccountLimitsInput,
) -> RusotoFuture<DescribeAccountLimitsOutput, DescribeAccountLimitsError>;
fn describe_change_set(
&self,
input: DescribeChangeSetInput,
) -> RusotoFuture<DescribeChangeSetOutput, DescribeChangeSetError>;
fn describe_stack_drift_detection_status(
&self,
input: DescribeStackDriftDetectionStatusInput,
) -> RusotoFuture<DescribeStackDriftDetectionStatusOutput, DescribeStackDriftDetectionStatusError>;
fn describe_stack_events(
&self,
input: DescribeStackEventsInput,
) -> RusotoFuture<DescribeStackEventsOutput, DescribeStackEventsError>;
fn describe_stack_instance(
&self,
input: DescribeStackInstanceInput,
) -> RusotoFuture<DescribeStackInstanceOutput, DescribeStackInstanceError>;
fn describe_stack_resource(
&self,
input: DescribeStackResourceInput,
) -> RusotoFuture<DescribeStackResourceOutput, DescribeStackResourceError>;
fn describe_stack_resource_drifts(
&self,
input: DescribeStackResourceDriftsInput,
) -> RusotoFuture<DescribeStackResourceDriftsOutput, DescribeStackResourceDriftsError>;
fn describe_stack_resources(
&self,
input: DescribeStackResourcesInput,
) -> RusotoFuture<DescribeStackResourcesOutput, DescribeStackResourcesError>;
fn describe_stack_set(
&self,
input: DescribeStackSetInput,
) -> RusotoFuture<DescribeStackSetOutput, DescribeStackSetError>;
fn describe_stack_set_operation(
&self,
input: DescribeStackSetOperationInput,
) -> RusotoFuture<DescribeStackSetOperationOutput, DescribeStackSetOperationError>;
fn describe_stacks(
&self,
input: DescribeStacksInput,
) -> RusotoFuture<DescribeStacksOutput, DescribeStacksError>;
fn detect_stack_drift(
&self,
input: DetectStackDriftInput,
) -> RusotoFuture<DetectStackDriftOutput, DetectStackDriftError>;
fn detect_stack_resource_drift(
&self,
input: DetectStackResourceDriftInput,
) -> RusotoFuture<DetectStackResourceDriftOutput, DetectStackResourceDriftError>;
fn estimate_template_cost(
&self,
input: EstimateTemplateCostInput,
) -> RusotoFuture<EstimateTemplateCostOutput, EstimateTemplateCostError>;
fn execute_change_set(
&self,
input: ExecuteChangeSetInput,
) -> RusotoFuture<ExecuteChangeSetOutput, ExecuteChangeSetError>;
fn get_stack_policy(
&self,
input: GetStackPolicyInput,
) -> RusotoFuture<GetStackPolicyOutput, GetStackPolicyError>;
fn get_template(
&self,
input: GetTemplateInput,
) -> RusotoFuture<GetTemplateOutput, GetTemplateError>;
fn get_template_summary(
&self,
input: GetTemplateSummaryInput,
) -> RusotoFuture<GetTemplateSummaryOutput, GetTemplateSummaryError>;
fn list_change_sets(
&self,
input: ListChangeSetsInput,
) -> RusotoFuture<ListChangeSetsOutput, ListChangeSetsError>;
fn list_exports(
&self,
input: ListExportsInput,
) -> RusotoFuture<ListExportsOutput, ListExportsError>;
fn list_imports(
&self,
input: ListImportsInput,
) -> RusotoFuture<ListImportsOutput, ListImportsError>;
fn list_stack_instances(
&self,
input: ListStackInstancesInput,
) -> RusotoFuture<ListStackInstancesOutput, ListStackInstancesError>;
fn list_stack_resources(
&self,
input: ListStackResourcesInput,
) -> RusotoFuture<ListStackResourcesOutput, ListStackResourcesError>;
fn list_stack_set_operation_results(
&self,
input: ListStackSetOperationResultsInput,
) -> RusotoFuture<ListStackSetOperationResultsOutput, ListStackSetOperationResultsError>;
fn list_stack_set_operations(
&self,
input: ListStackSetOperationsInput,
) -> RusotoFuture<ListStackSetOperationsOutput, ListStackSetOperationsError>;
fn list_stack_sets(
&self,
input: ListStackSetsInput,
) -> RusotoFuture<ListStackSetsOutput, ListStackSetsError>;
fn list_stacks(
&self,
input: ListStacksInput,
) -> RusotoFuture<ListStacksOutput, ListStacksError>;
fn set_stack_policy(&self, input: SetStackPolicyInput)
-> RusotoFuture<(), SetStackPolicyError>;
fn signal_resource(&self, input: SignalResourceInput) -> RusotoFuture<(), SignalResourceError>;
fn stop_stack_set_operation(
&self,
input: StopStackSetOperationInput,
) -> RusotoFuture<StopStackSetOperationOutput, StopStackSetOperationError>;
fn update_stack(
&self,
input: UpdateStackInput,
) -> RusotoFuture<UpdateStackOutput, UpdateStackError>;
fn update_stack_instances(
&self,
input: UpdateStackInstancesInput,
) -> RusotoFuture<UpdateStackInstancesOutput, UpdateStackInstancesError>;
fn update_stack_set(
&self,
input: UpdateStackSetInput,
) -> RusotoFuture<UpdateStackSetOutput, UpdateStackSetError>;
fn update_termination_protection(
&self,
input: UpdateTerminationProtectionInput,
) -> RusotoFuture<UpdateTerminationProtectionOutput, UpdateTerminationProtectionError>;
fn validate_template(
&self,
input: ValidateTemplateInput,
) -> RusotoFuture<ValidateTemplateOutput, ValidateTemplateError>;
}
#[derive(Clone)]
pub struct CloudFormationClient {
client: Client,
region: region::Region,
}
impl CloudFormationClient {
pub fn new(region: region::Region) -> CloudFormationClient {
CloudFormationClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> CloudFormationClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
CloudFormationClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl CloudFormation for CloudFormationClient {
fn cancel_update_stack(
&self,
input: CancelUpdateStackInput,
) -> RusotoFuture<(), CancelUpdateStackError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CancelUpdateStack");
params.put("Version", "2010-05-15");
CancelUpdateStackInputSerializer::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(CancelUpdateStackError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn continue_update_rollback(
&self,
input: ContinueUpdateRollbackInput,
) -> RusotoFuture<ContinueUpdateRollbackOutput, ContinueUpdateRollbackError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ContinueUpdateRollback");
params.put("Version", "2010-05-15");
ContinueUpdateRollbackInputSerializer::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(ContinueUpdateRollbackError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ContinueUpdateRollbackOutput::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 = ContinueUpdateRollbackOutputDeserializer::deserialize(
"ContinueUpdateRollbackResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_change_set(
&self,
input: CreateChangeSetInput,
) -> RusotoFuture<CreateChangeSetOutput, CreateChangeSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateChangeSet");
params.put("Version", "2010-05-15");
CreateChangeSetInputSerializer::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(CreateChangeSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateChangeSetOutput::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 = CreateChangeSetOutputDeserializer::deserialize(
"CreateChangeSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_stack(
&self,
input: CreateStackInput,
) -> RusotoFuture<CreateStackOutput, CreateStackError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateStack");
params.put("Version", "2010-05-15");
CreateStackInputSerializer::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(CreateStackError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateStackOutput::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 = CreateStackOutputDeserializer::deserialize(
"CreateStackResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_stack_instances(
&self,
input: CreateStackInstancesInput,
) -> RusotoFuture<CreateStackInstancesOutput, CreateStackInstancesError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateStackInstances");
params.put("Version", "2010-05-15");
CreateStackInstancesInputSerializer::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(CreateStackInstancesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateStackInstancesOutput::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 = CreateStackInstancesOutputDeserializer::deserialize(
"CreateStackInstancesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_stack_set(
&self,
input: CreateStackSetInput,
) -> RusotoFuture<CreateStackSetOutput, CreateStackSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateStackSet");
params.put("Version", "2010-05-15");
CreateStackSetInputSerializer::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(CreateStackSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateStackSetOutput::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 = CreateStackSetOutputDeserializer::deserialize(
"CreateStackSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_change_set(
&self,
input: DeleteChangeSetInput,
) -> RusotoFuture<DeleteChangeSetOutput, DeleteChangeSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteChangeSet");
params.put("Version", "2010-05-15");
DeleteChangeSetInputSerializer::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(DeleteChangeSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteChangeSetOutput::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 = DeleteChangeSetOutputDeserializer::deserialize(
"DeleteChangeSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_stack(&self, input: DeleteStackInput) -> RusotoFuture<(), DeleteStackError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteStack");
params.put("Version", "2010-05-15");
DeleteStackInputSerializer::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(DeleteStackError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_stack_instances(
&self,
input: DeleteStackInstancesInput,
) -> RusotoFuture<DeleteStackInstancesOutput, DeleteStackInstancesError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteStackInstances");
params.put("Version", "2010-05-15");
DeleteStackInstancesInputSerializer::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(DeleteStackInstancesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteStackInstancesOutput::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 = DeleteStackInstancesOutputDeserializer::deserialize(
"DeleteStackInstancesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_stack_set(
&self,
input: DeleteStackSetInput,
) -> RusotoFuture<DeleteStackSetOutput, DeleteStackSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteStackSet");
params.put("Version", "2010-05-15");
DeleteStackSetInputSerializer::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(DeleteStackSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteStackSetOutput::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 = DeleteStackSetOutputDeserializer::deserialize(
"DeleteStackSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_account_limits(
&self,
input: DescribeAccountLimitsInput,
) -> RusotoFuture<DescribeAccountLimitsOutput, DescribeAccountLimitsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeAccountLimits");
params.put("Version", "2010-05-15");
DescribeAccountLimitsInputSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAccountLimitsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeAccountLimitsOutput::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeAccountLimitsOutputDeserializer::deserialize(
"DescribeAccountLimitsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_change_set(
&self,
input: DescribeChangeSetInput,
) -> RusotoFuture<DescribeChangeSetOutput, DescribeChangeSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeChangeSet");
params.put("Version", "2010-05-15");
DescribeChangeSetInputSerializer::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(DescribeChangeSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeChangeSetOutput::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 = DescribeChangeSetOutputDeserializer::deserialize(
"DescribeChangeSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_drift_detection_status(
&self,
input: DescribeStackDriftDetectionStatusInput,
) -> RusotoFuture<DescribeStackDriftDetectionStatusOutput, DescribeStackDriftDetectionStatusError>
{
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackDriftDetectionStatus");
params.put("Version", "2010-05-15");
DescribeStackDriftDetectionStatusInputSerializer::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(DescribeStackDriftDetectionStatusError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackDriftDetectionStatusOutput::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 = DescribeStackDriftDetectionStatusOutputDeserializer::deserialize(
"DescribeStackDriftDetectionStatusResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_events(
&self,
input: DescribeStackEventsInput,
) -> RusotoFuture<DescribeStackEventsOutput, DescribeStackEventsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackEvents");
params.put("Version", "2010-05-15");
DescribeStackEventsInputSerializer::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(DescribeStackEventsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackEventsOutput::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 = DescribeStackEventsOutputDeserializer::deserialize(
"DescribeStackEventsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_instance(
&self,
input: DescribeStackInstanceInput,
) -> RusotoFuture<DescribeStackInstanceOutput, DescribeStackInstanceError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackInstance");
params.put("Version", "2010-05-15");
DescribeStackInstanceInputSerializer::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(DescribeStackInstanceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackInstanceOutput::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 = DescribeStackInstanceOutputDeserializer::deserialize(
"DescribeStackInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_resource(
&self,
input: DescribeStackResourceInput,
) -> RusotoFuture<DescribeStackResourceOutput, DescribeStackResourceError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackResource");
params.put("Version", "2010-05-15");
DescribeStackResourceInputSerializer::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(DescribeStackResourceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackResourceOutput::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 = DescribeStackResourceOutputDeserializer::deserialize(
"DescribeStackResourceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_resource_drifts(
&self,
input: DescribeStackResourceDriftsInput,
) -> RusotoFuture<DescribeStackResourceDriftsOutput, DescribeStackResourceDriftsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackResourceDrifts");
params.put("Version", "2010-05-15");
DescribeStackResourceDriftsInputSerializer::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(DescribeStackResourceDriftsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackResourceDriftsOutput::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 = DescribeStackResourceDriftsOutputDeserializer::deserialize(
"DescribeStackResourceDriftsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_resources(
&self,
input: DescribeStackResourcesInput,
) -> RusotoFuture<DescribeStackResourcesOutput, DescribeStackResourcesError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackResources");
params.put("Version", "2010-05-15");
DescribeStackResourcesInputSerializer::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(DescribeStackResourcesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackResourcesOutput::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 = DescribeStackResourcesOutputDeserializer::deserialize(
"DescribeStackResourcesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_set(
&self,
input: DescribeStackSetInput,
) -> RusotoFuture<DescribeStackSetOutput, DescribeStackSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackSet");
params.put("Version", "2010-05-15");
DescribeStackSetInputSerializer::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(DescribeStackSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackSetOutput::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 = DescribeStackSetOutputDeserializer::deserialize(
"DescribeStackSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stack_set_operation(
&self,
input: DescribeStackSetOperationInput,
) -> RusotoFuture<DescribeStackSetOperationOutput, DescribeStackSetOperationError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStackSetOperation");
params.put("Version", "2010-05-15");
DescribeStackSetOperationInputSerializer::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(DescribeStackSetOperationError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStackSetOperationOutput::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 = DescribeStackSetOperationOutputDeserializer::deserialize(
"DescribeStackSetOperationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_stacks(
&self,
input: DescribeStacksInput,
) -> RusotoFuture<DescribeStacksOutput, DescribeStacksError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStacks");
params.put("Version", "2010-05-15");
DescribeStacksInputSerializer::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(DescribeStacksError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeStacksOutput::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 = DescribeStacksOutputDeserializer::deserialize(
"DescribeStacksResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn detect_stack_drift(
&self,
input: DetectStackDriftInput,
) -> RusotoFuture<DetectStackDriftOutput, DetectStackDriftError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DetectStackDrift");
params.put("Version", "2010-05-15");
DetectStackDriftInputSerializer::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(DetectStackDriftError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DetectStackDriftOutput::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 = DetectStackDriftOutputDeserializer::deserialize(
"DetectStackDriftResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn detect_stack_resource_drift(
&self,
input: DetectStackResourceDriftInput,
) -> RusotoFuture<DetectStackResourceDriftOutput, DetectStackResourceDriftError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DetectStackResourceDrift");
params.put("Version", "2010-05-15");
DetectStackResourceDriftInputSerializer::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(DetectStackResourceDriftError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DetectStackResourceDriftOutput::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 = DetectStackResourceDriftOutputDeserializer::deserialize(
"DetectStackResourceDriftResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn estimate_template_cost(
&self,
input: EstimateTemplateCostInput,
) -> RusotoFuture<EstimateTemplateCostOutput, EstimateTemplateCostError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "EstimateTemplateCost");
params.put("Version", "2010-05-15");
EstimateTemplateCostInputSerializer::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(EstimateTemplateCostError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EstimateTemplateCostOutput::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 = EstimateTemplateCostOutputDeserializer::deserialize(
"EstimateTemplateCostResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn execute_change_set(
&self,
input: ExecuteChangeSetInput,
) -> RusotoFuture<ExecuteChangeSetOutput, ExecuteChangeSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ExecuteChangeSet");
params.put("Version", "2010-05-15");
ExecuteChangeSetInputSerializer::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(ExecuteChangeSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ExecuteChangeSetOutput::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 = ExecuteChangeSetOutputDeserializer::deserialize(
"ExecuteChangeSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_stack_policy(
&self,
input: GetStackPolicyInput,
) -> RusotoFuture<GetStackPolicyOutput, GetStackPolicyError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetStackPolicy");
params.put("Version", "2010-05-15");
GetStackPolicyInputSerializer::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(GetStackPolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetStackPolicyOutput::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 = GetStackPolicyOutputDeserializer::deserialize(
"GetStackPolicyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_template(
&self,
input: GetTemplateInput,
) -> RusotoFuture<GetTemplateOutput, GetTemplateError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetTemplate");
params.put("Version", "2010-05-15");
GetTemplateInputSerializer::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(GetTemplateError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetTemplateOutput::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 = GetTemplateOutputDeserializer::deserialize(
"GetTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_template_summary(
&self,
input: GetTemplateSummaryInput,
) -> RusotoFuture<GetTemplateSummaryOutput, GetTemplateSummaryError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetTemplateSummary");
params.put("Version", "2010-05-15");
GetTemplateSummaryInputSerializer::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(GetTemplateSummaryError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetTemplateSummaryOutput::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 = GetTemplateSummaryOutputDeserializer::deserialize(
"GetTemplateSummaryResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_change_sets(
&self,
input: ListChangeSetsInput,
) -> RusotoFuture<ListChangeSetsOutput, ListChangeSetsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListChangeSets");
params.put("Version", "2010-05-15");
ListChangeSetsInputSerializer::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(ListChangeSetsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListChangeSetsOutput::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 = ListChangeSetsOutputDeserializer::deserialize(
"ListChangeSetsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_exports(
&self,
input: ListExportsInput,
) -> RusotoFuture<ListExportsOutput, ListExportsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListExports");
params.put("Version", "2010-05-15");
ListExportsInputSerializer::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(ListExportsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListExportsOutput::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 = ListExportsOutputDeserializer::deserialize(
"ListExportsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_imports(
&self,
input: ListImportsInput,
) -> RusotoFuture<ListImportsOutput, ListImportsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListImports");
params.put("Version", "2010-05-15");
ListImportsInputSerializer::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(ListImportsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListImportsOutput::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 = ListImportsOutputDeserializer::deserialize(
"ListImportsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_stack_instances(
&self,
input: ListStackInstancesInput,
) -> RusotoFuture<ListStackInstancesOutput, ListStackInstancesError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListStackInstances");
params.put("Version", "2010-05-15");
ListStackInstancesInputSerializer::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(ListStackInstancesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListStackInstancesOutput::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 = ListStackInstancesOutputDeserializer::deserialize(
"ListStackInstancesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_stack_resources(
&self,
input: ListStackResourcesInput,
) -> RusotoFuture<ListStackResourcesOutput, ListStackResourcesError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListStackResources");
params.put("Version", "2010-05-15");
ListStackResourcesInputSerializer::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(ListStackResourcesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListStackResourcesOutput::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 = ListStackResourcesOutputDeserializer::deserialize(
"ListStackResourcesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_stack_set_operation_results(
&self,
input: ListStackSetOperationResultsInput,
) -> RusotoFuture<ListStackSetOperationResultsOutput, ListStackSetOperationResultsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListStackSetOperationResults");
params.put("Version", "2010-05-15");
ListStackSetOperationResultsInputSerializer::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(ListStackSetOperationResultsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListStackSetOperationResultsOutput::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 = ListStackSetOperationResultsOutputDeserializer::deserialize(
"ListStackSetOperationResultsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_stack_set_operations(
&self,
input: ListStackSetOperationsInput,
) -> RusotoFuture<ListStackSetOperationsOutput, ListStackSetOperationsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListStackSetOperations");
params.put("Version", "2010-05-15");
ListStackSetOperationsInputSerializer::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(ListStackSetOperationsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListStackSetOperationsOutput::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 = ListStackSetOperationsOutputDeserializer::deserialize(
"ListStackSetOperationsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_stack_sets(
&self,
input: ListStackSetsInput,
) -> RusotoFuture<ListStackSetsOutput, ListStackSetsError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListStackSets");
params.put("Version", "2010-05-15");
ListStackSetsInputSerializer::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(ListStackSetsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListStackSetsOutput::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 = ListStackSetsOutputDeserializer::deserialize(
"ListStackSetsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_stacks(
&self,
input: ListStacksInput,
) -> RusotoFuture<ListStacksOutput, ListStacksError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListStacks");
params.put("Version", "2010-05-15");
ListStacksInputSerializer::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(ListStacksError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ListStacksOutput::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 =
ListStacksOutputDeserializer::deserialize("ListStacksResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn set_stack_policy(
&self,
input: SetStackPolicyInput,
) -> RusotoFuture<(), SetStackPolicyError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SetStackPolicy");
params.put("Version", "2010-05-15");
SetStackPolicyInputSerializer::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(SetStackPolicyError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn signal_resource(&self, input: SignalResourceInput) -> RusotoFuture<(), SignalResourceError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "SignalResource");
params.put("Version", "2010-05-15");
SignalResourceInputSerializer::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(SignalResourceError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn stop_stack_set_operation(
&self,
input: StopStackSetOperationInput,
) -> RusotoFuture<StopStackSetOperationOutput, StopStackSetOperationError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "StopStackSetOperation");
params.put("Version", "2010-05-15");
StopStackSetOperationInputSerializer::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(StopStackSetOperationError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = StopStackSetOperationOutput::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 = StopStackSetOperationOutputDeserializer::deserialize(
"StopStackSetOperationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_stack(
&self,
input: UpdateStackInput,
) -> RusotoFuture<UpdateStackOutput, UpdateStackError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateStack");
params.put("Version", "2010-05-15");
UpdateStackInputSerializer::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(UpdateStackError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateStackOutput::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 = UpdateStackOutputDeserializer::deserialize(
"UpdateStackResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_stack_instances(
&self,
input: UpdateStackInstancesInput,
) -> RusotoFuture<UpdateStackInstancesOutput, UpdateStackInstancesError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateStackInstances");
params.put("Version", "2010-05-15");
UpdateStackInstancesInputSerializer::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(UpdateStackInstancesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateStackInstancesOutput::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 = UpdateStackInstancesOutputDeserializer::deserialize(
"UpdateStackInstancesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_stack_set(
&self,
input: UpdateStackSetInput,
) -> RusotoFuture<UpdateStackSetOutput, UpdateStackSetError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateStackSet");
params.put("Version", "2010-05-15");
UpdateStackSetInputSerializer::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(UpdateStackSetError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateStackSetOutput::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 = UpdateStackSetOutputDeserializer::deserialize(
"UpdateStackSetResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn update_termination_protection(
&self,
input: UpdateTerminationProtectionInput,
) -> RusotoFuture<UpdateTerminationProtectionOutput, UpdateTerminationProtectionError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "UpdateTerminationProtection");
params.put("Version", "2010-05-15");
UpdateTerminationProtectionInputSerializer::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(UpdateTerminationProtectionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = UpdateTerminationProtectionOutput::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 = UpdateTerminationProtectionOutputDeserializer::deserialize(
"UpdateTerminationProtectionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn validate_template(
&self,
input: ValidateTemplateInput,
) -> RusotoFuture<ValidateTemplateOutput, ValidateTemplateError> {
let mut request = SignedRequest::new("POST", "cloudformation", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ValidateTemplate");
params.put("Version", "2010-05-15");
ValidateTemplateInputSerializer::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(ValidateTemplateError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ValidateTemplateOutput::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 = ValidateTemplateOutputDeserializer::deserialize(
"ValidateTemplateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
}
#[cfg(test)]
mod protocol_tests {
extern crate rusoto_mock;
use self::rusoto_mock::*;
use super::*;
use rusoto_core::Region as rusoto_region;
#[test]
fn test_parse_error_cloudformation_cancel_update_stack() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"cloudformation-cancel-update-stack.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
let client =
CloudFormationClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CancelUpdateStackInput::default();
let result = client.cancel_update_stack(request).sync();
assert!(!result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_cloudformation_describe_stacks() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"cloudformation-describe-stacks.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
CloudFormationClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeStacksInput::default();
let result = client.describe_stacks(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_cloudformation_get_template() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"cloudformation-get-template.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
CloudFormationClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetTemplateInput::default();
let result = client.get_template(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_cloudformation_list_stacks() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"cloudformation-list-stacks.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
CloudFormationClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ListStacksInput::default();
let result = client.list_stacks(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}