use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto::xml::error::*;
use rusoto_core::proto::xml::util::{
characters, deserialize_elements, end_element, find_start_element, peek_at_name, skip_tree,
start_element,
};
use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
use rusoto_core::signature::SignedRequest;
use serde_urlencoded;
use std::str::FromStr;
use xml::reader::ParserConfig;
use xml::EventReader;
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AcceptReservedNodeExchangeInputMessage {
pub reserved_node_id: String,
pub target_reserved_node_offering_id: String,
}
struct AcceptReservedNodeExchangeInputMessageSerializer;
impl AcceptReservedNodeExchangeInputMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AcceptReservedNodeExchangeInputMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ReservedNodeId"),
&obj.reserved_node_id,
);
params.put(
&format!("{}{}", prefix, "TargetReservedNodeOfferingId"),
&obj.target_reserved_node_offering_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AcceptReservedNodeExchangeOutputMessage {
pub exchanged_reserved_node: Option<ReservedNode>,
}
struct AcceptReservedNodeExchangeOutputMessageDeserializer;
impl AcceptReservedNodeExchangeOutputMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AcceptReservedNodeExchangeOutputMessage, XmlParseError> {
deserialize_elements::<_, AcceptReservedNodeExchangeOutputMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ExchangedReservedNode" => {
obj.exchanged_reserved_node = Some(ReservedNodeDeserializer::deserialize(
"ExchangedReservedNode",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccountAttribute {
pub attribute_name: Option<String>,
pub attribute_values: Option<Vec<AttributeValueTarget>>,
}
struct AccountAttributeDeserializer;
impl AccountAttributeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountAttribute, XmlParseError> {
deserialize_elements::<_, AccountAttribute, _>(tag_name, stack, |name, stack, obj| {
match name {
"AttributeName" => {
obj.attribute_name =
Some(StringDeserializer::deserialize("AttributeName", stack)?);
}
"AttributeValues" => {
obj.attribute_values.get_or_insert(vec![]).extend(
AttributeValueListDeserializer::deserialize("AttributeValues", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccountAttributeList {
pub account_attributes: Option<Vec<AccountAttribute>>,
}
struct AccountAttributeListDeserializer;
impl AccountAttributeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountAttributeList, XmlParseError> {
deserialize_elements::<_, AccountAttributeList, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccountAttributes" => {
obj.account_attributes.get_or_insert(vec![]).extend(
AttributeListDeserializer::deserialize("AccountAttributes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccountWithRestoreAccess {
pub account_alias: Option<String>,
pub account_id: Option<String>,
}
struct AccountWithRestoreAccessDeserializer;
impl AccountWithRestoreAccessDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountWithRestoreAccess, XmlParseError> {
deserialize_elements::<_, AccountWithRestoreAccess, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AccountAlias" => {
obj.account_alias =
Some(StringDeserializer::deserialize("AccountAlias", stack)?);
}
"AccountId" => {
obj.account_id = Some(StringDeserializer::deserialize("AccountId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AccountsWithRestoreAccessListDeserializer;
impl AccountsWithRestoreAccessListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AccountWithRestoreAccess>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AccountWithRestoreAccess" {
obj.push(AccountWithRestoreAccessDeserializer::deserialize(
"AccountWithRestoreAccess",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AssociatedClusterListDeserializer;
impl AssociatedClusterListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterAssociatedToSchedule>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterAssociatedToSchedule" {
obj.push(ClusterAssociatedToScheduleDeserializer::deserialize(
"ClusterAssociatedToSchedule",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AttributeListDeserializer;
impl AttributeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AccountAttribute>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AccountAttribute" {
obj.push(AccountAttributeDeserializer::deserialize(
"AccountAttribute",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AttributeNameListSerializer;
impl AttributeNameListSerializer {
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 AttributeValueListDeserializer;
impl AttributeValueListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AttributeValueTarget>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AttributeValueTarget" {
obj.push(AttributeValueTargetDeserializer::deserialize(
"AttributeValueTarget",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AttributeValueTarget {
pub attribute_value: Option<String>,
}
struct AttributeValueTargetDeserializer;
impl AttributeValueTargetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AttributeValueTarget, XmlParseError> {
deserialize_elements::<_, AttributeValueTarget, _>(tag_name, stack, |name, stack, obj| {
match name {
"AttributeValue" => {
obj.attribute_value =
Some(StringDeserializer::deserialize("AttributeValue", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AuthorizeClusterSecurityGroupIngressMessage {
pub cidrip: Option<String>,
pub cluster_security_group_name: String,
pub ec2_security_group_name: Option<String>,
pub ec2_security_group_owner_id: Option<String>,
}
struct AuthorizeClusterSecurityGroupIngressMessageSerializer;
impl AuthorizeClusterSecurityGroupIngressMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &AuthorizeClusterSecurityGroupIngressMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cidrip {
params.put(&format!("{}{}", prefix, "CIDRIP"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
&obj.cluster_security_group_name,
);
if let Some(ref field_value) = obj.ec2_security_group_name {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.ec2_security_group_owner_id {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupOwnerId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AuthorizeClusterSecurityGroupIngressResult {
pub cluster_security_group: Option<ClusterSecurityGroup>,
}
struct AuthorizeClusterSecurityGroupIngressResultDeserializer;
impl AuthorizeClusterSecurityGroupIngressResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AuthorizeClusterSecurityGroupIngressResult, XmlParseError> {
deserialize_elements::<_, AuthorizeClusterSecurityGroupIngressResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroup" => {
obj.cluster_security_group =
Some(ClusterSecurityGroupDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AuthorizeSnapshotAccessMessage {
pub account_with_restore_access: String,
pub snapshot_cluster_identifier: Option<String>,
pub snapshot_identifier: String,
}
struct AuthorizeSnapshotAccessMessageSerializer;
impl AuthorizeSnapshotAccessMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AuthorizeSnapshotAccessMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AccountWithRestoreAccess"),
&obj.account_with_restore_access,
);
if let Some(ref field_value) = obj.snapshot_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SnapshotClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AuthorizeSnapshotAccessResult {
pub snapshot: Option<Snapshot>,
}
struct AuthorizeSnapshotAccessResultDeserializer;
impl AuthorizeSnapshotAccessResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AuthorizeSnapshotAccessResult, XmlParseError> {
deserialize_elements::<_, AuthorizeSnapshotAccessResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AvailabilityZone {
pub name: Option<String>,
pub supported_platforms: Option<Vec<SupportedPlatform>>,
}
struct AvailabilityZoneDeserializer;
impl AvailabilityZoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AvailabilityZone, XmlParseError> {
deserialize_elements::<_, AvailabilityZone, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"SupportedPlatforms" => {
obj.supported_platforms.get_or_insert(vec![]).extend(
SupportedPlatformsListDeserializer::deserialize(
"SupportedPlatforms",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AvailabilityZoneListDeserializer;
impl AvailabilityZoneListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AvailabilityZone>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AvailabilityZone" {
obj.push(AvailabilityZoneDeserializer::deserialize(
"AvailabilityZone",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BatchDeleteClusterSnapshotsRequest {
pub identifiers: Vec<DeleteClusterSnapshotMessage>,
}
struct BatchDeleteClusterSnapshotsRequestSerializer;
impl BatchDeleteClusterSnapshotsRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BatchDeleteClusterSnapshotsRequest) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
DeleteClusterSnapshotMessageListSerializer::serialize(
params,
&format!("{}{}", prefix, "DeleteClusterSnapshotMessage"),
&obj.identifiers,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BatchDeleteClusterSnapshotsResult {
pub errors: Option<Vec<SnapshotErrorMessage>>,
pub resources: Option<Vec<String>>,
}
struct BatchDeleteClusterSnapshotsResultDeserializer;
impl BatchDeleteClusterSnapshotsResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<BatchDeleteClusterSnapshotsResult, XmlParseError> {
deserialize_elements::<_, BatchDeleteClusterSnapshotsResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Errors" => {
obj.errors.get_or_insert(vec![]).extend(
BatchSnapshotOperationErrorListDeserializer::deserialize(
"Errors", stack,
)?,
);
}
"Resources" => {
obj.resources.get_or_insert(vec![]).extend(
SnapshotIdentifierListDeserializer::deserialize("Resources", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BatchModifyClusterSnapshotsMessage {
pub force: Option<bool>,
pub manual_snapshot_retention_period: Option<i64>,
pub snapshot_identifier_list: Vec<String>,
}
struct BatchModifyClusterSnapshotsMessageSerializer;
impl BatchModifyClusterSnapshotsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BatchModifyClusterSnapshotsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.force {
params.put(&format!("{}{}", prefix, "Force"), &field_value);
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
SnapshotIdentifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "String"),
&obj.snapshot_identifier_list,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BatchModifyClusterSnapshotsOutputMessage {
pub errors: Option<Vec<SnapshotErrorMessage>>,
pub resources: Option<Vec<String>>,
}
struct BatchModifyClusterSnapshotsOutputMessageDeserializer;
impl BatchModifyClusterSnapshotsOutputMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<BatchModifyClusterSnapshotsOutputMessage, XmlParseError> {
deserialize_elements::<_, BatchModifyClusterSnapshotsOutputMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Errors" => {
obj.errors.get_or_insert(vec![]).extend(
BatchSnapshotOperationErrorsDeserializer::deserialize("Errors", stack)?,
);
}
"Resources" => {
obj.resources.get_or_insert(vec![]).extend(
SnapshotIdentifierListDeserializer::deserialize("Resources", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct BatchSnapshotOperationErrorListDeserializer;
impl BatchSnapshotOperationErrorListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SnapshotErrorMessage>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SnapshotErrorMessage" {
obj.push(SnapshotErrorMessageDeserializer::deserialize(
"SnapshotErrorMessage",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct BatchSnapshotOperationErrorsDeserializer;
impl BatchSnapshotOperationErrorsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SnapshotErrorMessage>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SnapshotErrorMessage" {
obj.push(SnapshotErrorMessageDeserializer::deserialize(
"SnapshotErrorMessage",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct BooleanDeserializer;
impl BooleanDeserializer {
#[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 BooleanOptionalDeserializer;
impl BooleanOptionalDeserializer {
#[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 CancelResizeMessage {
pub cluster_identifier: String,
}
struct CancelResizeMessageSerializer;
impl CancelResizeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CancelResizeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Cluster {
pub allow_version_upgrade: Option<bool>,
pub automated_snapshot_retention_period: Option<i64>,
pub availability_zone: Option<String>,
pub cluster_create_time: Option<String>,
pub cluster_identifier: Option<String>,
pub cluster_nodes: Option<Vec<ClusterNode>>,
pub cluster_parameter_groups: Option<Vec<ClusterParameterGroupStatus>>,
pub cluster_public_key: Option<String>,
pub cluster_revision_number: Option<String>,
pub cluster_security_groups: Option<Vec<ClusterSecurityGroupMembership>>,
pub cluster_snapshot_copy_status: Option<ClusterSnapshotCopyStatus>,
pub cluster_status: Option<String>,
pub cluster_subnet_group_name: Option<String>,
pub cluster_version: Option<String>,
pub db_name: Option<String>,
pub data_transfer_progress: Option<DataTransferProgress>,
pub deferred_maintenance_windows: Option<Vec<DeferredMaintenanceWindow>>,
pub elastic_ip_status: Option<ElasticIpStatus>,
pub elastic_resize_number_of_node_options: Option<String>,
pub encrypted: Option<bool>,
pub endpoint: Option<Endpoint>,
pub enhanced_vpc_routing: Option<bool>,
pub hsm_status: Option<HsmStatus>,
pub iam_roles: Option<Vec<ClusterIamRole>>,
pub kms_key_id: Option<String>,
pub maintenance_track_name: Option<String>,
pub manual_snapshot_retention_period: Option<i64>,
pub master_username: Option<String>,
pub modify_status: Option<String>,
pub node_type: Option<String>,
pub number_of_nodes: Option<i64>,
pub pending_actions: Option<Vec<String>>,
pub pending_modified_values: Option<PendingModifiedValues>,
pub preferred_maintenance_window: Option<String>,
pub publicly_accessible: Option<bool>,
pub resize_info: Option<ResizeInfo>,
pub restore_status: Option<RestoreStatus>,
pub snapshot_schedule_identifier: Option<String>,
pub snapshot_schedule_state: Option<String>,
pub tags: Option<Vec<Tag>>,
pub vpc_id: Option<String>,
pub vpc_security_groups: Option<Vec<VpcSecurityGroupMembership>>,
}
struct ClusterDeserializer;
impl ClusterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Cluster, XmlParseError> {
deserialize_elements::<_, Cluster, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllowVersionUpgrade" => {
obj.allow_version_upgrade = Some(BooleanDeserializer::deserialize(
"AllowVersionUpgrade",
stack,
)?);
}
"AutomatedSnapshotRetentionPeriod" => {
obj.automated_snapshot_retention_period =
Some(IntegerDeserializer::deserialize(
"AutomatedSnapshotRetentionPeriod",
stack,
)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"ClusterCreateTime" => {
obj.cluster_create_time =
Some(TStampDeserializer::deserialize("ClusterCreateTime", stack)?);
}
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"ClusterNodes" => {
obj.cluster_nodes.get_or_insert(vec![]).extend(
ClusterNodesListDeserializer::deserialize("ClusterNodes", stack)?,
);
}
"ClusterParameterGroups" => {
obj.cluster_parameter_groups.get_or_insert(vec![]).extend(
ClusterParameterGroupStatusListDeserializer::deserialize(
"ClusterParameterGroups",
stack,
)?,
);
}
"ClusterPublicKey" => {
obj.cluster_public_key =
Some(StringDeserializer::deserialize("ClusterPublicKey", stack)?);
}
"ClusterRevisionNumber" => {
obj.cluster_revision_number = Some(StringDeserializer::deserialize(
"ClusterRevisionNumber",
stack,
)?);
}
"ClusterSecurityGroups" => {
obj.cluster_security_groups.get_or_insert(vec![]).extend(
ClusterSecurityGroupMembershipListDeserializer::deserialize(
"ClusterSecurityGroups",
stack,
)?,
);
}
"ClusterSnapshotCopyStatus" => {
obj.cluster_snapshot_copy_status =
Some(ClusterSnapshotCopyStatusDeserializer::deserialize(
"ClusterSnapshotCopyStatus",
stack,
)?);
}
"ClusterStatus" => {
obj.cluster_status =
Some(StringDeserializer::deserialize("ClusterStatus", stack)?);
}
"ClusterSubnetGroupName" => {
obj.cluster_subnet_group_name = Some(StringDeserializer::deserialize(
"ClusterSubnetGroupName",
stack,
)?);
}
"ClusterVersion" => {
obj.cluster_version =
Some(StringDeserializer::deserialize("ClusterVersion", stack)?);
}
"DBName" => {
obj.db_name = Some(StringDeserializer::deserialize("DBName", stack)?);
}
"DataTransferProgress" => {
obj.data_transfer_progress =
Some(DataTransferProgressDeserializer::deserialize(
"DataTransferProgress",
stack,
)?);
}
"DeferredMaintenanceWindows" => {
obj.deferred_maintenance_windows
.get_or_insert(vec![])
.extend(DeferredMaintenanceWindowsListDeserializer::deserialize(
"DeferredMaintenanceWindows",
stack,
)?);
}
"ElasticIpStatus" => {
obj.elastic_ip_status = Some(ElasticIpStatusDeserializer::deserialize(
"ElasticIpStatus",
stack,
)?);
}
"ElasticResizeNumberOfNodeOptions" => {
obj.elastic_resize_number_of_node_options = Some(
StringDeserializer::deserialize("ElasticResizeNumberOfNodeOptions", stack)?,
);
}
"Encrypted" => {
obj.encrypted = Some(BooleanDeserializer::deserialize("Encrypted", stack)?);
}
"Endpoint" => {
obj.endpoint = Some(EndpointDeserializer::deserialize("Endpoint", stack)?);
}
"EnhancedVpcRouting" => {
obj.enhanced_vpc_routing = Some(BooleanDeserializer::deserialize(
"EnhancedVpcRouting",
stack,
)?);
}
"HsmStatus" => {
obj.hsm_status = Some(HsmStatusDeserializer::deserialize("HsmStatus", stack)?);
}
"IamRoles" => {
obj.iam_roles.get_or_insert(vec![]).extend(
ClusterIamRoleListDeserializer::deserialize("IamRoles", stack)?,
);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"MaintenanceTrackName" => {
obj.maintenance_track_name = Some(StringDeserializer::deserialize(
"MaintenanceTrackName",
stack,
)?);
}
"ManualSnapshotRetentionPeriod" => {
obj.manual_snapshot_retention_period = Some(IntegerDeserializer::deserialize(
"ManualSnapshotRetentionPeriod",
stack,
)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"ModifyStatus" => {
obj.modify_status =
Some(StringDeserializer::deserialize("ModifyStatus", stack)?);
}
"NodeType" => {
obj.node_type = Some(StringDeserializer::deserialize("NodeType", stack)?);
}
"NumberOfNodes" => {
obj.number_of_nodes =
Some(IntegerDeserializer::deserialize("NumberOfNodes", stack)?);
}
"PendingActions" => {
obj.pending_actions.get_or_insert(vec![]).extend(
PendingActionsListDeserializer::deserialize("PendingActions", stack)?,
);
}
"PendingModifiedValues" => {
obj.pending_modified_values =
Some(PendingModifiedValuesDeserializer::deserialize(
"PendingModifiedValues",
stack,
)?);
}
"PreferredMaintenanceWindow" => {
obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
"PreferredMaintenanceWindow",
stack,
)?);
}
"PubliclyAccessible" => {
obj.publicly_accessible = Some(BooleanDeserializer::deserialize(
"PubliclyAccessible",
stack,
)?);
}
"ResizeInfo" => {
obj.resize_info =
Some(ResizeInfoDeserializer::deserialize("ResizeInfo", stack)?);
}
"RestoreStatus" => {
obj.restore_status = Some(RestoreStatusDeserializer::deserialize(
"RestoreStatus",
stack,
)?);
}
"SnapshotScheduleIdentifier" => {
obj.snapshot_schedule_identifier = Some(StringDeserializer::deserialize(
"SnapshotScheduleIdentifier",
stack,
)?);
}
"SnapshotScheduleState" => {
obj.snapshot_schedule_state = Some(ScheduleStateDeserializer::deserialize(
"SnapshotScheduleState",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
"VpcSecurityGroups" => {
obj.vpc_security_groups.get_or_insert(vec![]).extend(
VpcSecurityGroupMembershipListDeserializer::deserialize(
"VpcSecurityGroups",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterAssociatedToSchedule {
pub cluster_identifier: Option<String>,
pub schedule_association_state: Option<String>,
}
struct ClusterAssociatedToScheduleDeserializer;
impl ClusterAssociatedToScheduleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterAssociatedToSchedule, XmlParseError> {
deserialize_elements::<_, ClusterAssociatedToSchedule, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"ScheduleAssociationState" => {
obj.schedule_association_state =
Some(ScheduleStateDeserializer::deserialize(
"ScheduleAssociationState",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterCredentials {
pub db_password: Option<String>,
pub db_user: Option<String>,
pub expiration: Option<String>,
}
struct ClusterCredentialsDeserializer;
impl ClusterCredentialsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterCredentials, XmlParseError> {
deserialize_elements::<_, ClusterCredentials, _>(tag_name, stack, |name, stack, obj| {
match name {
"DbPassword" => {
obj.db_password = Some(SensitiveStringDeserializer::deserialize(
"DbPassword",
stack,
)?);
}
"DbUser" => {
obj.db_user = Some(StringDeserializer::deserialize("DbUser", stack)?);
}
"Expiration" => {
obj.expiration = Some(TStampDeserializer::deserialize("Expiration", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterDbRevision {
pub cluster_identifier: Option<String>,
pub current_database_revision: Option<String>,
pub database_revision_release_date: Option<String>,
pub revision_targets: Option<Vec<RevisionTarget>>,
}
struct ClusterDbRevisionDeserializer;
impl ClusterDbRevisionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterDbRevision, XmlParseError> {
deserialize_elements::<_, ClusterDbRevision, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"CurrentDatabaseRevision" => {
obj.current_database_revision = Some(StringDeserializer::deserialize(
"CurrentDatabaseRevision",
stack,
)?);
}
"DatabaseRevisionReleaseDate" => {
obj.database_revision_release_date = Some(TStampDeserializer::deserialize(
"DatabaseRevisionReleaseDate",
stack,
)?);
}
"RevisionTargets" => {
obj.revision_targets.get_or_insert(vec![]).extend(
RevisionTargetsListDeserializer::deserialize("RevisionTargets", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ClusterDbRevisionsListDeserializer;
impl ClusterDbRevisionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterDbRevision>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterDbRevision" {
obj.push(ClusterDbRevisionDeserializer::deserialize(
"ClusterDbRevision",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterDbRevisionsMessage {
pub cluster_db_revisions: Option<Vec<ClusterDbRevision>>,
pub marker: Option<String>,
}
struct ClusterDbRevisionsMessageDeserializer;
impl ClusterDbRevisionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterDbRevisionsMessage, XmlParseError> {
deserialize_elements::<_, ClusterDbRevisionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterDbRevisions" => {
obj.cluster_db_revisions.get_or_insert(vec![]).extend(
ClusterDbRevisionsListDeserializer::deserialize(
"ClusterDbRevisions",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterIamRole {
pub apply_status: Option<String>,
pub iam_role_arn: Option<String>,
}
struct ClusterIamRoleDeserializer;
impl ClusterIamRoleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterIamRole, XmlParseError> {
deserialize_elements::<_, ClusterIamRole, _>(tag_name, stack, |name, stack, obj| {
match name {
"ApplyStatus" => {
obj.apply_status = Some(StringDeserializer::deserialize("ApplyStatus", stack)?);
}
"IamRoleArn" => {
obj.iam_role_arn = Some(StringDeserializer::deserialize("IamRoleArn", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ClusterIamRoleListDeserializer;
impl ClusterIamRoleListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterIamRole>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterIamRole" {
obj.push(ClusterIamRoleDeserializer::deserialize(
"ClusterIamRole",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ClusterListDeserializer;
impl ClusterListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Cluster>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Cluster" {
obj.push(ClusterDeserializer::deserialize("Cluster", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterNode {
pub node_role: Option<String>,
pub private_ip_address: Option<String>,
pub public_ip_address: Option<String>,
}
struct ClusterNodeDeserializer;
impl ClusterNodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterNode, XmlParseError> {
deserialize_elements::<_, ClusterNode, _>(tag_name, stack, |name, stack, obj| {
match name {
"NodeRole" => {
obj.node_role = Some(StringDeserializer::deserialize("NodeRole", stack)?);
}
"PrivateIPAddress" => {
obj.private_ip_address =
Some(StringDeserializer::deserialize("PrivateIPAddress", stack)?);
}
"PublicIPAddress" => {
obj.public_ip_address =
Some(StringDeserializer::deserialize("PublicIPAddress", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ClusterNodesListDeserializer;
impl ClusterNodesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterNode>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ClusterNodeDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterParameterGroup {
pub description: Option<String>,
pub parameter_group_family: Option<String>,
pub parameter_group_name: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct ClusterParameterGroupDeserializer;
impl ClusterParameterGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterParameterGroup, XmlParseError> {
deserialize_elements::<_, ClusterParameterGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"ParameterGroupFamily" => {
obj.parameter_group_family = Some(StringDeserializer::deserialize(
"ParameterGroupFamily",
stack,
)?);
}
"ParameterGroupName" => {
obj.parameter_group_name = Some(StringDeserializer::deserialize(
"ParameterGroupName",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterParameterGroupDetails {
pub marker: Option<String>,
pub parameters: Option<Vec<Parameter>>,
}
struct ClusterParameterGroupDetailsDeserializer;
impl ClusterParameterGroupDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterParameterGroupDetails, XmlParseError> {
deserialize_elements::<_, ClusterParameterGroupDetails, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"Parameters" => {
obj.parameters.get_or_insert(vec![]).extend(
ParametersListDeserializer::deserialize("Parameters", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterParameterGroupNameMessage {
pub parameter_group_name: Option<String>,
pub parameter_group_status: Option<String>,
}
struct ClusterParameterGroupNameMessageDeserializer;
impl ClusterParameterGroupNameMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterParameterGroupNameMessage, XmlParseError> {
deserialize_elements::<_, ClusterParameterGroupNameMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ParameterGroupName" => {
obj.parameter_group_name = Some(StringDeserializer::deserialize(
"ParameterGroupName",
stack,
)?);
}
"ParameterGroupStatus" => {
obj.parameter_group_status = Some(StringDeserializer::deserialize(
"ParameterGroupStatus",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterParameterGroupStatus {
pub cluster_parameter_status_list: Option<Vec<ClusterParameterStatus>>,
pub parameter_apply_status: Option<String>,
pub parameter_group_name: Option<String>,
}
struct ClusterParameterGroupStatusDeserializer;
impl ClusterParameterGroupStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterParameterGroupStatus, XmlParseError> {
deserialize_elements::<_, ClusterParameterGroupStatus, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterParameterStatusList" => {
obj.cluster_parameter_status_list
.get_or_insert(vec![])
.extend(ClusterParameterStatusListDeserializer::deserialize(
"ClusterParameterStatusList",
stack,
)?);
}
"ParameterApplyStatus" => {
obj.parameter_apply_status = Some(StringDeserializer::deserialize(
"ParameterApplyStatus",
stack,
)?);
}
"ParameterGroupName" => {
obj.parameter_group_name = Some(StringDeserializer::deserialize(
"ParameterGroupName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ClusterParameterGroupStatusListDeserializer;
impl ClusterParameterGroupStatusListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterParameterGroupStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterParameterGroup" {
obj.push(ClusterParameterGroupStatusDeserializer::deserialize(
"ClusterParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterParameterGroupsMessage {
pub marker: Option<String>,
pub parameter_groups: Option<Vec<ClusterParameterGroup>>,
}
struct ClusterParameterGroupsMessageDeserializer;
impl ClusterParameterGroupsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterParameterGroupsMessage, XmlParseError> {
deserialize_elements::<_, ClusterParameterGroupsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ParameterGroups" => {
obj.parameter_groups.get_or_insert(vec![]).extend(
ParameterGroupListDeserializer::deserialize("ParameterGroups", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterParameterStatus {
pub parameter_apply_error_description: Option<String>,
pub parameter_apply_status: Option<String>,
pub parameter_name: Option<String>,
}
struct ClusterParameterStatusDeserializer;
impl ClusterParameterStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterParameterStatus, XmlParseError> {
deserialize_elements::<_, ClusterParameterStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"ParameterApplyErrorDescription" => {
obj.parameter_apply_error_description = Some(StringDeserializer::deserialize(
"ParameterApplyErrorDescription",
stack,
)?);
}
"ParameterApplyStatus" => {
obj.parameter_apply_status = Some(StringDeserializer::deserialize(
"ParameterApplyStatus",
stack,
)?);
}
"ParameterName" => {
obj.parameter_name =
Some(StringDeserializer::deserialize("ParameterName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ClusterParameterStatusListDeserializer;
impl ClusterParameterStatusListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterParameterStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(ClusterParameterStatusDeserializer::deserialize(
"member", stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterSecurityGroup {
pub cluster_security_group_name: Option<String>,
pub description: Option<String>,
pub ec2_security_groups: Option<Vec<EC2SecurityGroup>>,
pub ip_ranges: Option<Vec<IPRange>>,
pub tags: Option<Vec<Tag>>,
}
struct ClusterSecurityGroupDeserializer;
impl ClusterSecurityGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterSecurityGroup, XmlParseError> {
deserialize_elements::<_, ClusterSecurityGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterSecurityGroupName" => {
obj.cluster_security_group_name = Some(StringDeserializer::deserialize(
"ClusterSecurityGroupName",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"EC2SecurityGroups" => {
obj.ec2_security_groups.get_or_insert(vec![]).extend(
EC2SecurityGroupListDeserializer::deserialize("EC2SecurityGroups", stack)?,
);
}
"IPRanges" => {
obj.ip_ranges
.get_or_insert(vec![])
.extend(IPRangeListDeserializer::deserialize("IPRanges", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterSecurityGroupMembership {
pub cluster_security_group_name: Option<String>,
pub status: Option<String>,
}
struct ClusterSecurityGroupMembershipDeserializer;
impl ClusterSecurityGroupMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterSecurityGroupMembership, XmlParseError> {
deserialize_elements::<_, ClusterSecurityGroupMembership, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroupName" => {
obj.cluster_security_group_name = Some(StringDeserializer::deserialize(
"ClusterSecurityGroupName",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ClusterSecurityGroupMembershipListDeserializer;
impl ClusterSecurityGroupMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterSecurityGroupMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterSecurityGroup" {
obj.push(ClusterSecurityGroupMembershipDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterSecurityGroupMessage {
pub cluster_security_groups: Option<Vec<ClusterSecurityGroup>>,
pub marker: Option<String>,
}
struct ClusterSecurityGroupMessageDeserializer;
impl ClusterSecurityGroupMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterSecurityGroupMessage, XmlParseError> {
deserialize_elements::<_, ClusterSecurityGroupMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroups" => {
obj.cluster_security_groups.get_or_insert(vec![]).extend(
ClusterSecurityGroupsDeserializer::deserialize(
"ClusterSecurityGroups",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ClusterSecurityGroupNameListSerializer;
impl ClusterSecurityGroupNameListSerializer {
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 ClusterSecurityGroupsDeserializer;
impl ClusterSecurityGroupsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterSecurityGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterSecurityGroup" {
obj.push(ClusterSecurityGroupDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterSnapshotCopyStatus {
pub destination_region: Option<String>,
pub manual_snapshot_retention_period: Option<i64>,
pub retention_period: Option<i64>,
pub snapshot_copy_grant_name: Option<String>,
}
struct ClusterSnapshotCopyStatusDeserializer;
impl ClusterSnapshotCopyStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterSnapshotCopyStatus, XmlParseError> {
deserialize_elements::<_, ClusterSnapshotCopyStatus, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DestinationRegion" => {
obj.destination_region =
Some(StringDeserializer::deserialize("DestinationRegion", stack)?);
}
"ManualSnapshotRetentionPeriod" => {
obj.manual_snapshot_retention_period =
Some(IntegerDeserializer::deserialize(
"ManualSnapshotRetentionPeriod",
stack,
)?);
}
"RetentionPeriod" => {
obj.retention_period =
Some(LongDeserializer::deserialize("RetentionPeriod", stack)?);
}
"SnapshotCopyGrantName" => {
obj.snapshot_copy_grant_name = Some(StringDeserializer::deserialize(
"SnapshotCopyGrantName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterSubnetGroup {
pub cluster_subnet_group_name: Option<String>,
pub description: Option<String>,
pub subnet_group_status: Option<String>,
pub subnets: Option<Vec<Subnet>>,
pub tags: Option<Vec<Tag>>,
pub vpc_id: Option<String>,
}
struct ClusterSubnetGroupDeserializer;
impl ClusterSubnetGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterSubnetGroup, XmlParseError> {
deserialize_elements::<_, ClusterSubnetGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterSubnetGroupName" => {
obj.cluster_subnet_group_name = Some(StringDeserializer::deserialize(
"ClusterSubnetGroupName",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"SubnetGroupStatus" => {
obj.subnet_group_status =
Some(StringDeserializer::deserialize("SubnetGroupStatus", stack)?);
}
"Subnets" => {
obj.subnets
.get_or_insert(vec![])
.extend(SubnetListDeserializer::deserialize("Subnets", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterSubnetGroupMessage {
pub cluster_subnet_groups: Option<Vec<ClusterSubnetGroup>>,
pub marker: Option<String>,
}
struct ClusterSubnetGroupMessageDeserializer;
impl ClusterSubnetGroupMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterSubnetGroupMessage, XmlParseError> {
deserialize_elements::<_, ClusterSubnetGroupMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSubnetGroups" => {
obj.cluster_subnet_groups.get_or_insert(vec![]).extend(
ClusterSubnetGroupsDeserializer::deserialize(
"ClusterSubnetGroups",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ClusterSubnetGroupsDeserializer;
impl ClusterSubnetGroupsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterSubnetGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterSubnetGroup" {
obj.push(ClusterSubnetGroupDeserializer::deserialize(
"ClusterSubnetGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterVersion {
pub cluster_parameter_group_family: Option<String>,
pub cluster_version: Option<String>,
pub description: Option<String>,
}
struct ClusterVersionDeserializer;
impl ClusterVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterVersion, XmlParseError> {
deserialize_elements::<_, ClusterVersion, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterParameterGroupFamily" => {
obj.cluster_parameter_group_family = Some(StringDeserializer::deserialize(
"ClusterParameterGroupFamily",
stack,
)?);
}
"ClusterVersion" => {
obj.cluster_version =
Some(StringDeserializer::deserialize("ClusterVersion", stack)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ClusterVersionListDeserializer;
impl ClusterVersionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterVersion>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterVersion" {
obj.push(ClusterVersionDeserializer::deserialize(
"ClusterVersion",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClusterVersionsMessage {
pub cluster_versions: Option<Vec<ClusterVersion>>,
pub marker: Option<String>,
}
struct ClusterVersionsMessageDeserializer;
impl ClusterVersionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClusterVersionsMessage, XmlParseError> {
deserialize_elements::<_, ClusterVersionsMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterVersions" => {
obj.cluster_versions.get_or_insert(vec![]).extend(
ClusterVersionListDeserializer::deserialize("ClusterVersions", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ClustersMessage {
pub clusters: Option<Vec<Cluster>>,
pub marker: Option<String>,
}
struct ClustersMessageDeserializer;
impl ClustersMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ClustersMessage, XmlParseError> {
deserialize_elements::<_, ClustersMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Clusters" => {
obj.clusters
.get_or_insert(vec![])
.extend(ClusterListDeserializer::deserialize("Clusters", stack)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyClusterSnapshotMessage {
pub manual_snapshot_retention_period: Option<i64>,
pub source_snapshot_cluster_identifier: Option<String>,
pub source_snapshot_identifier: String,
pub target_snapshot_identifier: String,
}
struct CopyClusterSnapshotMessageSerializer;
impl CopyClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.source_snapshot_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SourceSnapshotClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SourceSnapshotIdentifier"),
&obj.source_snapshot_identifier,
);
params.put(
&format!("{}{}", prefix, "TargetSnapshotIdentifier"),
&obj.target_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyClusterSnapshotResult {
pub snapshot: Option<Snapshot>,
}
struct CopyClusterSnapshotResultDeserializer;
impl CopyClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, CopyClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterMessage {
pub additional_info: Option<String>,
pub allow_version_upgrade: Option<bool>,
pub automated_snapshot_retention_period: Option<i64>,
pub availability_zone: Option<String>,
pub cluster_identifier: String,
pub cluster_parameter_group_name: Option<String>,
pub cluster_security_groups: Option<Vec<String>>,
pub cluster_subnet_group_name: Option<String>,
pub cluster_type: Option<String>,
pub cluster_version: Option<String>,
pub db_name: Option<String>,
pub elastic_ip: Option<String>,
pub encrypted: Option<bool>,
pub enhanced_vpc_routing: Option<bool>,
pub hsm_client_certificate_identifier: Option<String>,
pub hsm_configuration_identifier: Option<String>,
pub iam_roles: Option<Vec<String>>,
pub kms_key_id: Option<String>,
pub maintenance_track_name: Option<String>,
pub manual_snapshot_retention_period: Option<i64>,
pub master_user_password: String,
pub master_username: String,
pub node_type: String,
pub number_of_nodes: Option<i64>,
pub port: Option<i64>,
pub preferred_maintenance_window: Option<String>,
pub publicly_accessible: Option<bool>,
pub snapshot_schedule_identifier: Option<String>,
pub tags: Option<Vec<Tag>>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct CreateClusterMessageSerializer;
impl CreateClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.additional_info {
params.put(&format!("{}{}", prefix, "AdditionalInfo"), &field_value);
}
if let Some(ref field_value) = obj.allow_version_upgrade {
params.put(
&format!("{}{}", prefix, "AllowVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.automated_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "AutomatedSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.availability_zone {
params.put(&format!("{}{}", prefix, "AvailabilityZone"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "ClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.cluster_security_groups {
ClusterSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.cluster_subnet_group_name {
params.put(
&format!("{}{}", prefix, "ClusterSubnetGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.cluster_type {
params.put(&format!("{}{}", prefix, "ClusterType"), &field_value);
}
if let Some(ref field_value) = obj.cluster_version {
params.put(&format!("{}{}", prefix, "ClusterVersion"), &field_value);
}
if let Some(ref field_value) = obj.db_name {
params.put(&format!("{}{}", prefix, "DBName"), &field_value);
}
if let Some(ref field_value) = obj.elastic_ip {
params.put(&format!("{}{}", prefix, "ElasticIp"), &field_value);
}
if let Some(ref field_value) = obj.encrypted {
params.put(&format!("{}{}", prefix, "Encrypted"), &field_value);
}
if let Some(ref field_value) = obj.enhanced_vpc_routing {
params.put(&format!("{}{}", prefix, "EnhancedVpcRouting"), &field_value);
}
if let Some(ref field_value) = obj.hsm_client_certificate_identifier {
params.put(
&format!("{}{}", prefix, "HsmClientCertificateIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.hsm_configuration_identifier {
params.put(
&format!("{}{}", prefix, "HsmConfigurationIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.iam_roles {
IamRoleArnListSerializer::serialize(
params,
&format!("{}{}", prefix, "IamRoleArn"),
field_value,
);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.maintenance_track_name {
params.put(
&format!("{}{}", prefix, "MaintenanceTrackName"),
&field_value,
);
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "MasterUserPassword"),
&obj.master_user_password,
);
params.put(
&format!("{}{}", prefix, "MasterUsername"),
&obj.master_username,
);
params.put(&format!("{}{}", prefix, "NodeType"), &obj.node_type);
if let Some(ref field_value) = obj.number_of_nodes {
params.put(&format!("{}{}", prefix, "NumberOfNodes"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.preferred_maintenance_window {
params.put(
&format!("{}{}", prefix, "PreferredMaintenanceWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
if let Some(ref field_value) = obj.snapshot_schedule_identifier {
params.put(
&format!("{}{}", prefix, "SnapshotScheduleIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterParameterGroupMessage {
pub description: String,
pub parameter_group_family: String,
pub parameter_group_name: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateClusterParameterGroupMessageSerializer;
impl CreateClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Description"), &obj.description);
params.put(
&format!("{}{}", prefix, "ParameterGroupFamily"),
&obj.parameter_group_family,
);
params.put(
&format!("{}{}", prefix, "ParameterGroupName"),
&obj.parameter_group_name,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterParameterGroupResult {
pub cluster_parameter_group: Option<ClusterParameterGroup>,
}
struct CreateClusterParameterGroupResultDeserializer;
impl CreateClusterParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateClusterParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CreateClusterParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterParameterGroup" => {
obj.cluster_parameter_group =
Some(ClusterParameterGroupDeserializer::deserialize(
"ClusterParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterResult {
pub cluster: Option<Cluster>,
}
struct CreateClusterResultDeserializer;
impl CreateClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateClusterResult, XmlParseError> {
deserialize_elements::<_, CreateClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterSecurityGroupMessage {
pub cluster_security_group_name: String,
pub description: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateClusterSecurityGroupMessageSerializer;
impl CreateClusterSecurityGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateClusterSecurityGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
&obj.cluster_security_group_name,
);
params.put(&format!("{}{}", prefix, "Description"), &obj.description);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterSecurityGroupResult {
pub cluster_security_group: Option<ClusterSecurityGroup>,
}
struct CreateClusterSecurityGroupResultDeserializer;
impl CreateClusterSecurityGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateClusterSecurityGroupResult, XmlParseError> {
deserialize_elements::<_, CreateClusterSecurityGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroup" => {
obj.cluster_security_group =
Some(ClusterSecurityGroupDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterSnapshotMessage {
pub cluster_identifier: String,
pub manual_snapshot_retention_period: Option<i64>,
pub snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateClusterSnapshotMessageSerializer;
impl CreateClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterSnapshotResult {
pub snapshot: Option<Snapshot>,
}
struct CreateClusterSnapshotResultDeserializer;
impl CreateClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, CreateClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterSubnetGroupMessage {
pub cluster_subnet_group_name: String,
pub description: String,
pub subnet_ids: Vec<String>,
pub tags: Option<Vec<Tag>>,
}
struct CreateClusterSubnetGroupMessageSerializer;
impl CreateClusterSubnetGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateClusterSubnetGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterSubnetGroupName"),
&obj.cluster_subnet_group_name,
);
params.put(&format!("{}{}", prefix, "Description"), &obj.description);
SubnetIdentifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "SubnetIdentifier"),
&obj.subnet_ids,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateClusterSubnetGroupResult {
pub cluster_subnet_group: Option<ClusterSubnetGroup>,
}
struct CreateClusterSubnetGroupResultDeserializer;
impl CreateClusterSubnetGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateClusterSubnetGroupResult, XmlParseError> {
deserialize_elements::<_, CreateClusterSubnetGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSubnetGroup" => {
obj.cluster_subnet_group =
Some(ClusterSubnetGroupDeserializer::deserialize(
"ClusterSubnetGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateEventSubscriptionMessage {
pub enabled: Option<bool>,
pub event_categories: Option<Vec<String>>,
pub severity: Option<String>,
pub sns_topic_arn: String,
pub source_ids: Option<Vec<String>>,
pub source_type: Option<String>,
pub subscription_name: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateEventSubscriptionMessageSerializer;
impl CreateEventSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateEventSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.enabled {
params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
}
if let Some(ref field_value) = obj.event_categories {
EventCategoriesListSerializer::serialize(
params,
&format!("{}{}", prefix, "EventCategory"),
field_value,
);
}
if let Some(ref field_value) = obj.severity {
params.put(&format!("{}{}", prefix, "Severity"), &field_value);
}
params.put(&format!("{}{}", prefix, "SnsTopicArn"), &obj.sns_topic_arn);
if let Some(ref field_value) = obj.source_ids {
SourceIdsListSerializer::serialize(
params,
&format!("{}{}", prefix, "SourceId"),
field_value,
);
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateEventSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct CreateEventSubscriptionResultDeserializer;
impl CreateEventSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateEventSubscriptionResult, XmlParseError> {
deserialize_elements::<_, CreateEventSubscriptionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscription" => {
obj.event_subscription = Some(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHsmClientCertificateMessage {
pub hsm_client_certificate_identifier: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateHsmClientCertificateMessageSerializer;
impl CreateHsmClientCertificateMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateHsmClientCertificateMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "HsmClientCertificateIdentifier"),
&obj.hsm_client_certificate_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHsmClientCertificateResult {
pub hsm_client_certificate: Option<HsmClientCertificate>,
}
struct CreateHsmClientCertificateResultDeserializer;
impl CreateHsmClientCertificateResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateHsmClientCertificateResult, XmlParseError> {
deserialize_elements::<_, CreateHsmClientCertificateResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HsmClientCertificate" => {
obj.hsm_client_certificate =
Some(HsmClientCertificateDeserializer::deserialize(
"HsmClientCertificate",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHsmConfigurationMessage {
pub description: String,
pub hsm_configuration_identifier: String,
pub hsm_ip_address: String,
pub hsm_partition_name: String,
pub hsm_partition_password: String,
pub hsm_server_public_certificate: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateHsmConfigurationMessageSerializer;
impl CreateHsmConfigurationMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateHsmConfigurationMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Description"), &obj.description);
params.put(
&format!("{}{}", prefix, "HsmConfigurationIdentifier"),
&obj.hsm_configuration_identifier,
);
params.put(
&format!("{}{}", prefix, "HsmIpAddress"),
&obj.hsm_ip_address,
);
params.put(
&format!("{}{}", prefix, "HsmPartitionName"),
&obj.hsm_partition_name,
);
params.put(
&format!("{}{}", prefix, "HsmPartitionPassword"),
&obj.hsm_partition_password,
);
params.put(
&format!("{}{}", prefix, "HsmServerPublicCertificate"),
&obj.hsm_server_public_certificate,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHsmConfigurationResult {
pub hsm_configuration: Option<HsmConfiguration>,
}
struct CreateHsmConfigurationResultDeserializer;
impl CreateHsmConfigurationResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateHsmConfigurationResult, XmlParseError> {
deserialize_elements::<_, CreateHsmConfigurationResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HsmConfiguration" => {
obj.hsm_configuration = Some(HsmConfigurationDeserializer::deserialize(
"HsmConfiguration",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateSnapshotCopyGrantMessage {
pub kms_key_id: Option<String>,
pub snapshot_copy_grant_name: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateSnapshotCopyGrantMessageSerializer;
impl CreateSnapshotCopyGrantMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateSnapshotCopyGrantMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SnapshotCopyGrantName"),
&obj.snapshot_copy_grant_name,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateSnapshotCopyGrantResult {
pub snapshot_copy_grant: Option<SnapshotCopyGrant>,
}
struct CreateSnapshotCopyGrantResultDeserializer;
impl CreateSnapshotCopyGrantResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateSnapshotCopyGrantResult, XmlParseError> {
deserialize_elements::<_, CreateSnapshotCopyGrantResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"SnapshotCopyGrant" => {
obj.snapshot_copy_grant = Some(SnapshotCopyGrantDeserializer::deserialize(
"SnapshotCopyGrant",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateSnapshotScheduleMessage {
pub dry_run: Option<bool>,
pub next_invocations: Option<i64>,
pub schedule_definitions: Option<Vec<String>>,
pub schedule_description: Option<String>,
pub schedule_identifier: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct CreateSnapshotScheduleMessageSerializer;
impl CreateSnapshotScheduleMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateSnapshotScheduleMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.dry_run {
params.put(&format!("{}{}", prefix, "DryRun"), &field_value);
}
if let Some(ref field_value) = obj.next_invocations {
params.put(&format!("{}{}", prefix, "NextInvocations"), &field_value);
}
if let Some(ref field_value) = obj.schedule_definitions {
ScheduleDefinitionListSerializer::serialize(
params,
&format!("{}{}", prefix, "ScheduleDefinition"),
field_value,
);
}
if let Some(ref field_value) = obj.schedule_description {
params.put(
&format!("{}{}", prefix, "ScheduleDescription"),
&field_value,
);
}
if let Some(ref field_value) = obj.schedule_identifier {
params.put(&format!("{}{}", prefix, "ScheduleIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTagsMessage {
pub resource_name: String,
pub tags: Vec<Tag>,
}
struct CreateTagsMessageSerializer;
impl CreateTagsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateTagsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), &obj.tags);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CustomerStorageMessage {
pub total_backup_size_in_mega_bytes: Option<f64>,
pub total_provisioned_storage_in_mega_bytes: Option<f64>,
}
struct CustomerStorageMessageDeserializer;
impl CustomerStorageMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CustomerStorageMessage, XmlParseError> {
deserialize_elements::<_, CustomerStorageMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"TotalBackupSizeInMegaBytes" => {
obj.total_backup_size_in_mega_bytes = Some(DoubleDeserializer::deserialize(
"TotalBackupSizeInMegaBytes",
stack,
)?);
}
"TotalProvisionedStorageInMegaBytes" => {
obj.total_provisioned_storage_in_mega_bytes =
Some(DoubleDeserializer::deserialize(
"TotalProvisionedStorageInMegaBytes",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DataTransferProgress {
pub current_rate_in_mega_bytes_per_second: Option<f64>,
pub data_transferred_in_mega_bytes: Option<i64>,
pub elapsed_time_in_seconds: Option<i64>,
pub estimated_time_to_completion_in_seconds: Option<i64>,
pub status: Option<String>,
pub total_data_in_mega_bytes: Option<i64>,
}
struct DataTransferProgressDeserializer;
impl DataTransferProgressDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DataTransferProgress, XmlParseError> {
deserialize_elements::<_, DataTransferProgress, _>(tag_name, stack, |name, stack, obj| {
match name {
"CurrentRateInMegaBytesPerSecond" => {
obj.current_rate_in_mega_bytes_per_second =
Some(DoubleOptionalDeserializer::deserialize(
"CurrentRateInMegaBytesPerSecond",
stack,
)?);
}
"DataTransferredInMegaBytes" => {
obj.data_transferred_in_mega_bytes = Some(LongDeserializer::deserialize(
"DataTransferredInMegaBytes",
stack,
)?);
}
"ElapsedTimeInSeconds" => {
obj.elapsed_time_in_seconds = Some(LongOptionalDeserializer::deserialize(
"ElapsedTimeInSeconds",
stack,
)?);
}
"EstimatedTimeToCompletionInSeconds" => {
obj.estimated_time_to_completion_in_seconds =
Some(LongOptionalDeserializer::deserialize(
"EstimatedTimeToCompletionInSeconds",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"TotalDataInMegaBytes" => {
obj.total_data_in_mega_bytes = Some(LongDeserializer::deserialize(
"TotalDataInMegaBytes",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DbGroupListSerializer;
impl DbGroupListSerializer {
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 DefaultClusterParameters {
pub marker: Option<String>,
pub parameter_group_family: Option<String>,
pub parameters: Option<Vec<Parameter>>,
}
struct DefaultClusterParametersDeserializer;
impl DefaultClusterParametersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DefaultClusterParameters, XmlParseError> {
deserialize_elements::<_, DefaultClusterParameters, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ParameterGroupFamily" => {
obj.parameter_group_family = Some(StringDeserializer::deserialize(
"ParameterGroupFamily",
stack,
)?);
}
"Parameters" => {
obj.parameters.get_or_insert(vec![]).extend(
ParametersListDeserializer::deserialize("Parameters", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeferredMaintenanceWindow {
pub defer_maintenance_end_time: Option<String>,
pub defer_maintenance_identifier: Option<String>,
pub defer_maintenance_start_time: Option<String>,
}
struct DeferredMaintenanceWindowDeserializer;
impl DeferredMaintenanceWindowDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeferredMaintenanceWindow, XmlParseError> {
deserialize_elements::<_, DeferredMaintenanceWindow, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DeferMaintenanceEndTime" => {
obj.defer_maintenance_end_time = Some(TStampDeserializer::deserialize(
"DeferMaintenanceEndTime",
stack,
)?);
}
"DeferMaintenanceIdentifier" => {
obj.defer_maintenance_identifier = Some(StringDeserializer::deserialize(
"DeferMaintenanceIdentifier",
stack,
)?);
}
"DeferMaintenanceStartTime" => {
obj.defer_maintenance_start_time = Some(TStampDeserializer::deserialize(
"DeferMaintenanceStartTime",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DeferredMaintenanceWindowsListDeserializer;
impl DeferredMaintenanceWindowsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DeferredMaintenanceWindow>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DeferredMaintenanceWindow" {
obj.push(DeferredMaintenanceWindowDeserializer::deserialize(
"DeferredMaintenanceWindow",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteClusterMessage {
pub cluster_identifier: String,
pub final_cluster_snapshot_identifier: Option<String>,
pub final_cluster_snapshot_retention_period: Option<i64>,
pub skip_final_cluster_snapshot: Option<bool>,
}
struct DeleteClusterMessageSerializer;
impl DeleteClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.final_cluster_snapshot_identifier {
params.put(
&format!("{}{}", prefix, "FinalClusterSnapshotIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.final_cluster_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "FinalClusterSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.skip_final_cluster_snapshot {
params.put(
&format!("{}{}", prefix, "SkipFinalClusterSnapshot"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteClusterParameterGroupMessage {
pub parameter_group_name: String,
}
struct DeleteClusterParameterGroupMessageSerializer;
impl DeleteClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ParameterGroupName"),
&obj.parameter_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteClusterResult {
pub cluster: Option<Cluster>,
}
struct DeleteClusterResultDeserializer;
impl DeleteClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteClusterResult, XmlParseError> {
deserialize_elements::<_, DeleteClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteClusterSecurityGroupMessage {
pub cluster_security_group_name: String,
}
struct DeleteClusterSecurityGroupMessageSerializer;
impl DeleteClusterSecurityGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteClusterSecurityGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
&obj.cluster_security_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteClusterSnapshotMessage {
pub snapshot_cluster_identifier: Option<String>,
pub snapshot_identifier: String,
}
struct DeleteClusterSnapshotMessageSerializer;
impl DeleteClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.snapshot_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SnapshotClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
}
}
struct DeleteClusterSnapshotMessageListSerializer;
impl DeleteClusterSnapshotMessageListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<DeleteClusterSnapshotMessage>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
DeleteClusterSnapshotMessageSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteClusterSnapshotResult {
pub snapshot: Option<Snapshot>,
}
struct DeleteClusterSnapshotResultDeserializer;
impl DeleteClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, DeleteClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteClusterSubnetGroupMessage {
pub cluster_subnet_group_name: String,
}
struct DeleteClusterSubnetGroupMessageSerializer;
impl DeleteClusterSubnetGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteClusterSubnetGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterSubnetGroupName"),
&obj.cluster_subnet_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteEventSubscriptionMessage {
pub subscription_name: String,
}
struct DeleteEventSubscriptionMessageSerializer;
impl DeleteEventSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteEventSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteHsmClientCertificateMessage {
pub hsm_client_certificate_identifier: String,
}
struct DeleteHsmClientCertificateMessageSerializer;
impl DeleteHsmClientCertificateMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteHsmClientCertificateMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "HsmClientCertificateIdentifier"),
&obj.hsm_client_certificate_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteHsmConfigurationMessage {
pub hsm_configuration_identifier: String,
}
struct DeleteHsmConfigurationMessageSerializer;
impl DeleteHsmConfigurationMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteHsmConfigurationMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "HsmConfigurationIdentifier"),
&obj.hsm_configuration_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteSnapshotCopyGrantMessage {
pub snapshot_copy_grant_name: String,
}
struct DeleteSnapshotCopyGrantMessageSerializer;
impl DeleteSnapshotCopyGrantMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteSnapshotCopyGrantMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SnapshotCopyGrantName"),
&obj.snapshot_copy_grant_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteSnapshotScheduleMessage {
pub schedule_identifier: String,
}
struct DeleteSnapshotScheduleMessageSerializer;
impl DeleteSnapshotScheduleMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteSnapshotScheduleMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ScheduleIdentifier"),
&obj.schedule_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTagsMessage {
pub resource_name: String,
pub tag_keys: Vec<String>,
}
struct DeleteTagsMessageSerializer;
impl DeleteTagsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteTagsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
TagKeyListSerializer::serialize(params, &format!("{}{}", prefix, "TagKey"), &obj.tag_keys);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccountAttributesMessage {
pub attribute_names: Option<Vec<String>>,
}
struct DescribeAccountAttributesMessageSerializer;
impl DescribeAccountAttributesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeAccountAttributesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.attribute_names {
AttributeNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "AttributeName"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterDbRevisionsMessage {
pub cluster_identifier: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeClusterDbRevisionsMessageSerializer;
impl DescribeClusterDbRevisionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterDbRevisionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_identifier {
params.put(&format!("{}{}", prefix, "ClusterIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterParameterGroupsMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub parameter_group_name: Option<String>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeClusterParameterGroupsMessageSerializer;
impl DescribeClusterParameterGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterParameterGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.parameter_group_name {
params.put(&format!("{}{}", prefix, "ParameterGroupName"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterParametersMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub parameter_group_name: String,
pub source: Option<String>,
}
struct DescribeClusterParametersMessageSerializer;
impl DescribeClusterParametersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterParametersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ParameterGroupName"),
&obj.parameter_group_name,
);
if let Some(ref field_value) = obj.source {
params.put(&format!("{}{}", prefix, "Source"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterSecurityGroupsMessage {
pub cluster_security_group_name: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeClusterSecurityGroupsMessageSerializer;
impl DescribeClusterSecurityGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterSecurityGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_security_group_name {
params.put(
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterSnapshotsMessage {
pub cluster_exists: Option<bool>,
pub cluster_identifier: Option<String>,
pub end_time: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub owner_account: Option<String>,
pub snapshot_identifier: Option<String>,
pub snapshot_type: Option<String>,
pub sorting_entities: Option<Vec<SnapshotSortingEntity>>,
pub start_time: Option<String>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeClusterSnapshotsMessageSerializer;
impl DescribeClusterSnapshotsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterSnapshotsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_exists {
params.put(&format!("{}{}", prefix, "ClusterExists"), &field_value);
}
if let Some(ref field_value) = obj.cluster_identifier {
params.put(&format!("{}{}", prefix, "ClusterIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.end_time {
params.put(&format!("{}{}", prefix, "EndTime"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.owner_account {
params.put(&format!("{}{}", prefix, "OwnerAccount"), &field_value);
}
if let Some(ref field_value) = obj.snapshot_identifier {
params.put(&format!("{}{}", prefix, "SnapshotIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.snapshot_type {
params.put(&format!("{}{}", prefix, "SnapshotType"), &field_value);
}
if let Some(ref field_value) = obj.sorting_entities {
SnapshotSortingEntityListSerializer::serialize(
params,
&format!("{}{}", prefix, "SnapshotSortingEntity"),
field_value,
);
}
if let Some(ref field_value) = obj.start_time {
params.put(&format!("{}{}", prefix, "StartTime"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterSubnetGroupsMessage {
pub cluster_subnet_group_name: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeClusterSubnetGroupsMessageSerializer;
impl DescribeClusterSubnetGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterSubnetGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_subnet_group_name {
params.put(
&format!("{}{}", prefix, "ClusterSubnetGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterTracksMessage {
pub maintenance_track_name: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeClusterTracksMessageSerializer;
impl DescribeClusterTracksMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterTracksMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.maintenance_track_name {
params.put(
&format!("{}{}", prefix, "MaintenanceTrackName"),
&field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClusterVersionsMessage {
pub cluster_parameter_group_family: Option<String>,
pub cluster_version: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeClusterVersionsMessageSerializer;
impl DescribeClusterVersionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClusterVersionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_parameter_group_family {
params.put(
&format!("{}{}", prefix, "ClusterParameterGroupFamily"),
&field_value,
);
}
if let Some(ref field_value) = obj.cluster_version {
params.put(&format!("{}{}", prefix, "ClusterVersion"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeClustersMessage {
pub cluster_identifier: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeClustersMessageSerializer;
impl DescribeClustersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeClustersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_identifier {
params.put(&format!("{}{}", prefix, "ClusterIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDefaultClusterParametersMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub parameter_group_family: String,
}
struct DescribeDefaultClusterParametersMessageSerializer;
impl DescribeDefaultClusterParametersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDefaultClusterParametersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ParameterGroupFamily"),
&obj.parameter_group_family,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDefaultClusterParametersResult {
pub default_cluster_parameters: Option<DefaultClusterParameters>,
}
struct DescribeDefaultClusterParametersResultDeserializer;
impl DescribeDefaultClusterParametersResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeDefaultClusterParametersResult, XmlParseError> {
deserialize_elements::<_, DescribeDefaultClusterParametersResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DefaultClusterParameters" => {
obj.default_cluster_parameters =
Some(DefaultClusterParametersDeserializer::deserialize(
"DefaultClusterParameters",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventCategoriesMessage {
pub source_type: Option<String>,
}
struct DescribeEventCategoriesMessageSerializer;
impl DescribeEventCategoriesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEventCategoriesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventSubscriptionsMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub subscription_name: Option<String>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeEventSubscriptionsMessageSerializer;
impl DescribeEventSubscriptionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEventSubscriptionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.subscription_name {
params.put(&format!("{}{}", prefix, "SubscriptionName"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventsMessage {
pub duration: Option<i64>,
pub end_time: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub source_identifier: Option<String>,
pub source_type: Option<String>,
pub start_time: Option<String>,
}
struct DescribeEventsMessageSerializer;
impl DescribeEventsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEventsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.duration {
params.put(&format!("{}{}", prefix, "Duration"), &field_value);
}
if let Some(ref field_value) = obj.end_time {
params.put(&format!("{}{}", prefix, "EndTime"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.source_identifier {
params.put(&format!("{}{}", prefix, "SourceIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
if let Some(ref field_value) = obj.start_time {
params.put(&format!("{}{}", prefix, "StartTime"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeHsmClientCertificatesMessage {
pub hsm_client_certificate_identifier: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeHsmClientCertificatesMessageSerializer;
impl DescribeHsmClientCertificatesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeHsmClientCertificatesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.hsm_client_certificate_identifier {
params.put(
&format!("{}{}", prefix, "HsmClientCertificateIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeHsmConfigurationsMessage {
pub hsm_configuration_identifier: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeHsmConfigurationsMessageSerializer;
impl DescribeHsmConfigurationsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeHsmConfigurationsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.hsm_configuration_identifier {
params.put(
&format!("{}{}", prefix, "HsmConfigurationIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeLoggingStatusMessage {
pub cluster_identifier: String,
}
struct DescribeLoggingStatusMessageSerializer;
impl DescribeLoggingStatusMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeLoggingStatusMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeOrderableClusterOptionsMessage {
pub cluster_version: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub node_type: Option<String>,
}
struct DescribeOrderableClusterOptionsMessageSerializer;
impl DescribeOrderableClusterOptionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeOrderableClusterOptionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_version {
params.put(&format!("{}{}", prefix, "ClusterVersion"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.node_type {
params.put(&format!("{}{}", prefix, "NodeType"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeReservedNodeOfferingsMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub reserved_node_offering_id: Option<String>,
}
struct DescribeReservedNodeOfferingsMessageSerializer;
impl DescribeReservedNodeOfferingsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeReservedNodeOfferingsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.reserved_node_offering_id {
params.put(
&format!("{}{}", prefix, "ReservedNodeOfferingId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeReservedNodesMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub reserved_node_id: Option<String>,
}
struct DescribeReservedNodesMessageSerializer;
impl DescribeReservedNodesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeReservedNodesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.reserved_node_id {
params.put(&format!("{}{}", prefix, "ReservedNodeId"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeResizeMessage {
pub cluster_identifier: String,
}
struct DescribeResizeMessageSerializer;
impl DescribeResizeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeResizeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeSnapshotCopyGrantsMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub snapshot_copy_grant_name: Option<String>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeSnapshotCopyGrantsMessageSerializer;
impl DescribeSnapshotCopyGrantsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeSnapshotCopyGrantsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.snapshot_copy_grant_name {
params.put(
&format!("{}{}", prefix, "SnapshotCopyGrantName"),
&field_value,
);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeSnapshotSchedulesMessage {
pub cluster_identifier: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub schedule_identifier: Option<String>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeSnapshotSchedulesMessageSerializer;
impl DescribeSnapshotSchedulesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeSnapshotSchedulesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_identifier {
params.put(&format!("{}{}", prefix, "ClusterIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.schedule_identifier {
params.put(&format!("{}{}", prefix, "ScheduleIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeSnapshotSchedulesOutputMessage {
pub marker: Option<String>,
pub snapshot_schedules: Option<Vec<SnapshotSchedule>>,
}
struct DescribeSnapshotSchedulesOutputMessageDeserializer;
impl DescribeSnapshotSchedulesOutputMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeSnapshotSchedulesOutputMessage, XmlParseError> {
deserialize_elements::<_, DescribeSnapshotSchedulesOutputMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"SnapshotSchedules" => {
obj.snapshot_schedules.get_or_insert(vec![]).extend(
SnapshotScheduleListDeserializer::deserialize(
"SnapshotSchedules",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTableRestoreStatusMessage {
pub cluster_identifier: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub table_restore_request_id: Option<String>,
}
struct DescribeTableRestoreStatusMessageSerializer;
impl DescribeTableRestoreStatusMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeTableRestoreStatusMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cluster_identifier {
params.put(&format!("{}{}", prefix, "ClusterIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.table_restore_request_id {
params.put(
&format!("{}{}", prefix, "TableRestoreRequestId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeTagsMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub resource_name: Option<String>,
pub resource_type: Option<String>,
pub tag_keys: Option<Vec<String>>,
pub tag_values: Option<Vec<String>>,
}
struct DescribeTagsMessageSerializer;
impl DescribeTagsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeTagsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.resource_name {
params.put(&format!("{}{}", prefix, "ResourceName"), &field_value);
}
if let Some(ref field_value) = obj.resource_type {
params.put(&format!("{}{}", prefix, "ResourceType"), &field_value);
}
if let Some(ref field_value) = obj.tag_keys {
TagKeyListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagKey"),
field_value,
);
}
if let Some(ref field_value) = obj.tag_values {
TagValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "TagValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DisableLoggingMessage {
pub cluster_identifier: String,
}
struct DisableLoggingMessageSerializer;
impl DisableLoggingMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DisableLoggingMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DisableSnapshotCopyMessage {
pub cluster_identifier: String,
}
struct DisableSnapshotCopyMessageSerializer;
impl DisableSnapshotCopyMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DisableSnapshotCopyMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DisableSnapshotCopyResult {
pub cluster: Option<Cluster>,
}
struct DisableSnapshotCopyResultDeserializer;
impl DisableSnapshotCopyResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DisableSnapshotCopyResult, XmlParseError> {
deserialize_elements::<_, DisableSnapshotCopyResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DoubleDeserializer;
impl DoubleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DoubleOptionalDeserializer;
impl DoubleOptionalDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EC2SecurityGroup {
pub ec2_security_group_name: Option<String>,
pub ec2_security_group_owner_id: Option<String>,
pub status: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct EC2SecurityGroupDeserializer;
impl EC2SecurityGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EC2SecurityGroup, XmlParseError> {
deserialize_elements::<_, EC2SecurityGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"EC2SecurityGroupName" => {
obj.ec2_security_group_name = Some(StringDeserializer::deserialize(
"EC2SecurityGroupName",
stack,
)?);
}
"EC2SecurityGroupOwnerId" => {
obj.ec2_security_group_owner_id = Some(StringDeserializer::deserialize(
"EC2SecurityGroupOwnerId",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EC2SecurityGroupListDeserializer;
impl EC2SecurityGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EC2SecurityGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EC2SecurityGroup" {
obj.push(EC2SecurityGroupDeserializer::deserialize(
"EC2SecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ElasticIpStatus {
pub elastic_ip: Option<String>,
pub status: Option<String>,
}
struct ElasticIpStatusDeserializer;
impl ElasticIpStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ElasticIpStatus, XmlParseError> {
deserialize_elements::<_, ElasticIpStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"ElasticIp" => {
obj.elastic_ip = Some(StringDeserializer::deserialize("ElasticIp", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EligibleTracksToUpdateListDeserializer;
impl EligibleTracksToUpdateListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<UpdateTarget>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "UpdateTarget" {
obj.push(UpdateTargetDeserializer::deserialize(
"UpdateTarget",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnableLoggingMessage {
pub bucket_name: String,
pub cluster_identifier: String,
pub s3_key_prefix: Option<String>,
}
struct EnableLoggingMessageSerializer;
impl EnableLoggingMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &EnableLoggingMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "BucketName"), &obj.bucket_name);
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.s3_key_prefix {
params.put(&format!("{}{}", prefix, "S3KeyPrefix"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnableSnapshotCopyMessage {
pub cluster_identifier: String,
pub destination_region: String,
pub manual_snapshot_retention_period: Option<i64>,
pub retention_period: Option<i64>,
pub snapshot_copy_grant_name: Option<String>,
}
struct EnableSnapshotCopyMessageSerializer;
impl EnableSnapshotCopyMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &EnableSnapshotCopyMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
params.put(
&format!("{}{}", prefix, "DestinationRegion"),
&obj.destination_region,
);
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.retention_period {
params.put(&format!("{}{}", prefix, "RetentionPeriod"), &field_value);
}
if let Some(ref field_value) = obj.snapshot_copy_grant_name {
params.put(
&format!("{}{}", prefix, "SnapshotCopyGrantName"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EnableSnapshotCopyResult {
pub cluster: Option<Cluster>,
}
struct EnableSnapshotCopyResultDeserializer;
impl EnableSnapshotCopyResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EnableSnapshotCopyResult, XmlParseError> {
deserialize_elements::<_, EnableSnapshotCopyResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Endpoint {
pub address: Option<String>,
pub port: Option<i64>,
}
struct EndpointDeserializer;
impl EndpointDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Endpoint, XmlParseError> {
deserialize_elements::<_, Endpoint, _>(tag_name, stack, |name, stack, obj| {
match name {
"Address" => {
obj.address = Some(StringDeserializer::deserialize("Address", stack)?);
}
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Event {
pub date: Option<String>,
pub event_categories: Option<Vec<String>>,
pub event_id: Option<String>,
pub message: Option<String>,
pub severity: Option<String>,
pub source_identifier: Option<String>,
pub source_type: Option<String>,
}
struct EventDeserializer;
impl EventDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Event, XmlParseError> {
deserialize_elements::<_, Event, _>(tag_name, stack, |name, stack, obj| {
match name {
"Date" => {
obj.date = Some(TStampDeserializer::deserialize("Date", stack)?);
}
"EventCategories" => {
obj.event_categories.get_or_insert(vec![]).extend(
EventCategoriesListDeserializer::deserialize("EventCategories", stack)?,
);
}
"EventId" => {
obj.event_id = Some(StringDeserializer::deserialize("EventId", stack)?);
}
"Message" => {
obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
}
"Severity" => {
obj.severity = Some(StringDeserializer::deserialize("Severity", stack)?);
}
"SourceIdentifier" => {
obj.source_identifier =
Some(StringDeserializer::deserialize("SourceIdentifier", stack)?);
}
"SourceType" => {
obj.source_type =
Some(SourceTypeDeserializer::deserialize("SourceType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventCategoriesListDeserializer;
impl EventCategoriesListDeserializer {
#[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 == "EventCategory" {
obj.push(StringDeserializer::deserialize("EventCategory", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct EventCategoriesListSerializer;
impl EventCategoriesListSerializer {
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 EventCategoriesMap {
pub events: Option<Vec<EventInfoMap>>,
pub source_type: Option<String>,
}
struct EventCategoriesMapDeserializer;
impl EventCategoriesMapDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventCategoriesMap, XmlParseError> {
deserialize_elements::<_, EventCategoriesMap, _>(tag_name, stack, |name, stack, obj| {
match name {
"Events" => {
obj.events
.get_or_insert(vec![])
.extend(EventInfoMapListDeserializer::deserialize("Events", stack)?);
}
"SourceType" => {
obj.source_type = Some(StringDeserializer::deserialize("SourceType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventCategoriesMapListDeserializer;
impl EventCategoriesMapListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventCategoriesMap>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EventCategoriesMap" {
obj.push(EventCategoriesMapDeserializer::deserialize(
"EventCategoriesMap",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventCategoriesMessage {
pub event_categories_map_list: Option<Vec<EventCategoriesMap>>,
}
struct EventCategoriesMessageDeserializer;
impl EventCategoriesMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventCategoriesMessage, XmlParseError> {
deserialize_elements::<_, EventCategoriesMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"EventCategoriesMapList" => {
obj.event_categories_map_list.get_or_insert(vec![]).extend(
EventCategoriesMapListDeserializer::deserialize(
"EventCategoriesMapList",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventInfoMap {
pub event_categories: Option<Vec<String>>,
pub event_description: Option<String>,
pub event_id: Option<String>,
pub severity: Option<String>,
}
struct EventInfoMapDeserializer;
impl EventInfoMapDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventInfoMap, XmlParseError> {
deserialize_elements::<_, EventInfoMap, _>(tag_name, stack, |name, stack, obj| {
match name {
"EventCategories" => {
obj.event_categories.get_or_insert(vec![]).extend(
EventCategoriesListDeserializer::deserialize("EventCategories", stack)?,
);
}
"EventDescription" => {
obj.event_description =
Some(StringDeserializer::deserialize("EventDescription", stack)?);
}
"EventId" => {
obj.event_id = Some(StringDeserializer::deserialize("EventId", stack)?);
}
"Severity" => {
obj.severity = Some(StringDeserializer::deserialize("Severity", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventInfoMapListDeserializer;
impl EventInfoMapListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventInfoMap>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EventInfoMap" {
obj.push(EventInfoMapDeserializer::deserialize(
"EventInfoMap",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct EventListDeserializer;
impl EventListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Event>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Event" {
obj.push(EventDeserializer::deserialize("Event", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventSubscription {
pub cust_subscription_id: Option<String>,
pub customer_aws_id: Option<String>,
pub enabled: Option<bool>,
pub event_categories_list: Option<Vec<String>>,
pub severity: Option<String>,
pub sns_topic_arn: Option<String>,
pub source_ids_list: Option<Vec<String>>,
pub source_type: Option<String>,
pub status: Option<String>,
pub subscription_creation_time: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct EventSubscriptionDeserializer;
impl EventSubscriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventSubscription, XmlParseError> {
deserialize_elements::<_, EventSubscription, _>(tag_name, stack, |name, stack, obj| {
match name {
"CustSubscriptionId" => {
obj.cust_subscription_id = Some(StringDeserializer::deserialize(
"CustSubscriptionId",
stack,
)?);
}
"CustomerAwsId" => {
obj.customer_aws_id =
Some(StringDeserializer::deserialize("CustomerAwsId", stack)?);
}
"Enabled" => {
obj.enabled = Some(BooleanDeserializer::deserialize("Enabled", stack)?);
}
"EventCategoriesList" => {
obj.event_categories_list.get_or_insert(vec![]).extend(
EventCategoriesListDeserializer::deserialize("EventCategoriesList", stack)?,
);
}
"Severity" => {
obj.severity = Some(StringDeserializer::deserialize("Severity", stack)?);
}
"SnsTopicArn" => {
obj.sns_topic_arn =
Some(StringDeserializer::deserialize("SnsTopicArn", stack)?);
}
"SourceIdsList" => {
obj.source_ids_list.get_or_insert(vec![]).extend(
SourceIdsListDeserializer::deserialize("SourceIdsList", stack)?,
);
}
"SourceType" => {
obj.source_type = Some(StringDeserializer::deserialize("SourceType", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"SubscriptionCreationTime" => {
obj.subscription_creation_time = Some(TStampDeserializer::deserialize(
"SubscriptionCreationTime",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventSubscriptionsListDeserializer;
impl EventSubscriptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventSubscription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EventSubscription" {
obj.push(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventSubscriptionsMessage {
pub event_subscriptions_list: Option<Vec<EventSubscription>>,
pub marker: Option<String>,
}
struct EventSubscriptionsMessageDeserializer;
impl EventSubscriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventSubscriptionsMessage, XmlParseError> {
deserialize_elements::<_, EventSubscriptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscriptionsList" => {
obj.event_subscriptions_list.get_or_insert(vec![]).extend(
EventSubscriptionsListDeserializer::deserialize(
"EventSubscriptionsList",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventsMessage {
pub events: Option<Vec<Event>>,
pub marker: Option<String>,
}
struct EventsMessageDeserializer;
impl EventsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventsMessage, XmlParseError> {
deserialize_elements::<_, EventsMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Events" => {
obj.events
.get_or_insert(vec![])
.extend(EventListDeserializer::deserialize("Events", stack)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetClusterCredentialsMessage {
pub auto_create: Option<bool>,
pub cluster_identifier: String,
pub db_groups: Option<Vec<String>>,
pub db_name: Option<String>,
pub db_user: String,
pub duration_seconds: Option<i64>,
}
struct GetClusterCredentialsMessageSerializer;
impl GetClusterCredentialsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &GetClusterCredentialsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.auto_create {
params.put(&format!("{}{}", prefix, "AutoCreate"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.db_groups {
DbGroupListSerializer::serialize(
params,
&format!("{}{}", prefix, "DbGroup"),
field_value,
);
}
if let Some(ref field_value) = obj.db_name {
params.put(&format!("{}{}", prefix, "DbName"), &field_value);
}
params.put(&format!("{}{}", prefix, "DbUser"), &obj.db_user);
if let Some(ref field_value) = obj.duration_seconds {
params.put(&format!("{}{}", prefix, "DurationSeconds"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetReservedNodeExchangeOfferingsInputMessage {
pub marker: Option<String>,
pub max_records: Option<i64>,
pub reserved_node_id: String,
}
struct GetReservedNodeExchangeOfferingsInputMessageSerializer;
impl GetReservedNodeExchangeOfferingsInputMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &GetReservedNodeExchangeOfferingsInputMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ReservedNodeId"),
&obj.reserved_node_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetReservedNodeExchangeOfferingsOutputMessage {
pub marker: Option<String>,
pub reserved_node_offerings: Option<Vec<ReservedNodeOffering>>,
}
struct GetReservedNodeExchangeOfferingsOutputMessageDeserializer;
impl GetReservedNodeExchangeOfferingsOutputMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetReservedNodeExchangeOfferingsOutputMessage, XmlParseError> {
deserialize_elements::<_, GetReservedNodeExchangeOfferingsOutputMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ReservedNodeOfferings" => {
obj.reserved_node_offerings.get_or_insert(vec![]).extend(
ReservedNodeOfferingListDeserializer::deserialize(
"ReservedNodeOfferings",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HsmClientCertificate {
pub hsm_client_certificate_identifier: Option<String>,
pub hsm_client_certificate_public_key: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct HsmClientCertificateDeserializer;
impl HsmClientCertificateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HsmClientCertificate, XmlParseError> {
deserialize_elements::<_, HsmClientCertificate, _>(tag_name, stack, |name, stack, obj| {
match name {
"HsmClientCertificateIdentifier" => {
obj.hsm_client_certificate_identifier = Some(StringDeserializer::deserialize(
"HsmClientCertificateIdentifier",
stack,
)?);
}
"HsmClientCertificatePublicKey" => {
obj.hsm_client_certificate_public_key = Some(StringDeserializer::deserialize(
"HsmClientCertificatePublicKey",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct HsmClientCertificateListDeserializer;
impl HsmClientCertificateListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<HsmClientCertificate>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "HsmClientCertificate" {
obj.push(HsmClientCertificateDeserializer::deserialize(
"HsmClientCertificate",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HsmClientCertificateMessage {
pub hsm_client_certificates: Option<Vec<HsmClientCertificate>>,
pub marker: Option<String>,
}
struct HsmClientCertificateMessageDeserializer;
impl HsmClientCertificateMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HsmClientCertificateMessage, XmlParseError> {
deserialize_elements::<_, HsmClientCertificateMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HsmClientCertificates" => {
obj.hsm_client_certificates.get_or_insert(vec![]).extend(
HsmClientCertificateListDeserializer::deserialize(
"HsmClientCertificates",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HsmConfiguration {
pub description: Option<String>,
pub hsm_configuration_identifier: Option<String>,
pub hsm_ip_address: Option<String>,
pub hsm_partition_name: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct HsmConfigurationDeserializer;
impl HsmConfigurationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HsmConfiguration, XmlParseError> {
deserialize_elements::<_, HsmConfiguration, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"HsmConfigurationIdentifier" => {
obj.hsm_configuration_identifier = Some(StringDeserializer::deserialize(
"HsmConfigurationIdentifier",
stack,
)?);
}
"HsmIpAddress" => {
obj.hsm_ip_address =
Some(StringDeserializer::deserialize("HsmIpAddress", stack)?);
}
"HsmPartitionName" => {
obj.hsm_partition_name =
Some(StringDeserializer::deserialize("HsmPartitionName", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct HsmConfigurationListDeserializer;
impl HsmConfigurationListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<HsmConfiguration>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "HsmConfiguration" {
obj.push(HsmConfigurationDeserializer::deserialize(
"HsmConfiguration",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HsmConfigurationMessage {
pub hsm_configurations: Option<Vec<HsmConfiguration>>,
pub marker: Option<String>,
}
struct HsmConfigurationMessageDeserializer;
impl HsmConfigurationMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HsmConfigurationMessage, XmlParseError> {
deserialize_elements::<_, HsmConfigurationMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HsmConfigurations" => {
obj.hsm_configurations.get_or_insert(vec![]).extend(
HsmConfigurationListDeserializer::deserialize(
"HsmConfigurations",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HsmStatus {
pub hsm_client_certificate_identifier: Option<String>,
pub hsm_configuration_identifier: Option<String>,
pub status: Option<String>,
}
struct HsmStatusDeserializer;
impl HsmStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HsmStatus, XmlParseError> {
deserialize_elements::<_, HsmStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"HsmClientCertificateIdentifier" => {
obj.hsm_client_certificate_identifier = Some(StringDeserializer::deserialize(
"HsmClientCertificateIdentifier",
stack,
)?);
}
"HsmConfigurationIdentifier" => {
obj.hsm_configuration_identifier = Some(StringDeserializer::deserialize(
"HsmConfigurationIdentifier",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct IPRange {
pub cidrip: Option<String>,
pub status: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct IPRangeDeserializer;
impl IPRangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<IPRange, XmlParseError> {
deserialize_elements::<_, IPRange, _>(tag_name, stack, |name, stack, obj| {
match name {
"CIDRIP" => {
obj.cidrip = Some(StringDeserializer::deserialize("CIDRIP", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct IPRangeListDeserializer;
impl IPRangeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<IPRange>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "IPRange" {
obj.push(IPRangeDeserializer::deserialize("IPRange", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct IamRoleArnListSerializer;
impl IamRoleArnListSerializer {
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 ImportTablesCompletedDeserializer;
impl ImportTablesCompletedDeserializer {
#[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(StringDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ImportTablesInProgressDeserializer;
impl ImportTablesInProgressDeserializer {
#[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(StringDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ImportTablesNotStartedDeserializer;
impl ImportTablesNotStartedDeserializer {
#[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(StringDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct IntegerDeserializer;
impl IntegerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct IntegerOptionalDeserializer;
impl IntegerOptionalDeserializer {
#[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 LoggingStatus {
pub bucket_name: Option<String>,
pub last_failure_message: Option<String>,
pub last_failure_time: Option<String>,
pub last_successful_delivery_time: Option<String>,
pub logging_enabled: Option<bool>,
pub s3_key_prefix: Option<String>,
}
struct LoggingStatusDeserializer;
impl LoggingStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LoggingStatus, XmlParseError> {
deserialize_elements::<_, LoggingStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"BucketName" => {
obj.bucket_name = Some(StringDeserializer::deserialize("BucketName", stack)?);
}
"LastFailureMessage" => {
obj.last_failure_message = Some(StringDeserializer::deserialize(
"LastFailureMessage",
stack,
)?);
}
"LastFailureTime" => {
obj.last_failure_time =
Some(TStampDeserializer::deserialize("LastFailureTime", stack)?);
}
"LastSuccessfulDeliveryTime" => {
obj.last_successful_delivery_time = Some(TStampDeserializer::deserialize(
"LastSuccessfulDeliveryTime",
stack,
)?);
}
"LoggingEnabled" => {
obj.logging_enabled =
Some(BooleanDeserializer::deserialize("LoggingEnabled", stack)?);
}
"S3KeyPrefix" => {
obj.s3_key_prefix =
Some(StringDeserializer::deserialize("S3KeyPrefix", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct LongDeserializer;
impl LongDeserializer {
#[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 LongOptionalDeserializer;
impl LongOptionalDeserializer {
#[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 MaintenanceTrack {
pub database_version: Option<String>,
pub maintenance_track_name: Option<String>,
pub update_targets: Option<Vec<UpdateTarget>>,
}
struct MaintenanceTrackDeserializer;
impl MaintenanceTrackDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<MaintenanceTrack, XmlParseError> {
deserialize_elements::<_, MaintenanceTrack, _>(tag_name, stack, |name, stack, obj| {
match name {
"DatabaseVersion" => {
obj.database_version =
Some(StringDeserializer::deserialize("DatabaseVersion", stack)?);
}
"MaintenanceTrackName" => {
obj.maintenance_track_name = Some(StringDeserializer::deserialize(
"MaintenanceTrackName",
stack,
)?);
}
"UpdateTargets" => {
obj.update_targets.get_or_insert(vec![]).extend(
EligibleTracksToUpdateListDeserializer::deserialize(
"UpdateTargets",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterDbRevisionMessage {
pub cluster_identifier: String,
pub revision_target: String,
}
struct ModifyClusterDbRevisionMessageSerializer;
impl ModifyClusterDbRevisionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterDbRevisionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
params.put(
&format!("{}{}", prefix, "RevisionTarget"),
&obj.revision_target,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterDbRevisionResult {
pub cluster: Option<Cluster>,
}
struct ModifyClusterDbRevisionResultDeserializer;
impl ModifyClusterDbRevisionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyClusterDbRevisionResult, XmlParseError> {
deserialize_elements::<_, ModifyClusterDbRevisionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterIamRolesMessage {
pub add_iam_roles: Option<Vec<String>>,
pub cluster_identifier: String,
pub remove_iam_roles: Option<Vec<String>>,
}
struct ModifyClusterIamRolesMessageSerializer;
impl ModifyClusterIamRolesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterIamRolesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.add_iam_roles {
IamRoleArnListSerializer::serialize(
params,
&format!("{}{}", prefix, "IamRoleArn"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.remove_iam_roles {
IamRoleArnListSerializer::serialize(
params,
&format!("{}{}", prefix, "IamRoleArn"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterIamRolesResult {
pub cluster: Option<Cluster>,
}
struct ModifyClusterIamRolesResultDeserializer;
impl ModifyClusterIamRolesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyClusterIamRolesResult, XmlParseError> {
deserialize_elements::<_, ModifyClusterIamRolesResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterMaintenanceMessage {
pub cluster_identifier: String,
pub defer_maintenance: Option<bool>,
pub defer_maintenance_duration: Option<i64>,
pub defer_maintenance_end_time: Option<String>,
pub defer_maintenance_identifier: Option<String>,
pub defer_maintenance_start_time: Option<String>,
}
struct ModifyClusterMaintenanceMessageSerializer;
impl ModifyClusterMaintenanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterMaintenanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.defer_maintenance {
params.put(&format!("{}{}", prefix, "DeferMaintenance"), &field_value);
}
if let Some(ref field_value) = obj.defer_maintenance_duration {
params.put(
&format!("{}{}", prefix, "DeferMaintenanceDuration"),
&field_value,
);
}
if let Some(ref field_value) = obj.defer_maintenance_end_time {
params.put(
&format!("{}{}", prefix, "DeferMaintenanceEndTime"),
&field_value,
);
}
if let Some(ref field_value) = obj.defer_maintenance_identifier {
params.put(
&format!("{}{}", prefix, "DeferMaintenanceIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.defer_maintenance_start_time {
params.put(
&format!("{}{}", prefix, "DeferMaintenanceStartTime"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterMaintenanceResult {
pub cluster: Option<Cluster>,
}
struct ModifyClusterMaintenanceResultDeserializer;
impl ModifyClusterMaintenanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyClusterMaintenanceResult, XmlParseError> {
deserialize_elements::<_, ModifyClusterMaintenanceResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterMessage {
pub allow_version_upgrade: Option<bool>,
pub automated_snapshot_retention_period: Option<i64>,
pub cluster_identifier: String,
pub cluster_parameter_group_name: Option<String>,
pub cluster_security_groups: Option<Vec<String>>,
pub cluster_type: Option<String>,
pub cluster_version: Option<String>,
pub elastic_ip: Option<String>,
pub encrypted: Option<bool>,
pub enhanced_vpc_routing: Option<bool>,
pub hsm_client_certificate_identifier: Option<String>,
pub hsm_configuration_identifier: Option<String>,
pub kms_key_id: Option<String>,
pub maintenance_track_name: Option<String>,
pub manual_snapshot_retention_period: Option<i64>,
pub master_user_password: Option<String>,
pub new_cluster_identifier: Option<String>,
pub node_type: Option<String>,
pub number_of_nodes: Option<i64>,
pub preferred_maintenance_window: Option<String>,
pub publicly_accessible: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct ModifyClusterMessageSerializer;
impl ModifyClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allow_version_upgrade {
params.put(
&format!("{}{}", prefix, "AllowVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.automated_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "AutomatedSnapshotRetentionPeriod"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "ClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.cluster_security_groups {
ClusterSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.cluster_type {
params.put(&format!("{}{}", prefix, "ClusterType"), &field_value);
}
if let Some(ref field_value) = obj.cluster_version {
params.put(&format!("{}{}", prefix, "ClusterVersion"), &field_value);
}
if let Some(ref field_value) = obj.elastic_ip {
params.put(&format!("{}{}", prefix, "ElasticIp"), &field_value);
}
if let Some(ref field_value) = obj.encrypted {
params.put(&format!("{}{}", prefix, "Encrypted"), &field_value);
}
if let Some(ref field_value) = obj.enhanced_vpc_routing {
params.put(&format!("{}{}", prefix, "EnhancedVpcRouting"), &field_value);
}
if let Some(ref field_value) = obj.hsm_client_certificate_identifier {
params.put(
&format!("{}{}", prefix, "HsmClientCertificateIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.hsm_configuration_identifier {
params.put(
&format!("{}{}", prefix, "HsmConfigurationIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.maintenance_track_name {
params.put(
&format!("{}{}", prefix, "MaintenanceTrackName"),
&field_value,
);
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.master_user_password {
params.put(&format!("{}{}", prefix, "MasterUserPassword"), &field_value);
}
if let Some(ref field_value) = obj.new_cluster_identifier {
params.put(
&format!("{}{}", prefix, "NewClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.node_type {
params.put(&format!("{}{}", prefix, "NodeType"), &field_value);
}
if let Some(ref field_value) = obj.number_of_nodes {
params.put(&format!("{}{}", prefix, "NumberOfNodes"), &field_value);
}
if let Some(ref field_value) = obj.preferred_maintenance_window {
params.put(
&format!("{}{}", prefix, "PreferredMaintenanceWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterParameterGroupMessage {
pub parameter_group_name: String,
pub parameters: Vec<Parameter>,
}
struct ModifyClusterParameterGroupMessageSerializer;
impl ModifyClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ParameterGroupName"),
&obj.parameter_group_name,
);
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
&obj.parameters,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterResult {
pub cluster: Option<Cluster>,
}
struct ModifyClusterResultDeserializer;
impl ModifyClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyClusterResult, XmlParseError> {
deserialize_elements::<_, ModifyClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterSnapshotMessage {
pub force: Option<bool>,
pub manual_snapshot_retention_period: Option<i64>,
pub snapshot_identifier: String,
}
struct ModifyClusterSnapshotMessageSerializer;
impl ModifyClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.force {
params.put(&format!("{}{}", prefix, "Force"), &field_value);
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterSnapshotResult {
pub snapshot: Option<Snapshot>,
}
struct ModifyClusterSnapshotResultDeserializer;
impl ModifyClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, ModifyClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterSnapshotScheduleMessage {
pub cluster_identifier: String,
pub disassociate_schedule: Option<bool>,
pub schedule_identifier: Option<String>,
}
struct ModifyClusterSnapshotScheduleMessageSerializer;
impl ModifyClusterSnapshotScheduleMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterSnapshotScheduleMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.disassociate_schedule {
params.put(
&format!("{}{}", prefix, "DisassociateSchedule"),
&field_value,
);
}
if let Some(ref field_value) = obj.schedule_identifier {
params.put(&format!("{}{}", prefix, "ScheduleIdentifier"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterSubnetGroupMessage {
pub cluster_subnet_group_name: String,
pub description: Option<String>,
pub subnet_ids: Vec<String>,
}
struct ModifyClusterSubnetGroupMessageSerializer;
impl ModifyClusterSubnetGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyClusterSubnetGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterSubnetGroupName"),
&obj.cluster_subnet_group_name,
);
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
SubnetIdentifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "SubnetIdentifier"),
&obj.subnet_ids,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyClusterSubnetGroupResult {
pub cluster_subnet_group: Option<ClusterSubnetGroup>,
}
struct ModifyClusterSubnetGroupResultDeserializer;
impl ModifyClusterSubnetGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyClusterSubnetGroupResult, XmlParseError> {
deserialize_elements::<_, ModifyClusterSubnetGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSubnetGroup" => {
obj.cluster_subnet_group =
Some(ClusterSubnetGroupDeserializer::deserialize(
"ClusterSubnetGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyEventSubscriptionMessage {
pub enabled: Option<bool>,
pub event_categories: Option<Vec<String>>,
pub severity: Option<String>,
pub sns_topic_arn: Option<String>,
pub source_ids: Option<Vec<String>>,
pub source_type: Option<String>,
pub subscription_name: String,
}
struct ModifyEventSubscriptionMessageSerializer;
impl ModifyEventSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyEventSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.enabled {
params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
}
if let Some(ref field_value) = obj.event_categories {
EventCategoriesListSerializer::serialize(
params,
&format!("{}{}", prefix, "EventCategory"),
field_value,
);
}
if let Some(ref field_value) = obj.severity {
params.put(&format!("{}{}", prefix, "Severity"), &field_value);
}
if let Some(ref field_value) = obj.sns_topic_arn {
params.put(&format!("{}{}", prefix, "SnsTopicArn"), &field_value);
}
if let Some(ref field_value) = obj.source_ids {
SourceIdsListSerializer::serialize(
params,
&format!("{}{}", prefix, "SourceId"),
field_value,
);
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyEventSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct ModifyEventSubscriptionResultDeserializer;
impl ModifyEventSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyEventSubscriptionResult, XmlParseError> {
deserialize_elements::<_, ModifyEventSubscriptionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscription" => {
obj.event_subscription = Some(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifySnapshotCopyRetentionPeriodMessage {
pub cluster_identifier: String,
pub manual: Option<bool>,
pub retention_period: i64,
}
struct ModifySnapshotCopyRetentionPeriodMessageSerializer;
impl ModifySnapshotCopyRetentionPeriodMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifySnapshotCopyRetentionPeriodMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.manual {
params.put(&format!("{}{}", prefix, "Manual"), &field_value);
}
params.put(
&format!("{}{}", prefix, "RetentionPeriod"),
&obj.retention_period,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifySnapshotCopyRetentionPeriodResult {
pub cluster: Option<Cluster>,
}
struct ModifySnapshotCopyRetentionPeriodResultDeserializer;
impl ModifySnapshotCopyRetentionPeriodResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifySnapshotCopyRetentionPeriodResult, XmlParseError> {
deserialize_elements::<_, ModifySnapshotCopyRetentionPeriodResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifySnapshotScheduleMessage {
pub schedule_definitions: Vec<String>,
pub schedule_identifier: String,
}
struct ModifySnapshotScheduleMessageSerializer;
impl ModifySnapshotScheduleMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifySnapshotScheduleMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
ScheduleDefinitionListSerializer::serialize(
params,
&format!("{}{}", prefix, "ScheduleDefinition"),
&obj.schedule_definitions,
);
params.put(
&format!("{}{}", prefix, "ScheduleIdentifier"),
&obj.schedule_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OrderableClusterOption {
pub availability_zones: Option<Vec<AvailabilityZone>>,
pub cluster_type: Option<String>,
pub cluster_version: Option<String>,
pub node_type: Option<String>,
}
struct OrderableClusterOptionDeserializer;
impl OrderableClusterOptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OrderableClusterOption, XmlParseError> {
deserialize_elements::<_, OrderableClusterOption, _>(tag_name, stack, |name, stack, obj| {
match name {
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZoneListDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
"ClusterType" => {
obj.cluster_type = Some(StringDeserializer::deserialize("ClusterType", stack)?);
}
"ClusterVersion" => {
obj.cluster_version =
Some(StringDeserializer::deserialize("ClusterVersion", stack)?);
}
"NodeType" => {
obj.node_type = Some(StringDeserializer::deserialize("NodeType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct OrderableClusterOptionsListDeserializer;
impl OrderableClusterOptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OrderableClusterOption>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OrderableClusterOption" {
obj.push(OrderableClusterOptionDeserializer::deserialize(
"OrderableClusterOption",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OrderableClusterOptionsMessage {
pub marker: Option<String>,
pub orderable_cluster_options: Option<Vec<OrderableClusterOption>>,
}
struct OrderableClusterOptionsMessageDeserializer;
impl OrderableClusterOptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OrderableClusterOptionsMessage, XmlParseError> {
deserialize_elements::<_, OrderableClusterOptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"OrderableClusterOptions" => {
obj.orderable_cluster_options.get_or_insert(vec![]).extend(
OrderableClusterOptionsListDeserializer::deserialize(
"OrderableClusterOptions",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Parameter {
pub allowed_values: Option<String>,
pub apply_type: Option<String>,
pub data_type: Option<String>,
pub description: Option<String>,
pub is_modifiable: Option<bool>,
pub minimum_engine_version: Option<String>,
pub parameter_name: Option<String>,
pub parameter_value: Option<String>,
pub source: Option<String>,
}
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 {
"AllowedValues" => {
obj.allowed_values =
Some(StringDeserializer::deserialize("AllowedValues", stack)?);
}
"ApplyType" => {
obj.apply_type = Some(ParameterApplyTypeDeserializer::deserialize(
"ApplyType",
stack,
)?);
}
"DataType" => {
obj.data_type = Some(StringDeserializer::deserialize("DataType", stack)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"IsModifiable" => {
obj.is_modifiable =
Some(BooleanDeserializer::deserialize("IsModifiable", stack)?);
}
"MinimumEngineVersion" => {
obj.minimum_engine_version = Some(StringDeserializer::deserialize(
"MinimumEngineVersion",
stack,
)?);
}
"ParameterName" => {
obj.parameter_name =
Some(StringDeserializer::deserialize("ParameterName", stack)?);
}
"ParameterValue" => {
obj.parameter_value =
Some(StringDeserializer::deserialize("ParameterValue", stack)?);
}
"Source" => {
obj.source = Some(StringDeserializer::deserialize("Source", 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.allowed_values {
params.put(&format!("{}{}", prefix, "AllowedValues"), &field_value);
}
if let Some(ref field_value) = obj.apply_type {
params.put(&format!("{}{}", prefix, "ApplyType"), &field_value);
}
if let Some(ref field_value) = obj.data_type {
params.put(&format!("{}{}", prefix, "DataType"), &field_value);
}
if let Some(ref field_value) = obj.description {
params.put(&format!("{}{}", prefix, "Description"), &field_value);
}
if let Some(ref field_value) = obj.is_modifiable {
params.put(&format!("{}{}", prefix, "IsModifiable"), &field_value);
}
if let Some(ref field_value) = obj.minimum_engine_version {
params.put(
&format!("{}{}", prefix, "MinimumEngineVersion"),
&field_value,
);
}
if let Some(ref field_value) = obj.parameter_name {
params.put(&format!("{}{}", prefix, "ParameterName"), &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.source {
params.put(&format!("{}{}", prefix, "Source"), &field_value);
}
}
}
struct ParameterApplyTypeDeserializer;
impl ParameterApplyTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_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 ParameterGroupListDeserializer;
impl ParameterGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ClusterParameterGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ClusterParameterGroup" {
obj.push(ClusterParameterGroupDeserializer::deserialize(
"ClusterParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ParametersListDeserializer;
impl ParametersListDeserializer {
#[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 == "Parameter" {
obj.push(ParameterDeserializer::deserialize("Parameter", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ParametersListSerializer;
impl ParametersListSerializer {
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 PendingActionsListDeserializer;
impl PendingActionsListDeserializer {
#[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(StringDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PendingModifiedValues {
pub automated_snapshot_retention_period: Option<i64>,
pub cluster_identifier: Option<String>,
pub cluster_type: Option<String>,
pub cluster_version: Option<String>,
pub encryption_type: Option<String>,
pub enhanced_vpc_routing: Option<bool>,
pub maintenance_track_name: Option<String>,
pub master_user_password: Option<String>,
pub node_type: Option<String>,
pub number_of_nodes: Option<i64>,
pub publicly_accessible: Option<bool>,
}
struct PendingModifiedValuesDeserializer;
impl PendingModifiedValuesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PendingModifiedValues, XmlParseError> {
deserialize_elements::<_, PendingModifiedValues, _>(tag_name, stack, |name, stack, obj| {
match name {
"AutomatedSnapshotRetentionPeriod" => {
obj.automated_snapshot_retention_period =
Some(IntegerOptionalDeserializer::deserialize(
"AutomatedSnapshotRetentionPeriod",
stack,
)?);
}
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"ClusterType" => {
obj.cluster_type = Some(StringDeserializer::deserialize("ClusterType", stack)?);
}
"ClusterVersion" => {
obj.cluster_version =
Some(StringDeserializer::deserialize("ClusterVersion", stack)?);
}
"EncryptionType" => {
obj.encryption_type =
Some(StringDeserializer::deserialize("EncryptionType", stack)?);
}
"EnhancedVpcRouting" => {
obj.enhanced_vpc_routing = Some(BooleanOptionalDeserializer::deserialize(
"EnhancedVpcRouting",
stack,
)?);
}
"MaintenanceTrackName" => {
obj.maintenance_track_name = Some(StringDeserializer::deserialize(
"MaintenanceTrackName",
stack,
)?);
}
"MasterUserPassword" => {
obj.master_user_password = Some(StringDeserializer::deserialize(
"MasterUserPassword",
stack,
)?);
}
"NodeType" => {
obj.node_type = Some(StringDeserializer::deserialize("NodeType", stack)?);
}
"NumberOfNodes" => {
obj.number_of_nodes = Some(IntegerOptionalDeserializer::deserialize(
"NumberOfNodes",
stack,
)?);
}
"PubliclyAccessible" => {
obj.publicly_accessible = Some(BooleanOptionalDeserializer::deserialize(
"PubliclyAccessible",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PurchaseReservedNodeOfferingMessage {
pub node_count: Option<i64>,
pub reserved_node_offering_id: String,
}
struct PurchaseReservedNodeOfferingMessageSerializer;
impl PurchaseReservedNodeOfferingMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PurchaseReservedNodeOfferingMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.node_count {
params.put(&format!("{}{}", prefix, "NodeCount"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ReservedNodeOfferingId"),
&obj.reserved_node_offering_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PurchaseReservedNodeOfferingResult {
pub reserved_node: Option<ReservedNode>,
}
struct PurchaseReservedNodeOfferingResultDeserializer;
impl PurchaseReservedNodeOfferingResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PurchaseReservedNodeOfferingResult, XmlParseError> {
deserialize_elements::<_, PurchaseReservedNodeOfferingResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ReservedNode" => {
obj.reserved_node = Some(ReservedNodeDeserializer::deserialize(
"ReservedNode",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RebootClusterMessage {
pub cluster_identifier: String,
}
struct RebootClusterMessageSerializer;
impl RebootClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RebootClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RebootClusterResult {
pub cluster: Option<Cluster>,
}
struct RebootClusterResultDeserializer;
impl RebootClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RebootClusterResult, XmlParseError> {
deserialize_elements::<_, RebootClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RecurringCharge {
pub recurring_charge_amount: Option<f64>,
pub recurring_charge_frequency: Option<String>,
}
struct RecurringChargeDeserializer;
impl RecurringChargeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RecurringCharge, XmlParseError> {
deserialize_elements::<_, RecurringCharge, _>(tag_name, stack, |name, stack, obj| {
match name {
"RecurringChargeAmount" => {
obj.recurring_charge_amount = Some(DoubleDeserializer::deserialize(
"RecurringChargeAmount",
stack,
)?);
}
"RecurringChargeFrequency" => {
obj.recurring_charge_frequency = Some(StringDeserializer::deserialize(
"RecurringChargeFrequency",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RecurringChargeListDeserializer;
impl RecurringChargeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RecurringCharge>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "RecurringCharge" {
obj.push(RecurringChargeDeserializer::deserialize(
"RecurringCharge",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReservedNode {
pub currency_code: Option<String>,
pub duration: Option<i64>,
pub fixed_price: Option<f64>,
pub node_count: Option<i64>,
pub node_type: Option<String>,
pub offering_type: Option<String>,
pub recurring_charges: Option<Vec<RecurringCharge>>,
pub reserved_node_id: Option<String>,
pub reserved_node_offering_id: Option<String>,
pub reserved_node_offering_type: Option<String>,
pub start_time: Option<String>,
pub state: Option<String>,
pub usage_price: Option<f64>,
}
struct ReservedNodeDeserializer;
impl ReservedNodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedNode, XmlParseError> {
deserialize_elements::<_, ReservedNode, _>(tag_name, stack, |name, stack, obj| {
match name {
"CurrencyCode" => {
obj.currency_code =
Some(StringDeserializer::deserialize("CurrencyCode", stack)?);
}
"Duration" => {
obj.duration = Some(IntegerDeserializer::deserialize("Duration", stack)?);
}
"FixedPrice" => {
obj.fixed_price = Some(DoubleDeserializer::deserialize("FixedPrice", stack)?);
}
"NodeCount" => {
obj.node_count = Some(IntegerDeserializer::deserialize("NodeCount", stack)?);
}
"NodeType" => {
obj.node_type = Some(StringDeserializer::deserialize("NodeType", stack)?);
}
"OfferingType" => {
obj.offering_type =
Some(StringDeserializer::deserialize("OfferingType", stack)?);
}
"RecurringCharges" => {
obj.recurring_charges.get_or_insert(vec![]).extend(
RecurringChargeListDeserializer::deserialize("RecurringCharges", stack)?,
);
}
"ReservedNodeId" => {
obj.reserved_node_id =
Some(StringDeserializer::deserialize("ReservedNodeId", stack)?);
}
"ReservedNodeOfferingId" => {
obj.reserved_node_offering_id = Some(StringDeserializer::deserialize(
"ReservedNodeOfferingId",
stack,
)?);
}
"ReservedNodeOfferingType" => {
obj.reserved_node_offering_type =
Some(ReservedNodeOfferingTypeDeserializer::deserialize(
"ReservedNodeOfferingType",
stack,
)?);
}
"StartTime" => {
obj.start_time = Some(TStampDeserializer::deserialize("StartTime", stack)?);
}
"State" => {
obj.state = Some(StringDeserializer::deserialize("State", stack)?);
}
"UsagePrice" => {
obj.usage_price = Some(DoubleDeserializer::deserialize("UsagePrice", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReservedNodeListDeserializer;
impl ReservedNodeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReservedNode>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ReservedNode" {
obj.push(ReservedNodeDeserializer::deserialize(
"ReservedNode",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReservedNodeOffering {
pub currency_code: Option<String>,
pub duration: Option<i64>,
pub fixed_price: Option<f64>,
pub node_type: Option<String>,
pub offering_type: Option<String>,
pub recurring_charges: Option<Vec<RecurringCharge>>,
pub reserved_node_offering_id: Option<String>,
pub reserved_node_offering_type: Option<String>,
pub usage_price: Option<f64>,
}
struct ReservedNodeOfferingDeserializer;
impl ReservedNodeOfferingDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedNodeOffering, XmlParseError> {
deserialize_elements::<_, ReservedNodeOffering, _>(tag_name, stack, |name, stack, obj| {
match name {
"CurrencyCode" => {
obj.currency_code =
Some(StringDeserializer::deserialize("CurrencyCode", stack)?);
}
"Duration" => {
obj.duration = Some(IntegerDeserializer::deserialize("Duration", stack)?);
}
"FixedPrice" => {
obj.fixed_price = Some(DoubleDeserializer::deserialize("FixedPrice", stack)?);
}
"NodeType" => {
obj.node_type = Some(StringDeserializer::deserialize("NodeType", stack)?);
}
"OfferingType" => {
obj.offering_type =
Some(StringDeserializer::deserialize("OfferingType", stack)?);
}
"RecurringCharges" => {
obj.recurring_charges.get_or_insert(vec![]).extend(
RecurringChargeListDeserializer::deserialize("RecurringCharges", stack)?,
);
}
"ReservedNodeOfferingId" => {
obj.reserved_node_offering_id = Some(StringDeserializer::deserialize(
"ReservedNodeOfferingId",
stack,
)?);
}
"ReservedNodeOfferingType" => {
obj.reserved_node_offering_type =
Some(ReservedNodeOfferingTypeDeserializer::deserialize(
"ReservedNodeOfferingType",
stack,
)?);
}
"UsagePrice" => {
obj.usage_price = Some(DoubleDeserializer::deserialize("UsagePrice", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReservedNodeOfferingListDeserializer;
impl ReservedNodeOfferingListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReservedNodeOffering>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ReservedNodeOffering" {
obj.push(ReservedNodeOfferingDeserializer::deserialize(
"ReservedNodeOffering",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReservedNodeOfferingTypeDeserializer;
impl ReservedNodeOfferingTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_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 ReservedNodeOfferingsMessage {
pub marker: Option<String>,
pub reserved_node_offerings: Option<Vec<ReservedNodeOffering>>,
}
struct ReservedNodeOfferingsMessageDeserializer;
impl ReservedNodeOfferingsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedNodeOfferingsMessage, XmlParseError> {
deserialize_elements::<_, ReservedNodeOfferingsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ReservedNodeOfferings" => {
obj.reserved_node_offerings.get_or_insert(vec![]).extend(
ReservedNodeOfferingListDeserializer::deserialize(
"ReservedNodeOfferings",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReservedNodesMessage {
pub marker: Option<String>,
pub reserved_nodes: Option<Vec<ReservedNode>>,
}
struct ReservedNodesMessageDeserializer;
impl ReservedNodesMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedNodesMessage, XmlParseError> {
deserialize_elements::<_, ReservedNodesMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ReservedNodes" => {
obj.reserved_nodes.get_or_insert(vec![]).extend(
ReservedNodeListDeserializer::deserialize("ReservedNodes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResetClusterParameterGroupMessage {
pub parameter_group_name: String,
pub parameters: Option<Vec<Parameter>>,
pub reset_all_parameters: Option<bool>,
}
struct ResetClusterParameterGroupMessageSerializer;
impl ResetClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResetClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ParameterGroupName"),
&obj.parameter_group_name,
);
if let Some(ref field_value) = obj.parameters {
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
field_value,
);
}
if let Some(ref field_value) = obj.reset_all_parameters {
params.put(&format!("{}{}", prefix, "ResetAllParameters"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResizeClusterMessage {
pub classic: Option<bool>,
pub cluster_identifier: String,
pub cluster_type: Option<String>,
pub node_type: Option<String>,
pub number_of_nodes: i64,
}
struct ResizeClusterMessageSerializer;
impl ResizeClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResizeClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.classic {
params.put(&format!("{}{}", prefix, "Classic"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.cluster_type {
params.put(&format!("{}{}", prefix, "ClusterType"), &field_value);
}
if let Some(ref field_value) = obj.node_type {
params.put(&format!("{}{}", prefix, "NodeType"), &field_value);
}
params.put(
&format!("{}{}", prefix, "NumberOfNodes"),
&obj.number_of_nodes,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResizeClusterResult {
pub cluster: Option<Cluster>,
}
struct ResizeClusterResultDeserializer;
impl ResizeClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResizeClusterResult, XmlParseError> {
deserialize_elements::<_, ResizeClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResizeInfo {
pub allow_cancel_resize: Option<bool>,
pub resize_type: Option<String>,
}
struct ResizeInfoDeserializer;
impl ResizeInfoDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResizeInfo, XmlParseError> {
deserialize_elements::<_, ResizeInfo, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllowCancelResize" => {
obj.allow_cancel_resize = Some(BooleanDeserializer::deserialize(
"AllowCancelResize",
stack,
)?);
}
"ResizeType" => {
obj.resize_type = Some(StringDeserializer::deserialize("ResizeType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResizeProgressMessage {
pub avg_resize_rate_in_mega_bytes_per_second: Option<f64>,
pub data_transfer_progress_percent: Option<f64>,
pub elapsed_time_in_seconds: Option<i64>,
pub estimated_time_to_completion_in_seconds: Option<i64>,
pub import_tables_completed: Option<Vec<String>>,
pub import_tables_in_progress: Option<Vec<String>>,
pub import_tables_not_started: Option<Vec<String>>,
pub message: Option<String>,
pub progress_in_mega_bytes: Option<i64>,
pub resize_type: Option<String>,
pub status: Option<String>,
pub target_cluster_type: Option<String>,
pub target_encryption_type: Option<String>,
pub target_node_type: Option<String>,
pub target_number_of_nodes: Option<i64>,
pub total_resize_data_in_mega_bytes: Option<i64>,
}
struct ResizeProgressMessageDeserializer;
impl ResizeProgressMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResizeProgressMessage, XmlParseError> {
deserialize_elements::<_, ResizeProgressMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"AvgResizeRateInMegaBytesPerSecond" => {
obj.avg_resize_rate_in_mega_bytes_per_second =
Some(DoubleOptionalDeserializer::deserialize(
"AvgResizeRateInMegaBytesPerSecond",
stack,
)?);
}
"DataTransferProgressPercent" => {
obj.data_transfer_progress_percent =
Some(DoubleOptionalDeserializer::deserialize(
"DataTransferProgressPercent",
stack,
)?);
}
"ElapsedTimeInSeconds" => {
obj.elapsed_time_in_seconds = Some(LongOptionalDeserializer::deserialize(
"ElapsedTimeInSeconds",
stack,
)?);
}
"EstimatedTimeToCompletionInSeconds" => {
obj.estimated_time_to_completion_in_seconds =
Some(LongOptionalDeserializer::deserialize(
"EstimatedTimeToCompletionInSeconds",
stack,
)?);
}
"ImportTablesCompleted" => {
obj.import_tables_completed.get_or_insert(vec![]).extend(
ImportTablesCompletedDeserializer::deserialize(
"ImportTablesCompleted",
stack,
)?,
);
}
"ImportTablesInProgress" => {
obj.import_tables_in_progress.get_or_insert(vec![]).extend(
ImportTablesInProgressDeserializer::deserialize(
"ImportTablesInProgress",
stack,
)?,
);
}
"ImportTablesNotStarted" => {
obj.import_tables_not_started.get_or_insert(vec![]).extend(
ImportTablesNotStartedDeserializer::deserialize(
"ImportTablesNotStarted",
stack,
)?,
);
}
"Message" => {
obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
}
"ProgressInMegaBytes" => {
obj.progress_in_mega_bytes = Some(LongOptionalDeserializer::deserialize(
"ProgressInMegaBytes",
stack,
)?);
}
"ResizeType" => {
obj.resize_type = Some(StringDeserializer::deserialize("ResizeType", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"TargetClusterType" => {
obj.target_cluster_type =
Some(StringDeserializer::deserialize("TargetClusterType", stack)?);
}
"TargetEncryptionType" => {
obj.target_encryption_type = Some(StringDeserializer::deserialize(
"TargetEncryptionType",
stack,
)?);
}
"TargetNodeType" => {
obj.target_node_type =
Some(StringDeserializer::deserialize("TargetNodeType", stack)?);
}
"TargetNumberOfNodes" => {
obj.target_number_of_nodes = Some(IntegerOptionalDeserializer::deserialize(
"TargetNumberOfNodes",
stack,
)?);
}
"TotalResizeDataInMegaBytes" => {
obj.total_resize_data_in_mega_bytes = Some(
LongOptionalDeserializer::deserialize("TotalResizeDataInMegaBytes", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RestorableNodeTypeListDeserializer;
impl RestorableNodeTypeListDeserializer {
#[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 == "NodeType" {
obj.push(StringDeserializer::deserialize("NodeType", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreFromClusterSnapshotMessage {
pub additional_info: Option<String>,
pub allow_version_upgrade: Option<bool>,
pub automated_snapshot_retention_period: Option<i64>,
pub availability_zone: Option<String>,
pub cluster_identifier: String,
pub cluster_parameter_group_name: Option<String>,
pub cluster_security_groups: Option<Vec<String>>,
pub cluster_subnet_group_name: Option<String>,
pub elastic_ip: Option<String>,
pub enhanced_vpc_routing: Option<bool>,
pub hsm_client_certificate_identifier: Option<String>,
pub hsm_configuration_identifier: Option<String>,
pub iam_roles: Option<Vec<String>>,
pub kms_key_id: Option<String>,
pub maintenance_track_name: Option<String>,
pub manual_snapshot_retention_period: Option<i64>,
pub node_type: Option<String>,
pub owner_account: Option<String>,
pub port: Option<i64>,
pub preferred_maintenance_window: Option<String>,
pub publicly_accessible: Option<bool>,
pub snapshot_cluster_identifier: Option<String>,
pub snapshot_identifier: String,
pub snapshot_schedule_identifier: Option<String>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreFromClusterSnapshotMessageSerializer;
impl RestoreFromClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreFromClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.additional_info {
params.put(&format!("{}{}", prefix, "AdditionalInfo"), &field_value);
}
if let Some(ref field_value) = obj.allow_version_upgrade {
params.put(
&format!("{}{}", prefix, "AllowVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.automated_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "AutomatedSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.availability_zone {
params.put(&format!("{}{}", prefix, "AvailabilityZone"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
if let Some(ref field_value) = obj.cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "ClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.cluster_security_groups {
ClusterSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.cluster_subnet_group_name {
params.put(
&format!("{}{}", prefix, "ClusterSubnetGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.elastic_ip {
params.put(&format!("{}{}", prefix, "ElasticIp"), &field_value);
}
if let Some(ref field_value) = obj.enhanced_vpc_routing {
params.put(&format!("{}{}", prefix, "EnhancedVpcRouting"), &field_value);
}
if let Some(ref field_value) = obj.hsm_client_certificate_identifier {
params.put(
&format!("{}{}", prefix, "HsmClientCertificateIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.hsm_configuration_identifier {
params.put(
&format!("{}{}", prefix, "HsmConfigurationIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.iam_roles {
IamRoleArnListSerializer::serialize(
params,
&format!("{}{}", prefix, "IamRoleArn"),
field_value,
);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.maintenance_track_name {
params.put(
&format!("{}{}", prefix, "MaintenanceTrackName"),
&field_value,
);
}
if let Some(ref field_value) = obj.manual_snapshot_retention_period {
params.put(
&format!("{}{}", prefix, "ManualSnapshotRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.node_type {
params.put(&format!("{}{}", prefix, "NodeType"), &field_value);
}
if let Some(ref field_value) = obj.owner_account {
params.put(&format!("{}{}", prefix, "OwnerAccount"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.preferred_maintenance_window {
params.put(
&format!("{}{}", prefix, "PreferredMaintenanceWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
if let Some(ref field_value) = obj.snapshot_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SnapshotClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
if let Some(ref field_value) = obj.snapshot_schedule_identifier {
params.put(
&format!("{}{}", prefix, "SnapshotScheduleIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreFromClusterSnapshotResult {
pub cluster: Option<Cluster>,
}
struct RestoreFromClusterSnapshotResultDeserializer;
impl RestoreFromClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreFromClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, RestoreFromClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreStatus {
pub current_restore_rate_in_mega_bytes_per_second: Option<f64>,
pub elapsed_time_in_seconds: Option<i64>,
pub estimated_time_to_completion_in_seconds: Option<i64>,
pub progress_in_mega_bytes: Option<i64>,
pub snapshot_size_in_mega_bytes: Option<i64>,
pub status: Option<String>,
}
struct RestoreStatusDeserializer;
impl RestoreStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreStatus, XmlParseError> {
deserialize_elements::<_, RestoreStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"CurrentRestoreRateInMegaBytesPerSecond" => {
obj.current_restore_rate_in_mega_bytes_per_second =
Some(DoubleDeserializer::deserialize(
"CurrentRestoreRateInMegaBytesPerSecond",
stack,
)?);
}
"ElapsedTimeInSeconds" => {
obj.elapsed_time_in_seconds = Some(LongDeserializer::deserialize(
"ElapsedTimeInSeconds",
stack,
)?);
}
"EstimatedTimeToCompletionInSeconds" => {
obj.estimated_time_to_completion_in_seconds = Some(
LongDeserializer::deserialize("EstimatedTimeToCompletionInSeconds", stack)?,
);
}
"ProgressInMegaBytes" => {
obj.progress_in_mega_bytes =
Some(LongDeserializer::deserialize("ProgressInMegaBytes", stack)?);
}
"SnapshotSizeInMegaBytes" => {
obj.snapshot_size_in_mega_bytes = Some(LongDeserializer::deserialize(
"SnapshotSizeInMegaBytes",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreTableFromClusterSnapshotMessage {
pub cluster_identifier: String,
pub new_table_name: String,
pub snapshot_identifier: String,
pub source_database_name: String,
pub source_schema_name: Option<String>,
pub source_table_name: String,
pub target_database_name: Option<String>,
pub target_schema_name: Option<String>,
}
struct RestoreTableFromClusterSnapshotMessageSerializer;
impl RestoreTableFromClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreTableFromClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
params.put(
&format!("{}{}", prefix, "NewTableName"),
&obj.new_table_name,
);
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
params.put(
&format!("{}{}", prefix, "SourceDatabaseName"),
&obj.source_database_name,
);
if let Some(ref field_value) = obj.source_schema_name {
params.put(&format!("{}{}", prefix, "SourceSchemaName"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SourceTableName"),
&obj.source_table_name,
);
if let Some(ref field_value) = obj.target_database_name {
params.put(&format!("{}{}", prefix, "TargetDatabaseName"), &field_value);
}
if let Some(ref field_value) = obj.target_schema_name {
params.put(&format!("{}{}", prefix, "TargetSchemaName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreTableFromClusterSnapshotResult {
pub table_restore_status: Option<TableRestoreStatus>,
}
struct RestoreTableFromClusterSnapshotResultDeserializer;
impl RestoreTableFromClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreTableFromClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, RestoreTableFromClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TableRestoreStatus" => {
obj.table_restore_status =
Some(TableRestoreStatusDeserializer::deserialize(
"TableRestoreStatus",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RevisionTarget {
pub database_revision: Option<String>,
pub database_revision_release_date: Option<String>,
pub description: Option<String>,
}
struct RevisionTargetDeserializer;
impl RevisionTargetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RevisionTarget, XmlParseError> {
deserialize_elements::<_, RevisionTarget, _>(tag_name, stack, |name, stack, obj| {
match name {
"DatabaseRevision" => {
obj.database_revision =
Some(StringDeserializer::deserialize("DatabaseRevision", stack)?);
}
"DatabaseRevisionReleaseDate" => {
obj.database_revision_release_date = Some(TStampDeserializer::deserialize(
"DatabaseRevisionReleaseDate",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RevisionTargetsListDeserializer;
impl RevisionTargetsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RevisionTarget>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "RevisionTarget" {
obj.push(RevisionTargetDeserializer::deserialize(
"RevisionTarget",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RevokeClusterSecurityGroupIngressMessage {
pub cidrip: Option<String>,
pub cluster_security_group_name: String,
pub ec2_security_group_name: Option<String>,
pub ec2_security_group_owner_id: Option<String>,
}
struct RevokeClusterSecurityGroupIngressMessageSerializer;
impl RevokeClusterSecurityGroupIngressMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RevokeClusterSecurityGroupIngressMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cidrip {
params.put(&format!("{}{}", prefix, "CIDRIP"), &field_value);
}
params.put(
&format!("{}{}", prefix, "ClusterSecurityGroupName"),
&obj.cluster_security_group_name,
);
if let Some(ref field_value) = obj.ec2_security_group_name {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.ec2_security_group_owner_id {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupOwnerId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RevokeClusterSecurityGroupIngressResult {
pub cluster_security_group: Option<ClusterSecurityGroup>,
}
struct RevokeClusterSecurityGroupIngressResultDeserializer;
impl RevokeClusterSecurityGroupIngressResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RevokeClusterSecurityGroupIngressResult, XmlParseError> {
deserialize_elements::<_, RevokeClusterSecurityGroupIngressResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ClusterSecurityGroup" => {
obj.cluster_security_group =
Some(ClusterSecurityGroupDeserializer::deserialize(
"ClusterSecurityGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RevokeSnapshotAccessMessage {
pub account_with_restore_access: String,
pub snapshot_cluster_identifier: Option<String>,
pub snapshot_identifier: String,
}
struct RevokeSnapshotAccessMessageSerializer;
impl RevokeSnapshotAccessMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RevokeSnapshotAccessMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AccountWithRestoreAccess"),
&obj.account_with_restore_access,
);
if let Some(ref field_value) = obj.snapshot_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SnapshotClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "SnapshotIdentifier"),
&obj.snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RevokeSnapshotAccessResult {
pub snapshot: Option<Snapshot>,
}
struct RevokeSnapshotAccessResultDeserializer;
impl RevokeSnapshotAccessResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RevokeSnapshotAccessResult, XmlParseError> {
deserialize_elements::<_, RevokeSnapshotAccessResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Snapshot" => {
obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RotateEncryptionKeyMessage {
pub cluster_identifier: String,
}
struct RotateEncryptionKeyMessageSerializer;
impl RotateEncryptionKeyMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RotateEncryptionKeyMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "ClusterIdentifier"),
&obj.cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RotateEncryptionKeyResult {
pub cluster: Option<Cluster>,
}
struct RotateEncryptionKeyResultDeserializer;
impl RotateEncryptionKeyResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RotateEncryptionKeyResult, XmlParseError> {
deserialize_elements::<_, RotateEncryptionKeyResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Cluster" => {
obj.cluster = Some(ClusterDeserializer::deserialize("Cluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ScheduleDefinitionListDeserializer;
impl ScheduleDefinitionListDeserializer {
#[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 == "ScheduleDefinition" {
obj.push(StringDeserializer::deserialize(
"ScheduleDefinition",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ScheduleDefinitionListSerializer;
impl ScheduleDefinitionListSerializer {
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 ScheduleStateDeserializer;
impl ScheduleStateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_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 ScheduledSnapshotTimeListDeserializer;
impl ScheduledSnapshotTimeListDeserializer {
#[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 == "SnapshotTime" {
obj.push(TStampDeserializer::deserialize("SnapshotTime", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SensitiveStringDeserializer;
impl SensitiveStringDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_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 Snapshot {
pub accounts_with_restore_access: Option<Vec<AccountWithRestoreAccess>>,
pub actual_incremental_backup_size_in_mega_bytes: Option<f64>,
pub availability_zone: Option<String>,
pub backup_progress_in_mega_bytes: Option<f64>,
pub cluster_create_time: Option<String>,
pub cluster_identifier: Option<String>,
pub cluster_version: Option<String>,
pub current_backup_rate_in_mega_bytes_per_second: Option<f64>,
pub db_name: Option<String>,
pub elapsed_time_in_seconds: Option<i64>,
pub encrypted: Option<bool>,
pub encrypted_with_hsm: Option<bool>,
pub enhanced_vpc_routing: Option<bool>,
pub estimated_seconds_to_completion: Option<i64>,
pub kms_key_id: Option<String>,
pub maintenance_track_name: Option<String>,
pub manual_snapshot_remaining_days: Option<i64>,
pub manual_snapshot_retention_period: Option<i64>,
pub master_username: Option<String>,
pub node_type: Option<String>,
pub number_of_nodes: Option<i64>,
pub owner_account: Option<String>,
pub port: Option<i64>,
pub restorable_node_types: Option<Vec<String>>,
pub snapshot_create_time: Option<String>,
pub snapshot_identifier: Option<String>,
pub snapshot_retention_start_time: Option<String>,
pub snapshot_type: Option<String>,
pub source_region: Option<String>,
pub status: Option<String>,
pub tags: Option<Vec<Tag>>,
pub total_backup_size_in_mega_bytes: Option<f64>,
pub vpc_id: Option<String>,
}
struct SnapshotDeserializer;
impl SnapshotDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Snapshot, XmlParseError> {
deserialize_elements::<_, Snapshot, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccountsWithRestoreAccess" => {
obj.accounts_with_restore_access
.get_or_insert(vec![])
.extend(AccountsWithRestoreAccessListDeserializer::deserialize(
"AccountsWithRestoreAccess",
stack,
)?);
}
"ActualIncrementalBackupSizeInMegaBytes" => {
obj.actual_incremental_backup_size_in_mega_bytes =
Some(DoubleDeserializer::deserialize(
"ActualIncrementalBackupSizeInMegaBytes",
stack,
)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"BackupProgressInMegaBytes" => {
obj.backup_progress_in_mega_bytes = Some(DoubleDeserializer::deserialize(
"BackupProgressInMegaBytes",
stack,
)?);
}
"ClusterCreateTime" => {
obj.cluster_create_time =
Some(TStampDeserializer::deserialize("ClusterCreateTime", stack)?);
}
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"ClusterVersion" => {
obj.cluster_version =
Some(StringDeserializer::deserialize("ClusterVersion", stack)?);
}
"CurrentBackupRateInMegaBytesPerSecond" => {
obj.current_backup_rate_in_mega_bytes_per_second =
Some(DoubleDeserializer::deserialize(
"CurrentBackupRateInMegaBytesPerSecond",
stack,
)?);
}
"DBName" => {
obj.db_name = Some(StringDeserializer::deserialize("DBName", stack)?);
}
"ElapsedTimeInSeconds" => {
obj.elapsed_time_in_seconds = Some(LongDeserializer::deserialize(
"ElapsedTimeInSeconds",
stack,
)?);
}
"Encrypted" => {
obj.encrypted = Some(BooleanDeserializer::deserialize("Encrypted", stack)?);
}
"EncryptedWithHSM" => {
obj.encrypted_with_hsm =
Some(BooleanDeserializer::deserialize("EncryptedWithHSM", stack)?);
}
"EnhancedVpcRouting" => {
obj.enhanced_vpc_routing = Some(BooleanDeserializer::deserialize(
"EnhancedVpcRouting",
stack,
)?);
}
"EstimatedSecondsToCompletion" => {
obj.estimated_seconds_to_completion = Some(LongDeserializer::deserialize(
"EstimatedSecondsToCompletion",
stack,
)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"MaintenanceTrackName" => {
obj.maintenance_track_name = Some(StringDeserializer::deserialize(
"MaintenanceTrackName",
stack,
)?);
}
"ManualSnapshotRemainingDays" => {
obj.manual_snapshot_remaining_days =
Some(IntegerOptionalDeserializer::deserialize(
"ManualSnapshotRemainingDays",
stack,
)?);
}
"ManualSnapshotRetentionPeriod" => {
obj.manual_snapshot_retention_period =
Some(IntegerOptionalDeserializer::deserialize(
"ManualSnapshotRetentionPeriod",
stack,
)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"NodeType" => {
obj.node_type = Some(StringDeserializer::deserialize("NodeType", stack)?);
}
"NumberOfNodes" => {
obj.number_of_nodes =
Some(IntegerDeserializer::deserialize("NumberOfNodes", stack)?);
}
"OwnerAccount" => {
obj.owner_account =
Some(StringDeserializer::deserialize("OwnerAccount", stack)?);
}
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
"RestorableNodeTypes" => {
obj.restorable_node_types.get_or_insert(vec![]).extend(
RestorableNodeTypeListDeserializer::deserialize(
"RestorableNodeTypes",
stack,
)?,
);
}
"SnapshotCreateTime" => {
obj.snapshot_create_time = Some(TStampDeserializer::deserialize(
"SnapshotCreateTime",
stack,
)?);
}
"SnapshotIdentifier" => {
obj.snapshot_identifier = Some(StringDeserializer::deserialize(
"SnapshotIdentifier",
stack,
)?);
}
"SnapshotRetentionStartTime" => {
obj.snapshot_retention_start_time = Some(TStampDeserializer::deserialize(
"SnapshotRetentionStartTime",
stack,
)?);
}
"SnapshotType" => {
obj.snapshot_type =
Some(StringDeserializer::deserialize("SnapshotType", stack)?);
}
"SourceRegion" => {
obj.source_region =
Some(StringDeserializer::deserialize("SourceRegion", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
"TotalBackupSizeInMegaBytes" => {
obj.total_backup_size_in_mega_bytes = Some(DoubleDeserializer::deserialize(
"TotalBackupSizeInMegaBytes",
stack,
)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SnapshotCopyGrant {
pub kms_key_id: Option<String>,
pub snapshot_copy_grant_name: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct SnapshotCopyGrantDeserializer;
impl SnapshotCopyGrantDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SnapshotCopyGrant, XmlParseError> {
deserialize_elements::<_, SnapshotCopyGrant, _>(tag_name, stack, |name, stack, obj| {
match name {
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"SnapshotCopyGrantName" => {
obj.snapshot_copy_grant_name = Some(StringDeserializer::deserialize(
"SnapshotCopyGrantName",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SnapshotCopyGrantListDeserializer;
impl SnapshotCopyGrantListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SnapshotCopyGrant>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SnapshotCopyGrant" {
obj.push(SnapshotCopyGrantDeserializer::deserialize(
"SnapshotCopyGrant",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SnapshotCopyGrantMessage {
pub marker: Option<String>,
pub snapshot_copy_grants: Option<Vec<SnapshotCopyGrant>>,
}
struct SnapshotCopyGrantMessageDeserializer;
impl SnapshotCopyGrantMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SnapshotCopyGrantMessage, XmlParseError> {
deserialize_elements::<_, SnapshotCopyGrantMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"SnapshotCopyGrants" => {
obj.snapshot_copy_grants.get_or_insert(vec![]).extend(
SnapshotCopyGrantListDeserializer::deserialize(
"SnapshotCopyGrants",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SnapshotErrorMessage {
pub failure_code: Option<String>,
pub failure_reason: Option<String>,
pub snapshot_cluster_identifier: Option<String>,
pub snapshot_identifier: Option<String>,
}
struct SnapshotErrorMessageDeserializer;
impl SnapshotErrorMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SnapshotErrorMessage, XmlParseError> {
deserialize_elements::<_, SnapshotErrorMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"FailureCode" => {
obj.failure_code = Some(StringDeserializer::deserialize("FailureCode", stack)?);
}
"FailureReason" => {
obj.failure_reason =
Some(StringDeserializer::deserialize("FailureReason", stack)?);
}
"SnapshotClusterIdentifier" => {
obj.snapshot_cluster_identifier = Some(StringDeserializer::deserialize(
"SnapshotClusterIdentifier",
stack,
)?);
}
"SnapshotIdentifier" => {
obj.snapshot_identifier = Some(StringDeserializer::deserialize(
"SnapshotIdentifier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SnapshotIdentifierListDeserializer;
impl SnapshotIdentifierListDeserializer {
#[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 == "String" {
obj.push(StringDeserializer::deserialize("String", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SnapshotIdentifierListSerializer;
impl SnapshotIdentifierListSerializer {
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 SnapshotListDeserializer;
impl SnapshotListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Snapshot>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Snapshot" {
obj.push(SnapshotDeserializer::deserialize("Snapshot", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SnapshotMessage {
pub marker: Option<String>,
pub snapshots: Option<Vec<Snapshot>>,
}
struct SnapshotMessageDeserializer;
impl SnapshotMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SnapshotMessage, XmlParseError> {
deserialize_elements::<_, SnapshotMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"Snapshots" => {
obj.snapshots
.get_or_insert(vec![])
.extend(SnapshotListDeserializer::deserialize("Snapshots", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SnapshotSchedule {
pub associated_cluster_count: Option<i64>,
pub associated_clusters: Option<Vec<ClusterAssociatedToSchedule>>,
pub next_invocations: Option<Vec<String>>,
pub schedule_definitions: Option<Vec<String>>,
pub schedule_description: Option<String>,
pub schedule_identifier: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct SnapshotScheduleDeserializer;
impl SnapshotScheduleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SnapshotSchedule, XmlParseError> {
deserialize_elements::<_, SnapshotSchedule, _>(tag_name, stack, |name, stack, obj| {
match name {
"AssociatedClusterCount" => {
obj.associated_cluster_count = Some(IntegerOptionalDeserializer::deserialize(
"AssociatedClusterCount",
stack,
)?);
}
"AssociatedClusters" => {
obj.associated_clusters.get_or_insert(vec![]).extend(
AssociatedClusterListDeserializer::deserialize(
"AssociatedClusters",
stack,
)?,
);
}
"NextInvocations" => {
obj.next_invocations.get_or_insert(vec![]).extend(
ScheduledSnapshotTimeListDeserializer::deserialize(
"NextInvocations",
stack,
)?,
);
}
"ScheduleDefinitions" => {
obj.schedule_definitions.get_or_insert(vec![]).extend(
ScheduleDefinitionListDeserializer::deserialize(
"ScheduleDefinitions",
stack,
)?,
);
}
"ScheduleDescription" => {
obj.schedule_description = Some(StringDeserializer::deserialize(
"ScheduleDescription",
stack,
)?);
}
"ScheduleIdentifier" => {
obj.schedule_identifier = Some(StringDeserializer::deserialize(
"ScheduleIdentifier",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SnapshotScheduleListDeserializer;
impl SnapshotScheduleListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SnapshotSchedule>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SnapshotSchedule" {
obj.push(SnapshotScheduleDeserializer::deserialize(
"SnapshotSchedule",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SnapshotSortingEntity {
pub attribute: String,
pub sort_order: Option<String>,
}
struct SnapshotSortingEntitySerializer;
impl SnapshotSortingEntitySerializer {
fn serialize(params: &mut Params, name: &str, obj: &SnapshotSortingEntity) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Attribute"), &obj.attribute);
if let Some(ref field_value) = obj.sort_order {
params.put(&format!("{}{}", prefix, "SortOrder"), &field_value);
}
}
}
struct SnapshotSortingEntityListSerializer;
impl SnapshotSortingEntityListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<SnapshotSortingEntity>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
SnapshotSortingEntitySerializer::serialize(params, &key, obj);
}
}
}
struct SourceIdsListDeserializer;
impl SourceIdsListDeserializer {
#[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 == "SourceId" {
obj.push(StringDeserializer::deserialize("SourceId", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SourceIdsListSerializer;
impl SourceIdsListSerializer {
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 SourceTypeDeserializer;
impl SourceTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct StringDeserializer;
impl StringDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Subnet {
pub subnet_availability_zone: Option<AvailabilityZone>,
pub subnet_identifier: Option<String>,
pub subnet_status: Option<String>,
}
struct SubnetDeserializer;
impl SubnetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Subnet, XmlParseError> {
deserialize_elements::<_, Subnet, _>(tag_name, stack, |name, stack, obj| {
match name {
"SubnetAvailabilityZone" => {
obj.subnet_availability_zone = Some(AvailabilityZoneDeserializer::deserialize(
"SubnetAvailabilityZone",
stack,
)?);
}
"SubnetIdentifier" => {
obj.subnet_identifier =
Some(StringDeserializer::deserialize("SubnetIdentifier", stack)?);
}
"SubnetStatus" => {
obj.subnet_status =
Some(StringDeserializer::deserialize("SubnetStatus", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SubnetIdentifierListSerializer;
impl SubnetIdentifierListSerializer {
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 SubnetListDeserializer;
impl SubnetListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Subnet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Subnet" {
obj.push(SubnetDeserializer::deserialize("Subnet", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SupportedOperation {
pub operation_name: Option<String>,
}
struct SupportedOperationDeserializer;
impl SupportedOperationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SupportedOperation, XmlParseError> {
deserialize_elements::<_, SupportedOperation, _>(tag_name, stack, |name, stack, obj| {
match name {
"OperationName" => {
obj.operation_name =
Some(StringDeserializer::deserialize("OperationName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SupportedOperationListDeserializer;
impl SupportedOperationListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SupportedOperation>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SupportedOperation" {
obj.push(SupportedOperationDeserializer::deserialize(
"SupportedOperation",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SupportedPlatform {
pub name: Option<String>,
}
struct SupportedPlatformDeserializer;
impl SupportedPlatformDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SupportedPlatform, XmlParseError> {
deserialize_elements::<_, SupportedPlatform, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SupportedPlatformsListDeserializer;
impl SupportedPlatformsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SupportedPlatform>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SupportedPlatform" {
obj.push(SupportedPlatformDeserializer::deserialize(
"SupportedPlatform",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TStampDeserializer;
impl TStampDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_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 TableRestoreStatus {
pub cluster_identifier: Option<String>,
pub message: Option<String>,
pub new_table_name: Option<String>,
pub progress_in_mega_bytes: Option<i64>,
pub request_time: Option<String>,
pub snapshot_identifier: Option<String>,
pub source_database_name: Option<String>,
pub source_schema_name: Option<String>,
pub source_table_name: Option<String>,
pub status: Option<String>,
pub table_restore_request_id: Option<String>,
pub target_database_name: Option<String>,
pub target_schema_name: Option<String>,
pub total_data_in_mega_bytes: Option<i64>,
}
struct TableRestoreStatusDeserializer;
impl TableRestoreStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TableRestoreStatus, XmlParseError> {
deserialize_elements::<_, TableRestoreStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"ClusterIdentifier" => {
obj.cluster_identifier =
Some(StringDeserializer::deserialize("ClusterIdentifier", stack)?);
}
"Message" => {
obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
}
"NewTableName" => {
obj.new_table_name =
Some(StringDeserializer::deserialize("NewTableName", stack)?);
}
"ProgressInMegaBytes" => {
obj.progress_in_mega_bytes = Some(LongOptionalDeserializer::deserialize(
"ProgressInMegaBytes",
stack,
)?);
}
"RequestTime" => {
obj.request_time = Some(TStampDeserializer::deserialize("RequestTime", stack)?);
}
"SnapshotIdentifier" => {
obj.snapshot_identifier = Some(StringDeserializer::deserialize(
"SnapshotIdentifier",
stack,
)?);
}
"SourceDatabaseName" => {
obj.source_database_name = Some(StringDeserializer::deserialize(
"SourceDatabaseName",
stack,
)?);
}
"SourceSchemaName" => {
obj.source_schema_name =
Some(StringDeserializer::deserialize("SourceSchemaName", stack)?);
}
"SourceTableName" => {
obj.source_table_name =
Some(StringDeserializer::deserialize("SourceTableName", stack)?);
}
"Status" => {
obj.status = Some(TableRestoreStatusTypeDeserializer::deserialize(
"Status", stack,
)?);
}
"TableRestoreRequestId" => {
obj.table_restore_request_id = Some(StringDeserializer::deserialize(
"TableRestoreRequestId",
stack,
)?);
}
"TargetDatabaseName" => {
obj.target_database_name = Some(StringDeserializer::deserialize(
"TargetDatabaseName",
stack,
)?);
}
"TargetSchemaName" => {
obj.target_schema_name =
Some(StringDeserializer::deserialize("TargetSchemaName", stack)?);
}
"TotalDataInMegaBytes" => {
obj.total_data_in_mega_bytes = Some(LongOptionalDeserializer::deserialize(
"TotalDataInMegaBytes",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TableRestoreStatusListDeserializer;
impl TableRestoreStatusListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TableRestoreStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "TableRestoreStatus" {
obj.push(TableRestoreStatusDeserializer::deserialize(
"TableRestoreStatus",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TableRestoreStatusMessage {
pub marker: Option<String>,
pub table_restore_status_details: Option<Vec<TableRestoreStatus>>,
}
struct TableRestoreStatusMessageDeserializer;
impl TableRestoreStatusMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TableRestoreStatusMessage, XmlParseError> {
deserialize_elements::<_, TableRestoreStatusMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"TableRestoreStatusDetails" => {
obj.table_restore_status_details
.get_or_insert(vec![])
.extend(TableRestoreStatusListDeserializer::deserialize(
"TableRestoreStatusDetails",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct TableRestoreStatusTypeDeserializer;
impl TableRestoreStatusTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_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 Tag {
pub key: Option<String>,
pub value: Option<String>,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = Some(StringDeserializer::deserialize("Key", stack)?);
}
"Value" => {
obj.value = Some(StringDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TagSerializer;
impl TagSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Tag) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.key {
params.put(&format!("{}{}", prefix, "Key"), &field_value);
}
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
struct TagKeyListSerializer;
impl TagKeyListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct TagListDeserializer;
impl TagListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Tag>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Tag" {
obj.push(TagDeserializer::deserialize("Tag", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TagListSerializer;
impl TagListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TagSerializer::serialize(params, &key, obj);
}
}
}
struct TagValueListSerializer;
impl TagValueListSerializer {
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 TaggedResource {
pub resource_name: Option<String>,
pub resource_type: Option<String>,
pub tag: Option<Tag>,
}
struct TaggedResourceDeserializer;
impl TaggedResourceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TaggedResource, XmlParseError> {
deserialize_elements::<_, TaggedResource, _>(tag_name, stack, |name, stack, obj| {
match name {
"ResourceName" => {
obj.resource_name =
Some(StringDeserializer::deserialize("ResourceName", stack)?);
}
"ResourceType" => {
obj.resource_type =
Some(StringDeserializer::deserialize("ResourceType", stack)?);
}
"Tag" => {
obj.tag = Some(TagDeserializer::deserialize("Tag", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TaggedResourceListDeserializer;
impl TaggedResourceListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TaggedResource>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "TaggedResource" {
obj.push(TaggedResourceDeserializer::deserialize(
"TaggedResource",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TaggedResourceListMessage {
pub marker: Option<String>,
pub tagged_resources: Option<Vec<TaggedResource>>,
}
struct TaggedResourceListMessageDeserializer;
impl TaggedResourceListMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TaggedResourceListMessage, XmlParseError> {
deserialize_elements::<_, TaggedResourceListMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"TaggedResources" => {
obj.tagged_resources.get_or_insert(vec![]).extend(
TaggedResourceListDeserializer::deserialize("TaggedResources", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct TrackListDeserializer;
impl TrackListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<MaintenanceTrack>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "MaintenanceTrack" {
obj.push(MaintenanceTrackDeserializer::deserialize(
"MaintenanceTrack",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TrackListMessage {
pub maintenance_tracks: Option<Vec<MaintenanceTrack>>,
pub marker: Option<String>,
}
struct TrackListMessageDeserializer;
impl TrackListMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TrackListMessage, XmlParseError> {
deserialize_elements::<_, TrackListMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"MaintenanceTracks" => {
obj.maintenance_tracks.get_or_insert(vec![]).extend(
TrackListDeserializer::deserialize("MaintenanceTracks", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTarget {
pub database_version: Option<String>,
pub maintenance_track_name: Option<String>,
pub supported_operations: Option<Vec<SupportedOperation>>,
}
struct UpdateTargetDeserializer;
impl UpdateTargetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateTarget, XmlParseError> {
deserialize_elements::<_, UpdateTarget, _>(tag_name, stack, |name, stack, obj| {
match name {
"DatabaseVersion" => {
obj.database_version =
Some(StringDeserializer::deserialize("DatabaseVersion", stack)?);
}
"MaintenanceTrackName" => {
obj.maintenance_track_name = Some(StringDeserializer::deserialize(
"MaintenanceTrackName",
stack,
)?);
}
"SupportedOperations" => {
obj.supported_operations.get_or_insert(vec![]).extend(
SupportedOperationListDeserializer::deserialize(
"SupportedOperations",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct VpcSecurityGroupIdListSerializer;
impl VpcSecurityGroupIdListSerializer {
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 VpcSecurityGroupMembership {
pub status: Option<String>,
pub vpc_security_group_id: Option<String>,
}
struct VpcSecurityGroupMembershipDeserializer;
impl VpcSecurityGroupMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<VpcSecurityGroupMembership, XmlParseError> {
deserialize_elements::<_, VpcSecurityGroupMembership, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"VpcSecurityGroupId" => {
obj.vpc_security_group_id = Some(StringDeserializer::deserialize(
"VpcSecurityGroupId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct VpcSecurityGroupMembershipListDeserializer;
impl VpcSecurityGroupMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<VpcSecurityGroupMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "VpcSecurityGroup" {
obj.push(VpcSecurityGroupMembershipDeserializer::deserialize(
"VpcSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Debug, PartialEq)]
pub enum AcceptReservedNodeExchangeError {
DependentServiceUnavailableFault(String),
InvalidReservedNodeStateFault(String),
ReservedNodeAlreadyExistsFault(String),
ReservedNodeAlreadyMigratedFault(String),
ReservedNodeNotFoundFault(String),
ReservedNodeOfferingNotFoundFault(String),
UnsupportedOperationFault(String),
}
impl AcceptReservedNodeExchangeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AcceptReservedNodeExchangeError> {
{
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[..] {
"DependentServiceUnavailableFault" => {
return RusotoError::Service(
AcceptReservedNodeExchangeError::DependentServiceUnavailableFault(
parsed_error.message,
),
)
}
"InvalidReservedNodeState" => {
return RusotoError::Service(
AcceptReservedNodeExchangeError::InvalidReservedNodeStateFault(
parsed_error.message,
),
)
}
"ReservedNodeAlreadyExists" => {
return RusotoError::Service(
AcceptReservedNodeExchangeError::ReservedNodeAlreadyExistsFault(
parsed_error.message,
),
)
}
"ReservedNodeAlreadyMigrated" => {
return RusotoError::Service(
AcceptReservedNodeExchangeError::ReservedNodeAlreadyMigratedFault(
parsed_error.message,
),
)
}
"ReservedNodeNotFound" => {
return RusotoError::Service(
AcceptReservedNodeExchangeError::ReservedNodeNotFoundFault(
parsed_error.message,
),
)
}
"ReservedNodeOfferingNotFound" => {
return RusotoError::Service(
AcceptReservedNodeExchangeError::ReservedNodeOfferingNotFoundFault(
parsed_error.message,
),
)
}
"UnsupportedOperation" => {
return RusotoError::Service(
AcceptReservedNodeExchangeError::UnsupportedOperationFault(
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 AcceptReservedNodeExchangeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AcceptReservedNodeExchangeError {
fn description(&self) -> &str {
match *self {
AcceptReservedNodeExchangeError::DependentServiceUnavailableFault(ref cause) => cause,
AcceptReservedNodeExchangeError::InvalidReservedNodeStateFault(ref cause) => cause,
AcceptReservedNodeExchangeError::ReservedNodeAlreadyExistsFault(ref cause) => cause,
AcceptReservedNodeExchangeError::ReservedNodeAlreadyMigratedFault(ref cause) => cause,
AcceptReservedNodeExchangeError::ReservedNodeNotFoundFault(ref cause) => cause,
AcceptReservedNodeExchangeError::ReservedNodeOfferingNotFoundFault(ref cause) => cause,
AcceptReservedNodeExchangeError::UnsupportedOperationFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AuthorizeClusterSecurityGroupIngressError {
AuthorizationAlreadyExistsFault(String),
AuthorizationQuotaExceededFault(String),
ClusterSecurityGroupNotFoundFault(String),
InvalidClusterSecurityGroupStateFault(String),
}
impl AuthorizeClusterSecurityGroupIngressError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AuthorizeClusterSecurityGroupIngressError> {
{
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[..] {
"AuthorizationAlreadyExists" => return RusotoError::Service(AuthorizeClusterSecurityGroupIngressError::AuthorizationAlreadyExistsFault(parsed_error.message)),"AuthorizationQuotaExceeded" => return RusotoError::Service(AuthorizeClusterSecurityGroupIngressError::AuthorizationQuotaExceededFault(parsed_error.message)),"ClusterSecurityGroupNotFound" => return RusotoError::Service(AuthorizeClusterSecurityGroupIngressError::ClusterSecurityGroupNotFoundFault(parsed_error.message)),"InvalidClusterSecurityGroupState" => return RusotoError::Service(AuthorizeClusterSecurityGroupIngressError::InvalidClusterSecurityGroupStateFault(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 AuthorizeClusterSecurityGroupIngressError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AuthorizeClusterSecurityGroupIngressError {
fn description(&self) -> &str {
match *self {
AuthorizeClusterSecurityGroupIngressError::AuthorizationAlreadyExistsFault(
ref cause,
) => cause,
AuthorizeClusterSecurityGroupIngressError::AuthorizationQuotaExceededFault(
ref cause,
) => cause,
AuthorizeClusterSecurityGroupIngressError::ClusterSecurityGroupNotFoundFault(
ref cause,
) => cause,
AuthorizeClusterSecurityGroupIngressError::InvalidClusterSecurityGroupStateFault(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AuthorizeSnapshotAccessError {
AuthorizationAlreadyExistsFault(String),
AuthorizationQuotaExceededFault(String),
ClusterSnapshotNotFoundFault(String),
DependentServiceRequestThrottlingFault(String),
InvalidClusterSnapshotStateFault(String),
LimitExceededFault(String),
}
impl AuthorizeSnapshotAccessError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AuthorizeSnapshotAccessError> {
{
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[..] {
"AuthorizationAlreadyExists" => {
return RusotoError::Service(
AuthorizeSnapshotAccessError::AuthorizationAlreadyExistsFault(
parsed_error.message,
),
)
}
"AuthorizationQuotaExceeded" => {
return RusotoError::Service(
AuthorizeSnapshotAccessError::AuthorizationQuotaExceededFault(
parsed_error.message,
),
)
}
"ClusterSnapshotNotFound" => {
return RusotoError::Service(
AuthorizeSnapshotAccessError::ClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
AuthorizeSnapshotAccessError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"InvalidClusterSnapshotState" => {
return RusotoError::Service(
AuthorizeSnapshotAccessError::InvalidClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"LimitExceededFault" => {
return RusotoError::Service(
AuthorizeSnapshotAccessError::LimitExceededFault(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 AuthorizeSnapshotAccessError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AuthorizeSnapshotAccessError {
fn description(&self) -> &str {
match *self {
AuthorizeSnapshotAccessError::AuthorizationAlreadyExistsFault(ref cause) => cause,
AuthorizeSnapshotAccessError::AuthorizationQuotaExceededFault(ref cause) => cause,
AuthorizeSnapshotAccessError::ClusterSnapshotNotFoundFault(ref cause) => cause,
AuthorizeSnapshotAccessError::DependentServiceRequestThrottlingFault(ref cause) => {
cause
}
AuthorizeSnapshotAccessError::InvalidClusterSnapshotStateFault(ref cause) => cause,
AuthorizeSnapshotAccessError::LimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum BatchDeleteClusterSnapshotsError {
BatchDeleteRequestSizeExceededFault(String),
}
impl BatchDeleteClusterSnapshotsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<BatchDeleteClusterSnapshotsError> {
{
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[..] {
"BatchDeleteRequestSizeExceeded" => {
return RusotoError::Service(
BatchDeleteClusterSnapshotsError::BatchDeleteRequestSizeExceededFault(
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 BatchDeleteClusterSnapshotsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchDeleteClusterSnapshotsError {
fn description(&self) -> &str {
match *self {
BatchDeleteClusterSnapshotsError::BatchDeleteRequestSizeExceededFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum BatchModifyClusterSnapshotsError {
BatchModifyClusterSnapshotsLimitExceededFault(String),
InvalidRetentionPeriodFault(String),
}
impl BatchModifyClusterSnapshotsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<BatchModifyClusterSnapshotsError> {
{
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[..] {
"BatchModifyClusterSnapshotsLimitExceededFault" => return RusotoError::Service(BatchModifyClusterSnapshotsError::BatchModifyClusterSnapshotsLimitExceededFault(parsed_error.message)),"InvalidRetentionPeriodFault" => return RusotoError::Service(BatchModifyClusterSnapshotsError::InvalidRetentionPeriodFault(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 BatchModifyClusterSnapshotsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchModifyClusterSnapshotsError {
fn description(&self) -> &str {
match *self {
BatchModifyClusterSnapshotsError::BatchModifyClusterSnapshotsLimitExceededFault(
ref cause,
) => cause,
BatchModifyClusterSnapshotsError::InvalidRetentionPeriodFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelResizeError {
ClusterNotFoundFault(String),
InvalidClusterStateFault(String),
ResizeNotFoundFault(String),
UnsupportedOperationFault(String),
}
impl CancelResizeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelResizeError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(CancelResizeError::ClusterNotFoundFault(
parsed_error.message,
))
}
"InvalidClusterState" => {
return RusotoError::Service(CancelResizeError::InvalidClusterStateFault(
parsed_error.message,
))
}
"ResizeNotFound" => {
return RusotoError::Service(CancelResizeError::ResizeNotFoundFault(
parsed_error.message,
))
}
"UnsupportedOperation" => {
return RusotoError::Service(CancelResizeError::UnsupportedOperationFault(
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 CancelResizeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelResizeError {
fn description(&self) -> &str {
match *self {
CancelResizeError::ClusterNotFoundFault(ref cause) => cause,
CancelResizeError::InvalidClusterStateFault(ref cause) => cause,
CancelResizeError::ResizeNotFoundFault(ref cause) => cause,
CancelResizeError::UnsupportedOperationFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyClusterSnapshotError {
ClusterSnapshotAlreadyExistsFault(String),
ClusterSnapshotNotFoundFault(String),
ClusterSnapshotQuotaExceededFault(String),
InvalidClusterSnapshotStateFault(String),
InvalidRetentionPeriodFault(String),
}
impl CopyClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyClusterSnapshotError> {
{
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[..] {
"ClusterSnapshotAlreadyExists" => {
return RusotoError::Service(
CopyClusterSnapshotError::ClusterSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"ClusterSnapshotNotFound" => {
return RusotoError::Service(
CopyClusterSnapshotError::ClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSnapshotQuotaExceeded" => {
return RusotoError::Service(
CopyClusterSnapshotError::ClusterSnapshotQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidClusterSnapshotState" => {
return RusotoError::Service(
CopyClusterSnapshotError::InvalidClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
CopyClusterSnapshotError::InvalidRetentionPeriodFault(
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 CopyClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyClusterSnapshotError {
fn description(&self) -> &str {
match *self {
CopyClusterSnapshotError::ClusterSnapshotAlreadyExistsFault(ref cause) => cause,
CopyClusterSnapshotError::ClusterSnapshotNotFoundFault(ref cause) => cause,
CopyClusterSnapshotError::ClusterSnapshotQuotaExceededFault(ref cause) => cause,
CopyClusterSnapshotError::InvalidClusterSnapshotStateFault(ref cause) => cause,
CopyClusterSnapshotError::InvalidRetentionPeriodFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateClusterError {
ClusterAlreadyExistsFault(String),
ClusterParameterGroupNotFoundFault(String),
ClusterQuotaExceededFault(String),
ClusterSecurityGroupNotFoundFault(String),
ClusterSubnetGroupNotFoundFault(String),
DependentServiceRequestThrottlingFault(String),
HsmClientCertificateNotFoundFault(String),
HsmConfigurationNotFoundFault(String),
InsufficientClusterCapacityFault(String),
InvalidClusterSubnetGroupStateFault(String),
InvalidClusterTrackFault(String),
InvalidElasticIpFault(String),
InvalidRetentionPeriodFault(String),
InvalidSubnet(String),
InvalidTagFault(String),
InvalidVPCNetworkStateFault(String),
LimitExceededFault(String),
NumberOfNodesPerClusterLimitExceededFault(String),
NumberOfNodesQuotaExceededFault(String),
SnapshotScheduleNotFoundFault(String),
TagLimitExceededFault(String),
UnauthorizedOperation(String),
}
impl CreateClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateClusterError> {
{
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[..] {
"ClusterAlreadyExists" => {
return RusotoError::Service(CreateClusterError::ClusterAlreadyExistsFault(
parsed_error.message,
))
}
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
CreateClusterError::ClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"ClusterQuotaExceeded" => {
return RusotoError::Service(CreateClusterError::ClusterQuotaExceededFault(
parsed_error.message,
))
}
"ClusterSecurityGroupNotFound" => {
return RusotoError::Service(
CreateClusterError::ClusterSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSubnetGroupNotFoundFault" => {
return RusotoError::Service(
CreateClusterError::ClusterSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
CreateClusterError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"HsmClientCertificateNotFoundFault" => {
return RusotoError::Service(
CreateClusterError::HsmClientCertificateNotFoundFault(
parsed_error.message,
),
)
}
"HsmConfigurationNotFoundFault" => {
return RusotoError::Service(
CreateClusterError::HsmConfigurationNotFoundFault(parsed_error.message),
)
}
"InsufficientClusterCapacity" => {
return RusotoError::Service(
CreateClusterError::InsufficientClusterCapacityFault(
parsed_error.message,
),
)
}
"InvalidClusterSubnetGroupStateFault" => {
return RusotoError::Service(
CreateClusterError::InvalidClusterSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidClusterTrack" => {
return RusotoError::Service(CreateClusterError::InvalidClusterTrackFault(
parsed_error.message,
))
}
"InvalidElasticIpFault" => {
return RusotoError::Service(CreateClusterError::InvalidElasticIpFault(
parsed_error.message,
))
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
CreateClusterError::InvalidRetentionPeriodFault(parsed_error.message),
)
}
"InvalidSubnet" => {
return RusotoError::Service(CreateClusterError::InvalidSubnet(
parsed_error.message,
))
}
"InvalidTagFault" => {
return RusotoError::Service(CreateClusterError::InvalidTagFault(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
CreateClusterError::InvalidVPCNetworkStateFault(parsed_error.message),
)
}
"LimitExceededFault" => {
return RusotoError::Service(CreateClusterError::LimitExceededFault(
parsed_error.message,
))
}
"NumberOfNodesPerClusterLimitExceeded" => {
return RusotoError::Service(
CreateClusterError::NumberOfNodesPerClusterLimitExceededFault(
parsed_error.message,
),
)
}
"NumberOfNodesQuotaExceeded" => {
return RusotoError::Service(
CreateClusterError::NumberOfNodesQuotaExceededFault(
parsed_error.message,
),
)
}
"SnapshotScheduleNotFound" => {
return RusotoError::Service(
CreateClusterError::SnapshotScheduleNotFoundFault(parsed_error.message),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(CreateClusterError::TagLimitExceededFault(
parsed_error.message,
))
}
"UnauthorizedOperation" => {
return RusotoError::Service(CreateClusterError::UnauthorizedOperation(
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 CreateClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateClusterError {
fn description(&self) -> &str {
match *self {
CreateClusterError::ClusterAlreadyExistsFault(ref cause) => cause,
CreateClusterError::ClusterParameterGroupNotFoundFault(ref cause) => cause,
CreateClusterError::ClusterQuotaExceededFault(ref cause) => cause,
CreateClusterError::ClusterSecurityGroupNotFoundFault(ref cause) => cause,
CreateClusterError::ClusterSubnetGroupNotFoundFault(ref cause) => cause,
CreateClusterError::DependentServiceRequestThrottlingFault(ref cause) => cause,
CreateClusterError::HsmClientCertificateNotFoundFault(ref cause) => cause,
CreateClusterError::HsmConfigurationNotFoundFault(ref cause) => cause,
CreateClusterError::InsufficientClusterCapacityFault(ref cause) => cause,
CreateClusterError::InvalidClusterSubnetGroupStateFault(ref cause) => cause,
CreateClusterError::InvalidClusterTrackFault(ref cause) => cause,
CreateClusterError::InvalidElasticIpFault(ref cause) => cause,
CreateClusterError::InvalidRetentionPeriodFault(ref cause) => cause,
CreateClusterError::InvalidSubnet(ref cause) => cause,
CreateClusterError::InvalidTagFault(ref cause) => cause,
CreateClusterError::InvalidVPCNetworkStateFault(ref cause) => cause,
CreateClusterError::LimitExceededFault(ref cause) => cause,
CreateClusterError::NumberOfNodesPerClusterLimitExceededFault(ref cause) => cause,
CreateClusterError::NumberOfNodesQuotaExceededFault(ref cause) => cause,
CreateClusterError::SnapshotScheduleNotFoundFault(ref cause) => cause,
CreateClusterError::TagLimitExceededFault(ref cause) => cause,
CreateClusterError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateClusterParameterGroupError {
ClusterParameterGroupAlreadyExistsFault(String),
ClusterParameterGroupQuotaExceededFault(String),
InvalidTagFault(String),
TagLimitExceededFault(String),
}
impl CreateClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateClusterParameterGroupError> {
{
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[..] {
"ClusterParameterGroupAlreadyExists" => return RusotoError::Service(
CreateClusterParameterGroupError::ClusterParameterGroupAlreadyExistsFault(
parsed_error.message,
),
),
"ClusterParameterGroupQuotaExceeded" => return RusotoError::Service(
CreateClusterParameterGroupError::ClusterParameterGroupQuotaExceededFault(
parsed_error.message,
),
),
"InvalidTagFault" => {
return RusotoError::Service(
CreateClusterParameterGroupError::InvalidTagFault(parsed_error.message),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateClusterParameterGroupError::TagLimitExceededFault(
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 CreateClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
CreateClusterParameterGroupError::ClusterParameterGroupAlreadyExistsFault(
ref cause,
) => cause,
CreateClusterParameterGroupError::ClusterParameterGroupQuotaExceededFault(
ref cause,
) => cause,
CreateClusterParameterGroupError::InvalidTagFault(ref cause) => cause,
CreateClusterParameterGroupError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateClusterSecurityGroupError {
ClusterSecurityGroupAlreadyExistsFault(String),
ClusterSecurityGroupQuotaExceededFault(String),
InvalidTagFault(String),
TagLimitExceededFault(String),
}
impl CreateClusterSecurityGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateClusterSecurityGroupError> {
{
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[..] {
"ClusterSecurityGroupAlreadyExists" => {
return RusotoError::Service(
CreateClusterSecurityGroupError::ClusterSecurityGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"QuotaExceeded.ClusterSecurityGroup" => {
return RusotoError::Service(
CreateClusterSecurityGroupError::ClusterSecurityGroupQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
CreateClusterSecurityGroupError::InvalidTagFault(parsed_error.message),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateClusterSecurityGroupError::TagLimitExceededFault(
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 CreateClusterSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateClusterSecurityGroupError {
fn description(&self) -> &str {
match *self {
CreateClusterSecurityGroupError::ClusterSecurityGroupAlreadyExistsFault(ref cause) => {
cause
}
CreateClusterSecurityGroupError::ClusterSecurityGroupQuotaExceededFault(ref cause) => {
cause
}
CreateClusterSecurityGroupError::InvalidTagFault(ref cause) => cause,
CreateClusterSecurityGroupError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateClusterSnapshotError {
ClusterNotFoundFault(String),
ClusterSnapshotAlreadyExistsFault(String),
ClusterSnapshotQuotaExceededFault(String),
InvalidClusterStateFault(String),
InvalidRetentionPeriodFault(String),
InvalidTagFault(String),
TagLimitExceededFault(String),
}
impl CreateClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateClusterSnapshotError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
CreateClusterSnapshotError::ClusterNotFoundFault(parsed_error.message),
)
}
"ClusterSnapshotAlreadyExists" => {
return RusotoError::Service(
CreateClusterSnapshotError::ClusterSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"ClusterSnapshotQuotaExceeded" => {
return RusotoError::Service(
CreateClusterSnapshotError::ClusterSnapshotQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
CreateClusterSnapshotError::InvalidClusterStateFault(
parsed_error.message,
),
)
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
CreateClusterSnapshotError::InvalidRetentionPeriodFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(CreateClusterSnapshotError::InvalidTagFault(
parsed_error.message,
))
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateClusterSnapshotError::TagLimitExceededFault(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 CreateClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateClusterSnapshotError {
fn description(&self) -> &str {
match *self {
CreateClusterSnapshotError::ClusterNotFoundFault(ref cause) => cause,
CreateClusterSnapshotError::ClusterSnapshotAlreadyExistsFault(ref cause) => cause,
CreateClusterSnapshotError::ClusterSnapshotQuotaExceededFault(ref cause) => cause,
CreateClusterSnapshotError::InvalidClusterStateFault(ref cause) => cause,
CreateClusterSnapshotError::InvalidRetentionPeriodFault(ref cause) => cause,
CreateClusterSnapshotError::InvalidTagFault(ref cause) => cause,
CreateClusterSnapshotError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateClusterSubnetGroupError {
ClusterSubnetGroupAlreadyExistsFault(String),
ClusterSubnetGroupQuotaExceededFault(String),
ClusterSubnetQuotaExceededFault(String),
DependentServiceRequestThrottlingFault(String),
InvalidSubnet(String),
InvalidTagFault(String),
TagLimitExceededFault(String),
UnauthorizedOperation(String),
}
impl CreateClusterSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateClusterSubnetGroupError> {
{
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[..] {
"ClusterSubnetGroupAlreadyExists" => {
return RusotoError::Service(
CreateClusterSubnetGroupError::ClusterSubnetGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"ClusterSubnetGroupQuotaExceeded" => {
return RusotoError::Service(
CreateClusterSubnetGroupError::ClusterSubnetGroupQuotaExceededFault(
parsed_error.message,
),
)
}
"ClusterSubnetQuotaExceededFault" => {
return RusotoError::Service(
CreateClusterSubnetGroupError::ClusterSubnetQuotaExceededFault(
parsed_error.message,
),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
CreateClusterSubnetGroupError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(CreateClusterSubnetGroupError::InvalidSubnet(
parsed_error.message,
))
}
"InvalidTagFault" => {
return RusotoError::Service(
CreateClusterSubnetGroupError::InvalidTagFault(parsed_error.message),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateClusterSubnetGroupError::TagLimitExceededFault(
parsed_error.message,
),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(
CreateClusterSubnetGroupError::UnauthorizedOperation(
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 CreateClusterSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateClusterSubnetGroupError {
fn description(&self) -> &str {
match *self {
CreateClusterSubnetGroupError::ClusterSubnetGroupAlreadyExistsFault(ref cause) => cause,
CreateClusterSubnetGroupError::ClusterSubnetGroupQuotaExceededFault(ref cause) => cause,
CreateClusterSubnetGroupError::ClusterSubnetQuotaExceededFault(ref cause) => cause,
CreateClusterSubnetGroupError::DependentServiceRequestThrottlingFault(ref cause) => {
cause
}
CreateClusterSubnetGroupError::InvalidSubnet(ref cause) => cause,
CreateClusterSubnetGroupError::InvalidTagFault(ref cause) => cause,
CreateClusterSubnetGroupError::TagLimitExceededFault(ref cause) => cause,
CreateClusterSubnetGroupError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateEventSubscriptionError {
EventSubscriptionQuotaExceededFault(String),
InvalidTagFault(String),
SNSInvalidTopicFault(String),
SNSNoAuthorizationFault(String),
SNSTopicArnNotFoundFault(String),
SourceNotFoundFault(String),
SubscriptionAlreadyExistFault(String),
SubscriptionCategoryNotFoundFault(String),
SubscriptionEventIdNotFoundFault(String),
SubscriptionSeverityNotFoundFault(String),
TagLimitExceededFault(String),
}
impl CreateEventSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateEventSubscriptionError> {
{
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[..] {
"EventSubscriptionQuotaExceeded" => {
return RusotoError::Service(
CreateEventSubscriptionError::EventSubscriptionQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(CreateEventSubscriptionError::InvalidTagFault(
parsed_error.message,
))
}
"SNSInvalidTopic" => {
return RusotoError::Service(
CreateEventSubscriptionError::SNSInvalidTopicFault(
parsed_error.message,
),
)
}
"SNSNoAuthorization" => {
return RusotoError::Service(
CreateEventSubscriptionError::SNSNoAuthorizationFault(
parsed_error.message,
),
)
}
"SNSTopicArnNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SNSTopicArnNotFoundFault(
parsed_error.message,
),
)
}
"SourceNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SourceNotFoundFault(parsed_error.message),
)
}
"SubscriptionAlreadyExist" => {
return RusotoError::Service(
CreateEventSubscriptionError::SubscriptionAlreadyExistFault(
parsed_error.message,
),
)
}
"SubscriptionCategoryNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SubscriptionCategoryNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionEventIdNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SubscriptionEventIdNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionSeverityNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SubscriptionSeverityNotFoundFault(
parsed_error.message,
),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateEventSubscriptionError::TagLimitExceededFault(
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 CreateEventSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateEventSubscriptionError {
fn description(&self) -> &str {
match *self {
CreateEventSubscriptionError::EventSubscriptionQuotaExceededFault(ref cause) => cause,
CreateEventSubscriptionError::InvalidTagFault(ref cause) => cause,
CreateEventSubscriptionError::SNSInvalidTopicFault(ref cause) => cause,
CreateEventSubscriptionError::SNSNoAuthorizationFault(ref cause) => cause,
CreateEventSubscriptionError::SNSTopicArnNotFoundFault(ref cause) => cause,
CreateEventSubscriptionError::SourceNotFoundFault(ref cause) => cause,
CreateEventSubscriptionError::SubscriptionAlreadyExistFault(ref cause) => cause,
CreateEventSubscriptionError::SubscriptionCategoryNotFoundFault(ref cause) => cause,
CreateEventSubscriptionError::SubscriptionEventIdNotFoundFault(ref cause) => cause,
CreateEventSubscriptionError::SubscriptionSeverityNotFoundFault(ref cause) => cause,
CreateEventSubscriptionError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateHsmClientCertificateError {
HsmClientCertificateAlreadyExistsFault(String),
HsmClientCertificateQuotaExceededFault(String),
InvalidTagFault(String),
TagLimitExceededFault(String),
}
impl CreateHsmClientCertificateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateHsmClientCertificateError> {
{
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[..] {
"HsmClientCertificateAlreadyExistsFault" => {
return RusotoError::Service(
CreateHsmClientCertificateError::HsmClientCertificateAlreadyExistsFault(
parsed_error.message,
),
)
}
"HsmClientCertificateQuotaExceededFault" => {
return RusotoError::Service(
CreateHsmClientCertificateError::HsmClientCertificateQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
CreateHsmClientCertificateError::InvalidTagFault(parsed_error.message),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateHsmClientCertificateError::TagLimitExceededFault(
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 CreateHsmClientCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateHsmClientCertificateError {
fn description(&self) -> &str {
match *self {
CreateHsmClientCertificateError::HsmClientCertificateAlreadyExistsFault(ref cause) => {
cause
}
CreateHsmClientCertificateError::HsmClientCertificateQuotaExceededFault(ref cause) => {
cause
}
CreateHsmClientCertificateError::InvalidTagFault(ref cause) => cause,
CreateHsmClientCertificateError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateHsmConfigurationError {
HsmConfigurationAlreadyExistsFault(String),
HsmConfigurationQuotaExceededFault(String),
InvalidTagFault(String),
TagLimitExceededFault(String),
}
impl CreateHsmConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateHsmConfigurationError> {
{
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[..] {
"HsmConfigurationAlreadyExistsFault" => {
return RusotoError::Service(
CreateHsmConfigurationError::HsmConfigurationAlreadyExistsFault(
parsed_error.message,
),
)
}
"HsmConfigurationQuotaExceededFault" => {
return RusotoError::Service(
CreateHsmConfigurationError::HsmConfigurationQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(CreateHsmConfigurationError::InvalidTagFault(
parsed_error.message,
))
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateHsmConfigurationError::TagLimitExceededFault(
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 CreateHsmConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateHsmConfigurationError {
fn description(&self) -> &str {
match *self {
CreateHsmConfigurationError::HsmConfigurationAlreadyExistsFault(ref cause) => cause,
CreateHsmConfigurationError::HsmConfigurationQuotaExceededFault(ref cause) => cause,
CreateHsmConfigurationError::InvalidTagFault(ref cause) => cause,
CreateHsmConfigurationError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSnapshotCopyGrantError {
DependentServiceRequestThrottlingFault(String),
InvalidTagFault(String),
LimitExceededFault(String),
SnapshotCopyGrantAlreadyExistsFault(String),
SnapshotCopyGrantQuotaExceededFault(String),
TagLimitExceededFault(String),
}
impl CreateSnapshotCopyGrantError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSnapshotCopyGrantError> {
{
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[..] {
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
CreateSnapshotCopyGrantError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(CreateSnapshotCopyGrantError::InvalidTagFault(
parsed_error.message,
))
}
"LimitExceededFault" => {
return RusotoError::Service(
CreateSnapshotCopyGrantError::LimitExceededFault(parsed_error.message),
)
}
"SnapshotCopyGrantAlreadyExistsFault" => {
return RusotoError::Service(
CreateSnapshotCopyGrantError::SnapshotCopyGrantAlreadyExistsFault(
parsed_error.message,
),
)
}
"SnapshotCopyGrantQuotaExceededFault" => {
return RusotoError::Service(
CreateSnapshotCopyGrantError::SnapshotCopyGrantQuotaExceededFault(
parsed_error.message,
),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateSnapshotCopyGrantError::TagLimitExceededFault(
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 CreateSnapshotCopyGrantError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSnapshotCopyGrantError {
fn description(&self) -> &str {
match *self {
CreateSnapshotCopyGrantError::DependentServiceRequestThrottlingFault(ref cause) => {
cause
}
CreateSnapshotCopyGrantError::InvalidTagFault(ref cause) => cause,
CreateSnapshotCopyGrantError::LimitExceededFault(ref cause) => cause,
CreateSnapshotCopyGrantError::SnapshotCopyGrantAlreadyExistsFault(ref cause) => cause,
CreateSnapshotCopyGrantError::SnapshotCopyGrantQuotaExceededFault(ref cause) => cause,
CreateSnapshotCopyGrantError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSnapshotScheduleError {
InvalidScheduleFault(String),
ScheduleDefinitionTypeUnsupportedFault(String),
SnapshotScheduleAlreadyExistsFault(String),
SnapshotScheduleQuotaExceededFault(String),
TagLimitExceededFault(String),
}
impl CreateSnapshotScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSnapshotScheduleError> {
{
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[..] {
"InvalidSchedule" => {
return RusotoError::Service(
CreateSnapshotScheduleError::InvalidScheduleFault(parsed_error.message),
)
}
"ScheduleDefinitionTypeUnsupported" => {
return RusotoError::Service(
CreateSnapshotScheduleError::ScheduleDefinitionTypeUnsupportedFault(
parsed_error.message,
),
)
}
"SnapshotScheduleAlreadyExists" => {
return RusotoError::Service(
CreateSnapshotScheduleError::SnapshotScheduleAlreadyExistsFault(
parsed_error.message,
),
)
}
"SnapshotScheduleQuotaExceeded" => {
return RusotoError::Service(
CreateSnapshotScheduleError::SnapshotScheduleQuotaExceededFault(
parsed_error.message,
),
)
}
"TagLimitExceededFault" => {
return RusotoError::Service(
CreateSnapshotScheduleError::TagLimitExceededFault(
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 CreateSnapshotScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSnapshotScheduleError {
fn description(&self) -> &str {
match *self {
CreateSnapshotScheduleError::InvalidScheduleFault(ref cause) => cause,
CreateSnapshotScheduleError::ScheduleDefinitionTypeUnsupportedFault(ref cause) => cause,
CreateSnapshotScheduleError::SnapshotScheduleAlreadyExistsFault(ref cause) => cause,
CreateSnapshotScheduleError::SnapshotScheduleQuotaExceededFault(ref cause) => cause,
CreateSnapshotScheduleError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTagsError {
InvalidTagFault(String),
ResourceNotFoundFault(String),
TagLimitExceededFault(String),
}
impl CreateTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTagsError> {
{
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[..] {
"InvalidTagFault" => {
return RusotoError::Service(CreateTagsError::InvalidTagFault(
parsed_error.message,
))
}
"ResourceNotFoundFault" => {
return RusotoError::Service(CreateTagsError::ResourceNotFoundFault(
parsed_error.message,
))
}
"TagLimitExceededFault" => {
return RusotoError::Service(CreateTagsError::TagLimitExceededFault(
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 CreateTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTagsError {
fn description(&self) -> &str {
match *self {
CreateTagsError::InvalidTagFault(ref cause) => cause,
CreateTagsError::ResourceNotFoundFault(ref cause) => cause,
CreateTagsError::TagLimitExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteClusterError {
ClusterNotFoundFault(String),
ClusterSnapshotAlreadyExistsFault(String),
ClusterSnapshotQuotaExceededFault(String),
InvalidClusterStateFault(String),
InvalidRetentionPeriodFault(String),
}
impl DeleteClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteClusterError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(DeleteClusterError::ClusterNotFoundFault(
parsed_error.message,
))
}
"ClusterSnapshotAlreadyExists" => {
return RusotoError::Service(
DeleteClusterError::ClusterSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"ClusterSnapshotQuotaExceeded" => {
return RusotoError::Service(
DeleteClusterError::ClusterSnapshotQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(DeleteClusterError::InvalidClusterStateFault(
parsed_error.message,
))
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
DeleteClusterError::InvalidRetentionPeriodFault(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 DeleteClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteClusterError {
fn description(&self) -> &str {
match *self {
DeleteClusterError::ClusterNotFoundFault(ref cause) => cause,
DeleteClusterError::ClusterSnapshotAlreadyExistsFault(ref cause) => cause,
DeleteClusterError::ClusterSnapshotQuotaExceededFault(ref cause) => cause,
DeleteClusterError::InvalidClusterStateFault(ref cause) => cause,
DeleteClusterError::InvalidRetentionPeriodFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteClusterParameterGroupError {
ClusterParameterGroupNotFoundFault(String),
InvalidClusterParameterGroupStateFault(String),
}
impl DeleteClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteClusterParameterGroupError> {
{
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[..] {
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
DeleteClusterParameterGroupError::ClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterParameterGroupState" => return RusotoError::Service(
DeleteClusterParameterGroupError::InvalidClusterParameterGroupStateFault(
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 DeleteClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
DeleteClusterParameterGroupError::ClusterParameterGroupNotFoundFault(ref cause) => {
cause
}
DeleteClusterParameterGroupError::InvalidClusterParameterGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteClusterSecurityGroupError {
ClusterSecurityGroupNotFoundFault(String),
InvalidClusterSecurityGroupStateFault(String),
}
impl DeleteClusterSecurityGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteClusterSecurityGroupError> {
{
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[..] {
"ClusterSecurityGroupNotFound" => {
return RusotoError::Service(
DeleteClusterSecurityGroupError::ClusterSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterSecurityGroupState" => {
return RusotoError::Service(
DeleteClusterSecurityGroupError::InvalidClusterSecurityGroupStateFault(
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 DeleteClusterSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteClusterSecurityGroupError {
fn description(&self) -> &str {
match *self {
DeleteClusterSecurityGroupError::ClusterSecurityGroupNotFoundFault(ref cause) => cause,
DeleteClusterSecurityGroupError::InvalidClusterSecurityGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteClusterSnapshotError {
ClusterSnapshotNotFoundFault(String),
InvalidClusterSnapshotStateFault(String),
}
impl DeleteClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteClusterSnapshotError> {
{
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[..] {
"ClusterSnapshotNotFound" => {
return RusotoError::Service(
DeleteClusterSnapshotError::ClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterSnapshotState" => {
return RusotoError::Service(
DeleteClusterSnapshotError::InvalidClusterSnapshotStateFault(
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 DeleteClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteClusterSnapshotError {
fn description(&self) -> &str {
match *self {
DeleteClusterSnapshotError::ClusterSnapshotNotFoundFault(ref cause) => cause,
DeleteClusterSnapshotError::InvalidClusterSnapshotStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteClusterSubnetGroupError {
ClusterSubnetGroupNotFoundFault(String),
InvalidClusterSubnetGroupStateFault(String),
InvalidClusterSubnetStateFault(String),
}
impl DeleteClusterSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteClusterSubnetGroupError> {
{
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[..] {
"ClusterSubnetGroupNotFoundFault" => {
return RusotoError::Service(
DeleteClusterSubnetGroupError::ClusterSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterSubnetGroupStateFault" => {
return RusotoError::Service(
DeleteClusterSubnetGroupError::InvalidClusterSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidClusterSubnetStateFault" => {
return RusotoError::Service(
DeleteClusterSubnetGroupError::InvalidClusterSubnetStateFault(
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 DeleteClusterSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteClusterSubnetGroupError {
fn description(&self) -> &str {
match *self {
DeleteClusterSubnetGroupError::ClusterSubnetGroupNotFoundFault(ref cause) => cause,
DeleteClusterSubnetGroupError::InvalidClusterSubnetGroupStateFault(ref cause) => cause,
DeleteClusterSubnetGroupError::InvalidClusterSubnetStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteEventSubscriptionError {
InvalidSubscriptionStateFault(String),
SubscriptionNotFoundFault(String),
}
impl DeleteEventSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteEventSubscriptionError> {
{
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[..] {
"InvalidSubscriptionStateFault" => {
return RusotoError::Service(
DeleteEventSubscriptionError::InvalidSubscriptionStateFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
DeleteEventSubscriptionError::SubscriptionNotFoundFault(
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 DeleteEventSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteEventSubscriptionError {
fn description(&self) -> &str {
match *self {
DeleteEventSubscriptionError::InvalidSubscriptionStateFault(ref cause) => cause,
DeleteEventSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteHsmClientCertificateError {
HsmClientCertificateNotFoundFault(String),
InvalidHsmClientCertificateStateFault(String),
}
impl DeleteHsmClientCertificateError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteHsmClientCertificateError> {
{
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[..] {
"HsmClientCertificateNotFoundFault" => {
return RusotoError::Service(
DeleteHsmClientCertificateError::HsmClientCertificateNotFoundFault(
parsed_error.message,
),
)
}
"InvalidHsmClientCertificateStateFault" => {
return RusotoError::Service(
DeleteHsmClientCertificateError::InvalidHsmClientCertificateStateFault(
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 DeleteHsmClientCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteHsmClientCertificateError {
fn description(&self) -> &str {
match *self {
DeleteHsmClientCertificateError::HsmClientCertificateNotFoundFault(ref cause) => cause,
DeleteHsmClientCertificateError::InvalidHsmClientCertificateStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteHsmConfigurationError {
HsmConfigurationNotFoundFault(String),
InvalidHsmConfigurationStateFault(String),
}
impl DeleteHsmConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteHsmConfigurationError> {
{
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[..] {
"HsmConfigurationNotFoundFault" => {
return RusotoError::Service(
DeleteHsmConfigurationError::HsmConfigurationNotFoundFault(
parsed_error.message,
),
)
}
"InvalidHsmConfigurationStateFault" => {
return RusotoError::Service(
DeleteHsmConfigurationError::InvalidHsmConfigurationStateFault(
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 DeleteHsmConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteHsmConfigurationError {
fn description(&self) -> &str {
match *self {
DeleteHsmConfigurationError::HsmConfigurationNotFoundFault(ref cause) => cause,
DeleteHsmConfigurationError::InvalidHsmConfigurationStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSnapshotCopyGrantError {
InvalidSnapshotCopyGrantStateFault(String),
SnapshotCopyGrantNotFoundFault(String),
}
impl DeleteSnapshotCopyGrantError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSnapshotCopyGrantError> {
{
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[..] {
"InvalidSnapshotCopyGrantStateFault" => {
return RusotoError::Service(
DeleteSnapshotCopyGrantError::InvalidSnapshotCopyGrantStateFault(
parsed_error.message,
),
)
}
"SnapshotCopyGrantNotFoundFault" => {
return RusotoError::Service(
DeleteSnapshotCopyGrantError::SnapshotCopyGrantNotFoundFault(
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 DeleteSnapshotCopyGrantError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSnapshotCopyGrantError {
fn description(&self) -> &str {
match *self {
DeleteSnapshotCopyGrantError::InvalidSnapshotCopyGrantStateFault(ref cause) => cause,
DeleteSnapshotCopyGrantError::SnapshotCopyGrantNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSnapshotScheduleError {
InvalidClusterSnapshotScheduleStateFault(String),
SnapshotScheduleNotFoundFault(String),
}
impl DeleteSnapshotScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSnapshotScheduleError> {
{
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[..] {
"InvalidClusterSnapshotScheduleState" => {
return RusotoError::Service(
DeleteSnapshotScheduleError::InvalidClusterSnapshotScheduleStateFault(
parsed_error.message,
),
)
}
"SnapshotScheduleNotFound" => {
return RusotoError::Service(
DeleteSnapshotScheduleError::SnapshotScheduleNotFoundFault(
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 DeleteSnapshotScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSnapshotScheduleError {
fn description(&self) -> &str {
match *self {
DeleteSnapshotScheduleError::InvalidClusterSnapshotScheduleStateFault(ref cause) => {
cause
}
DeleteSnapshotScheduleError::SnapshotScheduleNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTagsError {
InvalidTagFault(String),
ResourceNotFoundFault(String),
}
impl DeleteTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTagsError> {
{
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[..] {
"InvalidTagFault" => {
return RusotoError::Service(DeleteTagsError::InvalidTagFault(
parsed_error.message,
))
}
"ResourceNotFoundFault" => {
return RusotoError::Service(DeleteTagsError::ResourceNotFoundFault(
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 DeleteTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTagsError {
fn description(&self) -> &str {
match *self {
DeleteTagsError::InvalidTagFault(ref cause) => cause,
DeleteTagsError::ResourceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountAttributesError {}
impl DescribeAccountAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeAccountAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountAttributesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterDbRevisionsError {
ClusterNotFoundFault(String),
InvalidClusterStateFault(String),
}
impl DescribeClusterDbRevisionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeClusterDbRevisionsError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
DescribeClusterDbRevisionsError::ClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
DescribeClusterDbRevisionsError::InvalidClusterStateFault(
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 DescribeClusterDbRevisionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterDbRevisionsError {
fn description(&self) -> &str {
match *self {
DescribeClusterDbRevisionsError::ClusterNotFoundFault(ref cause) => cause,
DescribeClusterDbRevisionsError::InvalidClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterParameterGroupsError {
ClusterParameterGroupNotFoundFault(String),
InvalidTagFault(String),
}
impl DescribeClusterParameterGroupsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeClusterParameterGroupsError> {
{
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[..] {
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
DescribeClusterParameterGroupsError::ClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
DescribeClusterParameterGroupsError::InvalidTagFault(
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 DescribeClusterParameterGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterParameterGroupsError {
fn description(&self) -> &str {
match *self {
DescribeClusterParameterGroupsError::ClusterParameterGroupNotFoundFault(ref cause) => {
cause
}
DescribeClusterParameterGroupsError::InvalidTagFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterParametersError {
ClusterParameterGroupNotFoundFault(String),
}
impl DescribeClusterParametersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClusterParametersError> {
{
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[..] {
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
DescribeClusterParametersError::ClusterParameterGroupNotFoundFault(
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 DescribeClusterParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterParametersError {
fn description(&self) -> &str {
match *self {
DescribeClusterParametersError::ClusterParameterGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterSecurityGroupsError {
ClusterSecurityGroupNotFoundFault(String),
InvalidTagFault(String),
}
impl DescribeClusterSecurityGroupsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeClusterSecurityGroupsError> {
{
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[..] {
"ClusterSecurityGroupNotFound" => {
return RusotoError::Service(
DescribeClusterSecurityGroupsError::ClusterSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
DescribeClusterSecurityGroupsError::InvalidTagFault(
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 DescribeClusterSecurityGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterSecurityGroupsError {
fn description(&self) -> &str {
match *self {
DescribeClusterSecurityGroupsError::ClusterSecurityGroupNotFoundFault(ref cause) => {
cause
}
DescribeClusterSecurityGroupsError::InvalidTagFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterSnapshotsError {
ClusterNotFoundFault(String),
ClusterSnapshotNotFoundFault(String),
InvalidTagFault(String),
}
impl DescribeClusterSnapshotsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClusterSnapshotsError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
DescribeClusterSnapshotsError::ClusterNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSnapshotNotFound" => {
return RusotoError::Service(
DescribeClusterSnapshotsError::ClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
DescribeClusterSnapshotsError::InvalidTagFault(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 DescribeClusterSnapshotsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterSnapshotsError {
fn description(&self) -> &str {
match *self {
DescribeClusterSnapshotsError::ClusterNotFoundFault(ref cause) => cause,
DescribeClusterSnapshotsError::ClusterSnapshotNotFoundFault(ref cause) => cause,
DescribeClusterSnapshotsError::InvalidTagFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterSubnetGroupsError {
ClusterSubnetGroupNotFoundFault(String),
InvalidTagFault(String),
}
impl DescribeClusterSubnetGroupsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeClusterSubnetGroupsError> {
{
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[..] {
"ClusterSubnetGroupNotFoundFault" => {
return RusotoError::Service(
DescribeClusterSubnetGroupsError::ClusterSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
DescribeClusterSubnetGroupsError::InvalidTagFault(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 DescribeClusterSubnetGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterSubnetGroupsError {
fn description(&self) -> &str {
match *self {
DescribeClusterSubnetGroupsError::ClusterSubnetGroupNotFoundFault(ref cause) => cause,
DescribeClusterSubnetGroupsError::InvalidTagFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterTracksError {
InvalidClusterTrackFault(String),
UnauthorizedOperation(String),
}
impl DescribeClusterTracksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClusterTracksError> {
{
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[..] {
"InvalidClusterTrack" => {
return RusotoError::Service(
DescribeClusterTracksError::InvalidClusterTrackFault(
parsed_error.message,
),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(
DescribeClusterTracksError::UnauthorizedOperation(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 DescribeClusterTracksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterTracksError {
fn description(&self) -> &str {
match *self {
DescribeClusterTracksError::InvalidClusterTrackFault(ref cause) => cause,
DescribeClusterTracksError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClusterVersionsError {}
impl DescribeClusterVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClusterVersionsError> {
{
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 DescribeClusterVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClusterVersionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClustersError {
ClusterNotFoundFault(String),
InvalidTagFault(String),
}
impl DescribeClustersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClustersError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(DescribeClustersError::ClusterNotFoundFault(
parsed_error.message,
))
}
"InvalidTagFault" => {
return RusotoError::Service(DescribeClustersError::InvalidTagFault(
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 DescribeClustersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClustersError {
fn description(&self) -> &str {
match *self {
DescribeClustersError::ClusterNotFoundFault(ref cause) => cause,
DescribeClustersError::InvalidTagFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDefaultClusterParametersError {}
impl DescribeDefaultClusterParametersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDefaultClusterParametersError> {
{
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 DescribeDefaultClusterParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDefaultClusterParametersError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventCategoriesError {}
impl DescribeEventCategoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEventCategoriesError> {
{
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 DescribeEventCategoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventCategoriesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventSubscriptionsError {
InvalidTagFault(String),
SubscriptionNotFoundFault(String),
}
impl DescribeEventSubscriptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEventSubscriptionsError> {
{
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[..] {
"InvalidTagFault" => {
return RusotoError::Service(
DescribeEventSubscriptionsError::InvalidTagFault(parsed_error.message),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
DescribeEventSubscriptionsError::SubscriptionNotFoundFault(
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 DescribeEventSubscriptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventSubscriptionsError {
fn description(&self) -> &str {
match *self {
DescribeEventSubscriptionsError::InvalidTagFault(ref cause) => cause,
DescribeEventSubscriptionsError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventsError {}
impl DescribeEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEventsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeHsmClientCertificatesError {
HsmClientCertificateNotFoundFault(String),
InvalidTagFault(String),
}
impl DescribeHsmClientCertificatesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeHsmClientCertificatesError> {
{
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[..] {
"HsmClientCertificateNotFoundFault" => {
return RusotoError::Service(
DescribeHsmClientCertificatesError::HsmClientCertificateNotFoundFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
DescribeHsmClientCertificatesError::InvalidTagFault(
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 DescribeHsmClientCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeHsmClientCertificatesError {
fn description(&self) -> &str {
match *self {
DescribeHsmClientCertificatesError::HsmClientCertificateNotFoundFault(ref cause) => {
cause
}
DescribeHsmClientCertificatesError::InvalidTagFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeHsmConfigurationsError {
HsmConfigurationNotFoundFault(String),
InvalidTagFault(String),
}
impl DescribeHsmConfigurationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeHsmConfigurationsError> {
{
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[..] {
"HsmConfigurationNotFoundFault" => {
return RusotoError::Service(
DescribeHsmConfigurationsError::HsmConfigurationNotFoundFault(
parsed_error.message,
),
)
}
"InvalidTagFault" => {
return RusotoError::Service(
DescribeHsmConfigurationsError::InvalidTagFault(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 DescribeHsmConfigurationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeHsmConfigurationsError {
fn description(&self) -> &str {
match *self {
DescribeHsmConfigurationsError::HsmConfigurationNotFoundFault(ref cause) => cause,
DescribeHsmConfigurationsError::InvalidTagFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoggingStatusError {
ClusterNotFoundFault(String),
}
impl DescribeLoggingStatusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoggingStatusError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
DescribeLoggingStatusError::ClusterNotFoundFault(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 DescribeLoggingStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLoggingStatusError {
fn description(&self) -> &str {
match *self {
DescribeLoggingStatusError::ClusterNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeOrderableClusterOptionsError {}
impl DescribeOrderableClusterOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeOrderableClusterOptionsError> {
{
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 DescribeOrderableClusterOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeOrderableClusterOptionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeReservedNodeOfferingsError {
DependentServiceUnavailableFault(String),
ReservedNodeOfferingNotFoundFault(String),
UnsupportedOperationFault(String),
}
impl DescribeReservedNodeOfferingsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeReservedNodeOfferingsError> {
{
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[..] {
"DependentServiceUnavailableFault" => {
return RusotoError::Service(
DescribeReservedNodeOfferingsError::DependentServiceUnavailableFault(
parsed_error.message,
),
)
}
"ReservedNodeOfferingNotFound" => {
return RusotoError::Service(
DescribeReservedNodeOfferingsError::ReservedNodeOfferingNotFoundFault(
parsed_error.message,
),
)
}
"UnsupportedOperation" => {
return RusotoError::Service(
DescribeReservedNodeOfferingsError::UnsupportedOperationFault(
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 DescribeReservedNodeOfferingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeReservedNodeOfferingsError {
fn description(&self) -> &str {
match *self {
DescribeReservedNodeOfferingsError::DependentServiceUnavailableFault(ref cause) => {
cause
}
DescribeReservedNodeOfferingsError::ReservedNodeOfferingNotFoundFault(ref cause) => {
cause
}
DescribeReservedNodeOfferingsError::UnsupportedOperationFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeReservedNodesError {
DependentServiceUnavailableFault(String),
ReservedNodeNotFoundFault(String),
}
impl DescribeReservedNodesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeReservedNodesError> {
{
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[..] {
"DependentServiceUnavailableFault" => {
return RusotoError::Service(
DescribeReservedNodesError::DependentServiceUnavailableFault(
parsed_error.message,
),
)
}
"ReservedNodeNotFound" => {
return RusotoError::Service(
DescribeReservedNodesError::ReservedNodeNotFoundFault(
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 DescribeReservedNodesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeReservedNodesError {
fn description(&self) -> &str {
match *self {
DescribeReservedNodesError::DependentServiceUnavailableFault(ref cause) => cause,
DescribeReservedNodesError::ReservedNodeNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeResizeError {
ClusterNotFoundFault(String),
ResizeNotFoundFault(String),
}
impl DescribeResizeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeResizeError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(DescribeResizeError::ClusterNotFoundFault(
parsed_error.message,
))
}
"ResizeNotFound" => {
return RusotoError::Service(DescribeResizeError::ResizeNotFoundFault(
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 DescribeResizeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeResizeError {
fn description(&self) -> &str {
match *self {
DescribeResizeError::ClusterNotFoundFault(ref cause) => cause,
DescribeResizeError::ResizeNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSnapshotCopyGrantsError {
InvalidTagFault(String),
SnapshotCopyGrantNotFoundFault(String),
}
impl DescribeSnapshotCopyGrantsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeSnapshotCopyGrantsError> {
{
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[..] {
"InvalidTagFault" => {
return RusotoError::Service(
DescribeSnapshotCopyGrantsError::InvalidTagFault(parsed_error.message),
)
}
"SnapshotCopyGrantNotFoundFault" => {
return RusotoError::Service(
DescribeSnapshotCopyGrantsError::SnapshotCopyGrantNotFoundFault(
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 DescribeSnapshotCopyGrantsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSnapshotCopyGrantsError {
fn description(&self) -> &str {
match *self {
DescribeSnapshotCopyGrantsError::InvalidTagFault(ref cause) => cause,
DescribeSnapshotCopyGrantsError::SnapshotCopyGrantNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSnapshotSchedulesError {}
impl DescribeSnapshotSchedulesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSnapshotSchedulesError> {
{
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 DescribeSnapshotSchedulesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSnapshotSchedulesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStorageError {}
impl DescribeStorageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStorageError> {
{
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 DescribeStorageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStorageError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTableRestoreStatusError {
ClusterNotFoundFault(String),
TableRestoreNotFoundFault(String),
}
impl DescribeTableRestoreStatusError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeTableRestoreStatusError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
DescribeTableRestoreStatusError::ClusterNotFoundFault(
parsed_error.message,
),
)
}
"TableRestoreNotFoundFault" => {
return RusotoError::Service(
DescribeTableRestoreStatusError::TableRestoreNotFoundFault(
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 DescribeTableRestoreStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTableRestoreStatusError {
fn description(&self) -> &str {
match *self {
DescribeTableRestoreStatusError::ClusterNotFoundFault(ref cause) => cause,
DescribeTableRestoreStatusError::TableRestoreNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
InvalidTagFault(String),
ResourceNotFoundFault(String),
}
impl DescribeTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidTagFault" => {
return RusotoError::Service(DescribeTagsError::InvalidTagFault(
parsed_error.message,
))
}
"ResourceNotFoundFault" => {
return RusotoError::Service(DescribeTagsError::ResourceNotFoundFault(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTagsError {
fn description(&self) -> &str {
match *self {
DescribeTagsError::InvalidTagFault(ref cause) => cause,
DescribeTagsError::ResourceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableLoggingError {
ClusterNotFoundFault(String),
}
impl DisableLoggingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableLoggingError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(DisableLoggingError::ClusterNotFoundFault(
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 DisableLoggingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableLoggingError {
fn description(&self) -> &str {
match *self {
DisableLoggingError::ClusterNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableSnapshotCopyError {
ClusterNotFoundFault(String),
InvalidClusterStateFault(String),
SnapshotCopyAlreadyDisabledFault(String),
UnauthorizedOperation(String),
}
impl DisableSnapshotCopyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableSnapshotCopyError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
DisableSnapshotCopyError::ClusterNotFoundFault(parsed_error.message),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
DisableSnapshotCopyError::InvalidClusterStateFault(
parsed_error.message,
),
)
}
"SnapshotCopyAlreadyDisabledFault" => {
return RusotoError::Service(
DisableSnapshotCopyError::SnapshotCopyAlreadyDisabledFault(
parsed_error.message,
),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(
DisableSnapshotCopyError::UnauthorizedOperation(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 DisableSnapshotCopyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableSnapshotCopyError {
fn description(&self) -> &str {
match *self {
DisableSnapshotCopyError::ClusterNotFoundFault(ref cause) => cause,
DisableSnapshotCopyError::InvalidClusterStateFault(ref cause) => cause,
DisableSnapshotCopyError::SnapshotCopyAlreadyDisabledFault(ref cause) => cause,
DisableSnapshotCopyError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableLoggingError {
BucketNotFoundFault(String),
ClusterNotFoundFault(String),
InsufficientS3BucketPolicyFault(String),
InvalidS3BucketNameFault(String),
InvalidS3KeyPrefixFault(String),
}
impl EnableLoggingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableLoggingError> {
{
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[..] {
"BucketNotFoundFault" => {
return RusotoError::Service(EnableLoggingError::BucketNotFoundFault(
parsed_error.message,
))
}
"ClusterNotFound" => {
return RusotoError::Service(EnableLoggingError::ClusterNotFoundFault(
parsed_error.message,
))
}
"InsufficientS3BucketPolicyFault" => {
return RusotoError::Service(
EnableLoggingError::InsufficientS3BucketPolicyFault(
parsed_error.message,
),
)
}
"InvalidS3BucketNameFault" => {
return RusotoError::Service(EnableLoggingError::InvalidS3BucketNameFault(
parsed_error.message,
))
}
"InvalidS3KeyPrefixFault" => {
return RusotoError::Service(EnableLoggingError::InvalidS3KeyPrefixFault(
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 EnableLoggingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableLoggingError {
fn description(&self) -> &str {
match *self {
EnableLoggingError::BucketNotFoundFault(ref cause) => cause,
EnableLoggingError::ClusterNotFoundFault(ref cause) => cause,
EnableLoggingError::InsufficientS3BucketPolicyFault(ref cause) => cause,
EnableLoggingError::InvalidS3BucketNameFault(ref cause) => cause,
EnableLoggingError::InvalidS3KeyPrefixFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableSnapshotCopyError {
ClusterNotFoundFault(String),
CopyToRegionDisabledFault(String),
DependentServiceRequestThrottlingFault(String),
IncompatibleOrderableOptions(String),
InvalidClusterStateFault(String),
InvalidRetentionPeriodFault(String),
LimitExceededFault(String),
SnapshotCopyAlreadyEnabledFault(String),
SnapshotCopyGrantNotFoundFault(String),
UnauthorizedOperation(String),
UnknownSnapshotCopyRegionFault(String),
}
impl EnableSnapshotCopyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableSnapshotCopyError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(EnableSnapshotCopyError::ClusterNotFoundFault(
parsed_error.message,
))
}
"CopyToRegionDisabledFault" => {
return RusotoError::Service(
EnableSnapshotCopyError::CopyToRegionDisabledFault(
parsed_error.message,
),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
EnableSnapshotCopyError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"IncompatibleOrderableOptions" => {
return RusotoError::Service(
EnableSnapshotCopyError::IncompatibleOrderableOptions(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
EnableSnapshotCopyError::InvalidClusterStateFault(parsed_error.message),
)
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
EnableSnapshotCopyError::InvalidRetentionPeriodFault(
parsed_error.message,
),
)
}
"LimitExceededFault" => {
return RusotoError::Service(EnableSnapshotCopyError::LimitExceededFault(
parsed_error.message,
))
}
"SnapshotCopyAlreadyEnabledFault" => {
return RusotoError::Service(
EnableSnapshotCopyError::SnapshotCopyAlreadyEnabledFault(
parsed_error.message,
),
)
}
"SnapshotCopyGrantNotFoundFault" => {
return RusotoError::Service(
EnableSnapshotCopyError::SnapshotCopyGrantNotFoundFault(
parsed_error.message,
),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(
EnableSnapshotCopyError::UnauthorizedOperation(parsed_error.message),
)
}
"UnknownSnapshotCopyRegionFault" => {
return RusotoError::Service(
EnableSnapshotCopyError::UnknownSnapshotCopyRegionFault(
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 EnableSnapshotCopyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableSnapshotCopyError {
fn description(&self) -> &str {
match *self {
EnableSnapshotCopyError::ClusterNotFoundFault(ref cause) => cause,
EnableSnapshotCopyError::CopyToRegionDisabledFault(ref cause) => cause,
EnableSnapshotCopyError::DependentServiceRequestThrottlingFault(ref cause) => cause,
EnableSnapshotCopyError::IncompatibleOrderableOptions(ref cause) => cause,
EnableSnapshotCopyError::InvalidClusterStateFault(ref cause) => cause,
EnableSnapshotCopyError::InvalidRetentionPeriodFault(ref cause) => cause,
EnableSnapshotCopyError::LimitExceededFault(ref cause) => cause,
EnableSnapshotCopyError::SnapshotCopyAlreadyEnabledFault(ref cause) => cause,
EnableSnapshotCopyError::SnapshotCopyGrantNotFoundFault(ref cause) => cause,
EnableSnapshotCopyError::UnauthorizedOperation(ref cause) => cause,
EnableSnapshotCopyError::UnknownSnapshotCopyRegionFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetClusterCredentialsError {
ClusterNotFoundFault(String),
UnsupportedOperationFault(String),
}
impl GetClusterCredentialsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetClusterCredentialsError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
GetClusterCredentialsError::ClusterNotFoundFault(parsed_error.message),
)
}
"UnsupportedOperation" => {
return RusotoError::Service(
GetClusterCredentialsError::UnsupportedOperationFault(
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 GetClusterCredentialsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetClusterCredentialsError {
fn description(&self) -> &str {
match *self {
GetClusterCredentialsError::ClusterNotFoundFault(ref cause) => cause,
GetClusterCredentialsError::UnsupportedOperationFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetReservedNodeExchangeOfferingsError {
DependentServiceUnavailableFault(String),
InvalidReservedNodeStateFault(String),
ReservedNodeAlreadyMigratedFault(String),
ReservedNodeNotFoundFault(String),
ReservedNodeOfferingNotFoundFault(String),
UnsupportedOperationFault(String),
}
impl GetReservedNodeExchangeOfferingsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetReservedNodeExchangeOfferingsError> {
{
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[..] {
"DependentServiceUnavailableFault" => {
return RusotoError::Service(
GetReservedNodeExchangeOfferingsError::DependentServiceUnavailableFault(
parsed_error.message,
),
)
}
"InvalidReservedNodeState" => {
return RusotoError::Service(
GetReservedNodeExchangeOfferingsError::InvalidReservedNodeStateFault(
parsed_error.message,
),
)
}
"ReservedNodeAlreadyMigrated" => {
return RusotoError::Service(
GetReservedNodeExchangeOfferingsError::ReservedNodeAlreadyMigratedFault(
parsed_error.message,
),
)
}
"ReservedNodeNotFound" => {
return RusotoError::Service(
GetReservedNodeExchangeOfferingsError::ReservedNodeNotFoundFault(
parsed_error.message,
),
)
}
"ReservedNodeOfferingNotFound" => return RusotoError::Service(
GetReservedNodeExchangeOfferingsError::ReservedNodeOfferingNotFoundFault(
parsed_error.message,
),
),
"UnsupportedOperation" => {
return RusotoError::Service(
GetReservedNodeExchangeOfferingsError::UnsupportedOperationFault(
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 GetReservedNodeExchangeOfferingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetReservedNodeExchangeOfferingsError {
fn description(&self) -> &str {
match *self {
GetReservedNodeExchangeOfferingsError::DependentServiceUnavailableFault(ref cause) => {
cause
}
GetReservedNodeExchangeOfferingsError::InvalidReservedNodeStateFault(ref cause) => {
cause
}
GetReservedNodeExchangeOfferingsError::ReservedNodeAlreadyMigratedFault(ref cause) => {
cause
}
GetReservedNodeExchangeOfferingsError::ReservedNodeNotFoundFault(ref cause) => cause,
GetReservedNodeExchangeOfferingsError::ReservedNodeOfferingNotFoundFault(ref cause) => {
cause
}
GetReservedNodeExchangeOfferingsError::UnsupportedOperationFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterError {
ClusterAlreadyExistsFault(String),
ClusterNotFoundFault(String),
ClusterParameterGroupNotFoundFault(String),
ClusterSecurityGroupNotFoundFault(String),
DependentServiceRequestThrottlingFault(String),
HsmClientCertificateNotFoundFault(String),
HsmConfigurationNotFoundFault(String),
InsufficientClusterCapacityFault(String),
InvalidClusterSecurityGroupStateFault(String),
InvalidClusterStateFault(String),
InvalidClusterTrackFault(String),
InvalidElasticIpFault(String),
InvalidRetentionPeriodFault(String),
LimitExceededFault(String),
NumberOfNodesPerClusterLimitExceededFault(String),
NumberOfNodesQuotaExceededFault(String),
TableLimitExceededFault(String),
UnauthorizedOperation(String),
UnsupportedOptionFault(String),
}
impl ModifyClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClusterError> {
{
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[..] {
"ClusterAlreadyExists" => {
return RusotoError::Service(ModifyClusterError::ClusterAlreadyExistsFault(
parsed_error.message,
))
}
"ClusterNotFound" => {
return RusotoError::Service(ModifyClusterError::ClusterNotFoundFault(
parsed_error.message,
))
}
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
ModifyClusterError::ClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSecurityGroupNotFound" => {
return RusotoError::Service(
ModifyClusterError::ClusterSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
ModifyClusterError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"HsmClientCertificateNotFoundFault" => {
return RusotoError::Service(
ModifyClusterError::HsmClientCertificateNotFoundFault(
parsed_error.message,
),
)
}
"HsmConfigurationNotFoundFault" => {
return RusotoError::Service(
ModifyClusterError::HsmConfigurationNotFoundFault(parsed_error.message),
)
}
"InsufficientClusterCapacity" => {
return RusotoError::Service(
ModifyClusterError::InsufficientClusterCapacityFault(
parsed_error.message,
),
)
}
"InvalidClusterSecurityGroupState" => {
return RusotoError::Service(
ModifyClusterError::InvalidClusterSecurityGroupStateFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(ModifyClusterError::InvalidClusterStateFault(
parsed_error.message,
))
}
"InvalidClusterTrack" => {
return RusotoError::Service(ModifyClusterError::InvalidClusterTrackFault(
parsed_error.message,
))
}
"InvalidElasticIpFault" => {
return RusotoError::Service(ModifyClusterError::InvalidElasticIpFault(
parsed_error.message,
))
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
ModifyClusterError::InvalidRetentionPeriodFault(parsed_error.message),
)
}
"LimitExceededFault" => {
return RusotoError::Service(ModifyClusterError::LimitExceededFault(
parsed_error.message,
))
}
"NumberOfNodesPerClusterLimitExceeded" => {
return RusotoError::Service(
ModifyClusterError::NumberOfNodesPerClusterLimitExceededFault(
parsed_error.message,
),
)
}
"NumberOfNodesQuotaExceeded" => {
return RusotoError::Service(
ModifyClusterError::NumberOfNodesQuotaExceededFault(
parsed_error.message,
),
)
}
"TableLimitExceeded" => {
return RusotoError::Service(ModifyClusterError::TableLimitExceededFault(
parsed_error.message,
))
}
"UnauthorizedOperation" => {
return RusotoError::Service(ModifyClusterError::UnauthorizedOperation(
parsed_error.message,
))
}
"UnsupportedOptionFault" => {
return RusotoError::Service(ModifyClusterError::UnsupportedOptionFault(
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 ModifyClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterError {
fn description(&self) -> &str {
match *self {
ModifyClusterError::ClusterAlreadyExistsFault(ref cause) => cause,
ModifyClusterError::ClusterNotFoundFault(ref cause) => cause,
ModifyClusterError::ClusterParameterGroupNotFoundFault(ref cause) => cause,
ModifyClusterError::ClusterSecurityGroupNotFoundFault(ref cause) => cause,
ModifyClusterError::DependentServiceRequestThrottlingFault(ref cause) => cause,
ModifyClusterError::HsmClientCertificateNotFoundFault(ref cause) => cause,
ModifyClusterError::HsmConfigurationNotFoundFault(ref cause) => cause,
ModifyClusterError::InsufficientClusterCapacityFault(ref cause) => cause,
ModifyClusterError::InvalidClusterSecurityGroupStateFault(ref cause) => cause,
ModifyClusterError::InvalidClusterStateFault(ref cause) => cause,
ModifyClusterError::InvalidClusterTrackFault(ref cause) => cause,
ModifyClusterError::InvalidElasticIpFault(ref cause) => cause,
ModifyClusterError::InvalidRetentionPeriodFault(ref cause) => cause,
ModifyClusterError::LimitExceededFault(ref cause) => cause,
ModifyClusterError::NumberOfNodesPerClusterLimitExceededFault(ref cause) => cause,
ModifyClusterError::NumberOfNodesQuotaExceededFault(ref cause) => cause,
ModifyClusterError::TableLimitExceededFault(ref cause) => cause,
ModifyClusterError::UnauthorizedOperation(ref cause) => cause,
ModifyClusterError::UnsupportedOptionFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterDbRevisionError {
ClusterNotFoundFault(String),
ClusterOnLatestRevisionFault(String),
InvalidClusterStateFault(String),
}
impl ModifyClusterDbRevisionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClusterDbRevisionError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
ModifyClusterDbRevisionError::ClusterNotFoundFault(
parsed_error.message,
),
)
}
"ClusterOnLatestRevision" => {
return RusotoError::Service(
ModifyClusterDbRevisionError::ClusterOnLatestRevisionFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
ModifyClusterDbRevisionError::InvalidClusterStateFault(
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 ModifyClusterDbRevisionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterDbRevisionError {
fn description(&self) -> &str {
match *self {
ModifyClusterDbRevisionError::ClusterNotFoundFault(ref cause) => cause,
ModifyClusterDbRevisionError::ClusterOnLatestRevisionFault(ref cause) => cause,
ModifyClusterDbRevisionError::InvalidClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterIamRolesError {
ClusterNotFoundFault(String),
InvalidClusterStateFault(String),
}
impl ModifyClusterIamRolesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClusterIamRolesError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
ModifyClusterIamRolesError::ClusterNotFoundFault(parsed_error.message),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
ModifyClusterIamRolesError::InvalidClusterStateFault(
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 ModifyClusterIamRolesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterIamRolesError {
fn description(&self) -> &str {
match *self {
ModifyClusterIamRolesError::ClusterNotFoundFault(ref cause) => cause,
ModifyClusterIamRolesError::InvalidClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterMaintenanceError {
ClusterNotFoundFault(String),
}
impl ModifyClusterMaintenanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClusterMaintenanceError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
ModifyClusterMaintenanceError::ClusterNotFoundFault(
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 ModifyClusterMaintenanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterMaintenanceError {
fn description(&self) -> &str {
match *self {
ModifyClusterMaintenanceError::ClusterNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterParameterGroupError {
ClusterParameterGroupNotFoundFault(String),
InvalidClusterParameterGroupStateFault(String),
}
impl ModifyClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyClusterParameterGroupError> {
{
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[..] {
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
ModifyClusterParameterGroupError::ClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterParameterGroupState" => return RusotoError::Service(
ModifyClusterParameterGroupError::InvalidClusterParameterGroupStateFault(
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 ModifyClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
ModifyClusterParameterGroupError::ClusterParameterGroupNotFoundFault(ref cause) => {
cause
}
ModifyClusterParameterGroupError::InvalidClusterParameterGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterSnapshotError {
ClusterSnapshotNotFoundFault(String),
InvalidClusterSnapshotStateFault(String),
InvalidRetentionPeriodFault(String),
}
impl ModifyClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClusterSnapshotError> {
{
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[..] {
"ClusterSnapshotNotFound" => {
return RusotoError::Service(
ModifyClusterSnapshotError::ClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterSnapshotState" => {
return RusotoError::Service(
ModifyClusterSnapshotError::InvalidClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
ModifyClusterSnapshotError::InvalidRetentionPeriodFault(
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 ModifyClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterSnapshotError {
fn description(&self) -> &str {
match *self {
ModifyClusterSnapshotError::ClusterSnapshotNotFoundFault(ref cause) => cause,
ModifyClusterSnapshotError::InvalidClusterSnapshotStateFault(ref cause) => cause,
ModifyClusterSnapshotError::InvalidRetentionPeriodFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterSnapshotScheduleError {
ClusterNotFoundFault(String),
InvalidClusterSnapshotScheduleStateFault(String),
SnapshotScheduleNotFoundFault(String),
}
impl ModifyClusterSnapshotScheduleError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyClusterSnapshotScheduleError> {
{
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[..] {
"ClusterNotFound" => return RusotoError::Service(ModifyClusterSnapshotScheduleError::ClusterNotFoundFault(parsed_error.message)),"InvalidClusterSnapshotScheduleState" => return RusotoError::Service(ModifyClusterSnapshotScheduleError::InvalidClusterSnapshotScheduleStateFault(parsed_error.message)),"SnapshotScheduleNotFound" => return RusotoError::Service(ModifyClusterSnapshotScheduleError::SnapshotScheduleNotFoundFault(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 ModifyClusterSnapshotScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterSnapshotScheduleError {
fn description(&self) -> &str {
match *self {
ModifyClusterSnapshotScheduleError::ClusterNotFoundFault(ref cause) => cause,
ModifyClusterSnapshotScheduleError::InvalidClusterSnapshotScheduleStateFault(
ref cause,
) => cause,
ModifyClusterSnapshotScheduleError::SnapshotScheduleNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClusterSubnetGroupError {
ClusterSubnetGroupNotFoundFault(String),
ClusterSubnetQuotaExceededFault(String),
DependentServiceRequestThrottlingFault(String),
InvalidSubnet(String),
SubnetAlreadyInUse(String),
UnauthorizedOperation(String),
}
impl ModifyClusterSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClusterSubnetGroupError> {
{
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[..] {
"ClusterSubnetGroupNotFoundFault" => {
return RusotoError::Service(
ModifyClusterSubnetGroupError::ClusterSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSubnetQuotaExceededFault" => {
return RusotoError::Service(
ModifyClusterSubnetGroupError::ClusterSubnetQuotaExceededFault(
parsed_error.message,
),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
ModifyClusterSubnetGroupError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(ModifyClusterSubnetGroupError::InvalidSubnet(
parsed_error.message,
))
}
"SubnetAlreadyInUse" => {
return RusotoError::Service(
ModifyClusterSubnetGroupError::SubnetAlreadyInUse(parsed_error.message),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(
ModifyClusterSubnetGroupError::UnauthorizedOperation(
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 ModifyClusterSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClusterSubnetGroupError {
fn description(&self) -> &str {
match *self {
ModifyClusterSubnetGroupError::ClusterSubnetGroupNotFoundFault(ref cause) => cause,
ModifyClusterSubnetGroupError::ClusterSubnetQuotaExceededFault(ref cause) => cause,
ModifyClusterSubnetGroupError::DependentServiceRequestThrottlingFault(ref cause) => {
cause
}
ModifyClusterSubnetGroupError::InvalidSubnet(ref cause) => cause,
ModifyClusterSubnetGroupError::SubnetAlreadyInUse(ref cause) => cause,
ModifyClusterSubnetGroupError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyEventSubscriptionError {
InvalidSubscriptionStateFault(String),
SNSInvalidTopicFault(String),
SNSNoAuthorizationFault(String),
SNSTopicArnNotFoundFault(String),
SourceNotFoundFault(String),
SubscriptionCategoryNotFoundFault(String),
SubscriptionEventIdNotFoundFault(String),
SubscriptionNotFoundFault(String),
SubscriptionSeverityNotFoundFault(String),
}
impl ModifyEventSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyEventSubscriptionError> {
{
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[..] {
"InvalidSubscriptionStateFault" => {
return RusotoError::Service(
ModifyEventSubscriptionError::InvalidSubscriptionStateFault(
parsed_error.message,
),
)
}
"SNSInvalidTopic" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SNSInvalidTopicFault(
parsed_error.message,
),
)
}
"SNSNoAuthorization" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SNSNoAuthorizationFault(
parsed_error.message,
),
)
}
"SNSTopicArnNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SNSTopicArnNotFoundFault(
parsed_error.message,
),
)
}
"SourceNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SourceNotFoundFault(parsed_error.message),
)
}
"SubscriptionCategoryNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SubscriptionCategoryNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionEventIdNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SubscriptionEventIdNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SubscriptionNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionSeverityNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SubscriptionSeverityNotFoundFault(
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 ModifyEventSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyEventSubscriptionError {
fn description(&self) -> &str {
match *self {
ModifyEventSubscriptionError::InvalidSubscriptionStateFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSInvalidTopicFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSNoAuthorizationFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSTopicArnNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SourceNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionCategoryNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionEventIdNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionSeverityNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifySnapshotCopyRetentionPeriodError {
ClusterNotFoundFault(String),
InvalidClusterStateFault(String),
InvalidRetentionPeriodFault(String),
SnapshotCopyDisabledFault(String),
UnauthorizedOperation(String),
}
impl ModifySnapshotCopyRetentionPeriodError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifySnapshotCopyRetentionPeriodError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
ModifySnapshotCopyRetentionPeriodError::ClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
ModifySnapshotCopyRetentionPeriodError::InvalidClusterStateFault(
parsed_error.message,
),
)
}
"InvalidRetentionPeriodFault" => {
return RusotoError::Service(
ModifySnapshotCopyRetentionPeriodError::InvalidRetentionPeriodFault(
parsed_error.message,
),
)
}
"SnapshotCopyDisabledFault" => {
return RusotoError::Service(
ModifySnapshotCopyRetentionPeriodError::SnapshotCopyDisabledFault(
parsed_error.message,
),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(
ModifySnapshotCopyRetentionPeriodError::UnauthorizedOperation(
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 ModifySnapshotCopyRetentionPeriodError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifySnapshotCopyRetentionPeriodError {
fn description(&self) -> &str {
match *self {
ModifySnapshotCopyRetentionPeriodError::ClusterNotFoundFault(ref cause) => cause,
ModifySnapshotCopyRetentionPeriodError::InvalidClusterStateFault(ref cause) => cause,
ModifySnapshotCopyRetentionPeriodError::InvalidRetentionPeriodFault(ref cause) => cause,
ModifySnapshotCopyRetentionPeriodError::SnapshotCopyDisabledFault(ref cause) => cause,
ModifySnapshotCopyRetentionPeriodError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifySnapshotScheduleError {
InvalidScheduleFault(String),
SnapshotScheduleNotFoundFault(String),
SnapshotScheduleUpdateInProgressFault(String),
}
impl ModifySnapshotScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifySnapshotScheduleError> {
{
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[..] {
"InvalidSchedule" => {
return RusotoError::Service(
ModifySnapshotScheduleError::InvalidScheduleFault(parsed_error.message),
)
}
"SnapshotScheduleNotFound" => {
return RusotoError::Service(
ModifySnapshotScheduleError::SnapshotScheduleNotFoundFault(
parsed_error.message,
),
)
}
"SnapshotScheduleUpdateInProgress" => {
return RusotoError::Service(
ModifySnapshotScheduleError::SnapshotScheduleUpdateInProgressFault(
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 ModifySnapshotScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifySnapshotScheduleError {
fn description(&self) -> &str {
match *self {
ModifySnapshotScheduleError::InvalidScheduleFault(ref cause) => cause,
ModifySnapshotScheduleError::SnapshotScheduleNotFoundFault(ref cause) => cause,
ModifySnapshotScheduleError::SnapshotScheduleUpdateInProgressFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PurchaseReservedNodeOfferingError {
ReservedNodeAlreadyExistsFault(String),
ReservedNodeOfferingNotFoundFault(String),
ReservedNodeQuotaExceededFault(String),
UnsupportedOperationFault(String),
}
impl PurchaseReservedNodeOfferingError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PurchaseReservedNodeOfferingError> {
{
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[..] {
"ReservedNodeAlreadyExists" => {
return RusotoError::Service(
PurchaseReservedNodeOfferingError::ReservedNodeAlreadyExistsFault(
parsed_error.message,
),
)
}
"ReservedNodeOfferingNotFound" => {
return RusotoError::Service(
PurchaseReservedNodeOfferingError::ReservedNodeOfferingNotFoundFault(
parsed_error.message,
),
)
}
"ReservedNodeQuotaExceeded" => {
return RusotoError::Service(
PurchaseReservedNodeOfferingError::ReservedNodeQuotaExceededFault(
parsed_error.message,
),
)
}
"UnsupportedOperation" => {
return RusotoError::Service(
PurchaseReservedNodeOfferingError::UnsupportedOperationFault(
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 PurchaseReservedNodeOfferingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PurchaseReservedNodeOfferingError {
fn description(&self) -> &str {
match *self {
PurchaseReservedNodeOfferingError::ReservedNodeAlreadyExistsFault(ref cause) => cause,
PurchaseReservedNodeOfferingError::ReservedNodeOfferingNotFoundFault(ref cause) => {
cause
}
PurchaseReservedNodeOfferingError::ReservedNodeQuotaExceededFault(ref cause) => cause,
PurchaseReservedNodeOfferingError::UnsupportedOperationFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RebootClusterError {
ClusterNotFoundFault(String),
InvalidClusterStateFault(String),
}
impl RebootClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RebootClusterError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(RebootClusterError::ClusterNotFoundFault(
parsed_error.message,
))
}
"InvalidClusterState" => {
return RusotoError::Service(RebootClusterError::InvalidClusterStateFault(
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 RebootClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RebootClusterError {
fn description(&self) -> &str {
match *self {
RebootClusterError::ClusterNotFoundFault(ref cause) => cause,
RebootClusterError::InvalidClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetClusterParameterGroupError {
ClusterParameterGroupNotFoundFault(String),
InvalidClusterParameterGroupStateFault(String),
}
impl ResetClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ResetClusterParameterGroupError> {
{
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[..] {
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
ResetClusterParameterGroupError::ClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidClusterParameterGroupState" => {
return RusotoError::Service(
ResetClusterParameterGroupError::InvalidClusterParameterGroupStateFault(
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 ResetClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
ResetClusterParameterGroupError::ClusterParameterGroupNotFoundFault(ref cause) => cause,
ResetClusterParameterGroupError::InvalidClusterParameterGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResizeClusterError {
ClusterNotFoundFault(String),
InsufficientClusterCapacityFault(String),
InvalidClusterStateFault(String),
LimitExceededFault(String),
NumberOfNodesPerClusterLimitExceededFault(String),
NumberOfNodesQuotaExceededFault(String),
UnauthorizedOperation(String),
UnsupportedOperationFault(String),
UnsupportedOptionFault(String),
}
impl ResizeClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResizeClusterError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(ResizeClusterError::ClusterNotFoundFault(
parsed_error.message,
))
}
"InsufficientClusterCapacity" => {
return RusotoError::Service(
ResizeClusterError::InsufficientClusterCapacityFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(ResizeClusterError::InvalidClusterStateFault(
parsed_error.message,
))
}
"LimitExceededFault" => {
return RusotoError::Service(ResizeClusterError::LimitExceededFault(
parsed_error.message,
))
}
"NumberOfNodesPerClusterLimitExceeded" => {
return RusotoError::Service(
ResizeClusterError::NumberOfNodesPerClusterLimitExceededFault(
parsed_error.message,
),
)
}
"NumberOfNodesQuotaExceeded" => {
return RusotoError::Service(
ResizeClusterError::NumberOfNodesQuotaExceededFault(
parsed_error.message,
),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(ResizeClusterError::UnauthorizedOperation(
parsed_error.message,
))
}
"UnsupportedOperation" => {
return RusotoError::Service(ResizeClusterError::UnsupportedOperationFault(
parsed_error.message,
))
}
"UnsupportedOptionFault" => {
return RusotoError::Service(ResizeClusterError::UnsupportedOptionFault(
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 ResizeClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResizeClusterError {
fn description(&self) -> &str {
match *self {
ResizeClusterError::ClusterNotFoundFault(ref cause) => cause,
ResizeClusterError::InsufficientClusterCapacityFault(ref cause) => cause,
ResizeClusterError::InvalidClusterStateFault(ref cause) => cause,
ResizeClusterError::LimitExceededFault(ref cause) => cause,
ResizeClusterError::NumberOfNodesPerClusterLimitExceededFault(ref cause) => cause,
ResizeClusterError::NumberOfNodesQuotaExceededFault(ref cause) => cause,
ResizeClusterError::UnauthorizedOperation(ref cause) => cause,
ResizeClusterError::UnsupportedOperationFault(ref cause) => cause,
ResizeClusterError::UnsupportedOptionFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreFromClusterSnapshotError {
AccessToSnapshotDeniedFault(String),
ClusterAlreadyExistsFault(String),
ClusterParameterGroupNotFoundFault(String),
ClusterQuotaExceededFault(String),
ClusterSecurityGroupNotFoundFault(String),
ClusterSnapshotNotFoundFault(String),
ClusterSubnetGroupNotFoundFault(String),
DependentServiceRequestThrottlingFault(String),
HsmClientCertificateNotFoundFault(String),
HsmConfigurationNotFoundFault(String),
InsufficientClusterCapacityFault(String),
InvalidClusterSnapshotStateFault(String),
InvalidClusterSubnetGroupStateFault(String),
InvalidClusterTrackFault(String),
InvalidElasticIpFault(String),
InvalidRestoreFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
LimitExceededFault(String),
NumberOfNodesPerClusterLimitExceededFault(String),
NumberOfNodesQuotaExceededFault(String),
SnapshotScheduleNotFoundFault(String),
UnauthorizedOperation(String),
}
impl RestoreFromClusterSnapshotError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreFromClusterSnapshotError> {
{
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[..] {
"AccessToSnapshotDenied" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::AccessToSnapshotDeniedFault(
parsed_error.message,
),
)
}
"ClusterAlreadyExists" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::ClusterAlreadyExistsFault(
parsed_error.message,
),
)
}
"ClusterParameterGroupNotFound" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::ClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"ClusterQuotaExceeded" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::ClusterQuotaExceededFault(
parsed_error.message,
),
)
}
"ClusterSecurityGroupNotFound" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::ClusterSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSnapshotNotFound" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::ClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::ClusterSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"HsmClientCertificateNotFoundFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::HsmClientCertificateNotFoundFault(
parsed_error.message,
),
)
}
"HsmConfigurationNotFoundFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::HsmConfigurationNotFoundFault(
parsed_error.message,
),
)
}
"InsufficientClusterCapacity" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InsufficientClusterCapacityFault(
parsed_error.message,
),
)
}
"InvalidClusterSnapshotState" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InvalidClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidClusterSubnetGroupStateFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InvalidClusterSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidClusterTrack" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InvalidClusterTrackFault(
parsed_error.message,
),
)
}
"InvalidElasticIpFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InvalidElasticIpFault(
parsed_error.message,
),
)
}
"InvalidRestore" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InvalidRestoreFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InvalidSubnet(parsed_error.message),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"LimitExceededFault" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::LimitExceededFault(
parsed_error.message,
),
)
}
"NumberOfNodesPerClusterLimitExceeded" => return RusotoError::Service(
RestoreFromClusterSnapshotError::NumberOfNodesPerClusterLimitExceededFault(
parsed_error.message,
),
),
"NumberOfNodesQuotaExceeded" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::NumberOfNodesQuotaExceededFault(
parsed_error.message,
),
)
}
"SnapshotScheduleNotFound" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::SnapshotScheduleNotFoundFault(
parsed_error.message,
),
)
}
"UnauthorizedOperation" => {
return RusotoError::Service(
RestoreFromClusterSnapshotError::UnauthorizedOperation(
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 RestoreFromClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreFromClusterSnapshotError {
fn description(&self) -> &str {
match *self {
RestoreFromClusterSnapshotError::AccessToSnapshotDeniedFault(ref cause) => cause,
RestoreFromClusterSnapshotError::ClusterAlreadyExistsFault(ref cause) => cause,
RestoreFromClusterSnapshotError::ClusterParameterGroupNotFoundFault(ref cause) => cause,
RestoreFromClusterSnapshotError::ClusterQuotaExceededFault(ref cause) => cause,
RestoreFromClusterSnapshotError::ClusterSecurityGroupNotFoundFault(ref cause) => cause,
RestoreFromClusterSnapshotError::ClusterSnapshotNotFoundFault(ref cause) => cause,
RestoreFromClusterSnapshotError::ClusterSubnetGroupNotFoundFault(ref cause) => cause,
RestoreFromClusterSnapshotError::DependentServiceRequestThrottlingFault(ref cause) => {
cause
}
RestoreFromClusterSnapshotError::HsmClientCertificateNotFoundFault(ref cause) => cause,
RestoreFromClusterSnapshotError::HsmConfigurationNotFoundFault(ref cause) => cause,
RestoreFromClusterSnapshotError::InsufficientClusterCapacityFault(ref cause) => cause,
RestoreFromClusterSnapshotError::InvalidClusterSnapshotStateFault(ref cause) => cause,
RestoreFromClusterSnapshotError::InvalidClusterSubnetGroupStateFault(ref cause) => {
cause
}
RestoreFromClusterSnapshotError::InvalidClusterTrackFault(ref cause) => cause,
RestoreFromClusterSnapshotError::InvalidElasticIpFault(ref cause) => cause,
RestoreFromClusterSnapshotError::InvalidRestoreFault(ref cause) => cause,
RestoreFromClusterSnapshotError::InvalidSubnet(ref cause) => cause,
RestoreFromClusterSnapshotError::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreFromClusterSnapshotError::LimitExceededFault(ref cause) => cause,
RestoreFromClusterSnapshotError::NumberOfNodesPerClusterLimitExceededFault(
ref cause,
) => cause,
RestoreFromClusterSnapshotError::NumberOfNodesQuotaExceededFault(ref cause) => cause,
RestoreFromClusterSnapshotError::SnapshotScheduleNotFoundFault(ref cause) => cause,
RestoreFromClusterSnapshotError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreTableFromClusterSnapshotError {
ClusterNotFoundFault(String),
ClusterSnapshotNotFoundFault(String),
InProgressTableRestoreQuotaExceededFault(String),
InvalidClusterSnapshotStateFault(String),
InvalidClusterStateFault(String),
InvalidTableRestoreArgumentFault(String),
UnsupportedOperationFault(String),
}
impl RestoreTableFromClusterSnapshotError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreTableFromClusterSnapshotError> {
{
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[..] {
"ClusterNotFound" => return RusotoError::Service(RestoreTableFromClusterSnapshotError::ClusterNotFoundFault(parsed_error.message)),"ClusterSnapshotNotFound" => return RusotoError::Service(RestoreTableFromClusterSnapshotError::ClusterSnapshotNotFoundFault(parsed_error.message)),"InProgressTableRestoreQuotaExceededFault" => return RusotoError::Service(RestoreTableFromClusterSnapshotError::InProgressTableRestoreQuotaExceededFault(parsed_error.message)),"InvalidClusterSnapshotState" => return RusotoError::Service(RestoreTableFromClusterSnapshotError::InvalidClusterSnapshotStateFault(parsed_error.message)),"InvalidClusterState" => return RusotoError::Service(RestoreTableFromClusterSnapshotError::InvalidClusterStateFault(parsed_error.message)),"InvalidTableRestoreArgument" => return RusotoError::Service(RestoreTableFromClusterSnapshotError::InvalidTableRestoreArgumentFault(parsed_error.message)),"UnsupportedOperation" => return RusotoError::Service(RestoreTableFromClusterSnapshotError::UnsupportedOperationFault(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 RestoreTableFromClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreTableFromClusterSnapshotError {
fn description(&self) -> &str {
match *self {
RestoreTableFromClusterSnapshotError::ClusterNotFoundFault(ref cause) => cause,
RestoreTableFromClusterSnapshotError::ClusterSnapshotNotFoundFault(ref cause) => cause,
RestoreTableFromClusterSnapshotError::InProgressTableRestoreQuotaExceededFault(
ref cause,
) => cause,
RestoreTableFromClusterSnapshotError::InvalidClusterSnapshotStateFault(ref cause) => {
cause
}
RestoreTableFromClusterSnapshotError::InvalidClusterStateFault(ref cause) => cause,
RestoreTableFromClusterSnapshotError::InvalidTableRestoreArgumentFault(ref cause) => {
cause
}
RestoreTableFromClusterSnapshotError::UnsupportedOperationFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RevokeClusterSecurityGroupIngressError {
AuthorizationNotFoundFault(String),
ClusterSecurityGroupNotFoundFault(String),
InvalidClusterSecurityGroupStateFault(String),
}
impl RevokeClusterSecurityGroupIngressError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RevokeClusterSecurityGroupIngressError> {
{
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[..] {
"AuthorizationNotFound" => return RusotoError::Service(RevokeClusterSecurityGroupIngressError::AuthorizationNotFoundFault(parsed_error.message)),"ClusterSecurityGroupNotFound" => return RusotoError::Service(RevokeClusterSecurityGroupIngressError::ClusterSecurityGroupNotFoundFault(parsed_error.message)),"InvalidClusterSecurityGroupState" => return RusotoError::Service(RevokeClusterSecurityGroupIngressError::InvalidClusterSecurityGroupStateFault(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 RevokeClusterSecurityGroupIngressError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RevokeClusterSecurityGroupIngressError {
fn description(&self) -> &str {
match *self {
RevokeClusterSecurityGroupIngressError::AuthorizationNotFoundFault(ref cause) => cause,
RevokeClusterSecurityGroupIngressError::ClusterSecurityGroupNotFoundFault(
ref cause,
) => cause,
RevokeClusterSecurityGroupIngressError::InvalidClusterSecurityGroupStateFault(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RevokeSnapshotAccessError {
AccessToSnapshotDeniedFault(String),
AuthorizationNotFoundFault(String),
ClusterSnapshotNotFoundFault(String),
}
impl RevokeSnapshotAccessError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RevokeSnapshotAccessError> {
{
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[..] {
"AccessToSnapshotDenied" => {
return RusotoError::Service(
RevokeSnapshotAccessError::AccessToSnapshotDeniedFault(
parsed_error.message,
),
)
}
"AuthorizationNotFound" => {
return RusotoError::Service(
RevokeSnapshotAccessError::AuthorizationNotFoundFault(
parsed_error.message,
),
)
}
"ClusterSnapshotNotFound" => {
return RusotoError::Service(
RevokeSnapshotAccessError::ClusterSnapshotNotFoundFault(
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 RevokeSnapshotAccessError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RevokeSnapshotAccessError {
fn description(&self) -> &str {
match *self {
RevokeSnapshotAccessError::AccessToSnapshotDeniedFault(ref cause) => cause,
RevokeSnapshotAccessError::AuthorizationNotFoundFault(ref cause) => cause,
RevokeSnapshotAccessError::ClusterSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RotateEncryptionKeyError {
ClusterNotFoundFault(String),
DependentServiceRequestThrottlingFault(String),
InvalidClusterStateFault(String),
}
impl RotateEncryptionKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RotateEncryptionKeyError> {
{
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[..] {
"ClusterNotFound" => {
return RusotoError::Service(
RotateEncryptionKeyError::ClusterNotFoundFault(parsed_error.message),
)
}
"DependentServiceRequestThrottlingFault" => {
return RusotoError::Service(
RotateEncryptionKeyError::DependentServiceRequestThrottlingFault(
parsed_error.message,
),
)
}
"InvalidClusterState" => {
return RusotoError::Service(
RotateEncryptionKeyError::InvalidClusterStateFault(
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 RotateEncryptionKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RotateEncryptionKeyError {
fn description(&self) -> &str {
match *self {
RotateEncryptionKeyError::ClusterNotFoundFault(ref cause) => cause,
RotateEncryptionKeyError::DependentServiceRequestThrottlingFault(ref cause) => cause,
RotateEncryptionKeyError::InvalidClusterStateFault(ref cause) => cause,
}
}
}
pub trait Redshift {
fn accept_reserved_node_exchange(
&self,
input: AcceptReservedNodeExchangeInputMessage,
) -> RusotoFuture<AcceptReservedNodeExchangeOutputMessage, AcceptReservedNodeExchangeError>;
fn authorize_cluster_security_group_ingress(
&self,
input: AuthorizeClusterSecurityGroupIngressMessage,
) -> RusotoFuture<
AuthorizeClusterSecurityGroupIngressResult,
AuthorizeClusterSecurityGroupIngressError,
>;
fn authorize_snapshot_access(
&self,
input: AuthorizeSnapshotAccessMessage,
) -> RusotoFuture<AuthorizeSnapshotAccessResult, AuthorizeSnapshotAccessError>;
fn batch_delete_cluster_snapshots(
&self,
input: BatchDeleteClusterSnapshotsRequest,
) -> RusotoFuture<BatchDeleteClusterSnapshotsResult, BatchDeleteClusterSnapshotsError>;
fn batch_modify_cluster_snapshots(
&self,
input: BatchModifyClusterSnapshotsMessage,
) -> RusotoFuture<BatchModifyClusterSnapshotsOutputMessage, BatchModifyClusterSnapshotsError>;
fn cancel_resize(
&self,
input: CancelResizeMessage,
) -> RusotoFuture<ResizeProgressMessage, CancelResizeError>;
fn copy_cluster_snapshot(
&self,
input: CopyClusterSnapshotMessage,
) -> RusotoFuture<CopyClusterSnapshotResult, CopyClusterSnapshotError>;
fn create_cluster(
&self,
input: CreateClusterMessage,
) -> RusotoFuture<CreateClusterResult, CreateClusterError>;
fn create_cluster_parameter_group(
&self,
input: CreateClusterParameterGroupMessage,
) -> RusotoFuture<CreateClusterParameterGroupResult, CreateClusterParameterGroupError>;
fn create_cluster_security_group(
&self,
input: CreateClusterSecurityGroupMessage,
) -> RusotoFuture<CreateClusterSecurityGroupResult, CreateClusterSecurityGroupError>;
fn create_cluster_snapshot(
&self,
input: CreateClusterSnapshotMessage,
) -> RusotoFuture<CreateClusterSnapshotResult, CreateClusterSnapshotError>;
fn create_cluster_subnet_group(
&self,
input: CreateClusterSubnetGroupMessage,
) -> RusotoFuture<CreateClusterSubnetGroupResult, CreateClusterSubnetGroupError>;
fn create_event_subscription(
&self,
input: CreateEventSubscriptionMessage,
) -> RusotoFuture<CreateEventSubscriptionResult, CreateEventSubscriptionError>;
fn create_hsm_client_certificate(
&self,
input: CreateHsmClientCertificateMessage,
) -> RusotoFuture<CreateHsmClientCertificateResult, CreateHsmClientCertificateError>;
fn create_hsm_configuration(
&self,
input: CreateHsmConfigurationMessage,
) -> RusotoFuture<CreateHsmConfigurationResult, CreateHsmConfigurationError>;
fn create_snapshot_copy_grant(
&self,
input: CreateSnapshotCopyGrantMessage,
) -> RusotoFuture<CreateSnapshotCopyGrantResult, CreateSnapshotCopyGrantError>;
fn create_snapshot_schedule(
&self,
input: CreateSnapshotScheduleMessage,
) -> RusotoFuture<SnapshotSchedule, CreateSnapshotScheduleError>;
fn create_tags(&self, input: CreateTagsMessage) -> RusotoFuture<(), CreateTagsError>;
fn delete_cluster(
&self,
input: DeleteClusterMessage,
) -> RusotoFuture<DeleteClusterResult, DeleteClusterError>;
fn delete_cluster_parameter_group(
&self,
input: DeleteClusterParameterGroupMessage,
) -> RusotoFuture<(), DeleteClusterParameterGroupError>;
fn delete_cluster_security_group(
&self,
input: DeleteClusterSecurityGroupMessage,
) -> RusotoFuture<(), DeleteClusterSecurityGroupError>;
fn delete_cluster_snapshot(
&self,
input: DeleteClusterSnapshotMessage,
) -> RusotoFuture<DeleteClusterSnapshotResult, DeleteClusterSnapshotError>;
fn delete_cluster_subnet_group(
&self,
input: DeleteClusterSubnetGroupMessage,
) -> RusotoFuture<(), DeleteClusterSubnetGroupError>;
fn delete_event_subscription(
&self,
input: DeleteEventSubscriptionMessage,
) -> RusotoFuture<(), DeleteEventSubscriptionError>;
fn delete_hsm_client_certificate(
&self,
input: DeleteHsmClientCertificateMessage,
) -> RusotoFuture<(), DeleteHsmClientCertificateError>;
fn delete_hsm_configuration(
&self,
input: DeleteHsmConfigurationMessage,
) -> RusotoFuture<(), DeleteHsmConfigurationError>;
fn delete_snapshot_copy_grant(
&self,
input: DeleteSnapshotCopyGrantMessage,
) -> RusotoFuture<(), DeleteSnapshotCopyGrantError>;
fn delete_snapshot_schedule(
&self,
input: DeleteSnapshotScheduleMessage,
) -> RusotoFuture<(), DeleteSnapshotScheduleError>;
fn delete_tags(&self, input: DeleteTagsMessage) -> RusotoFuture<(), DeleteTagsError>;
fn describe_account_attributes(
&self,
input: DescribeAccountAttributesMessage,
) -> RusotoFuture<AccountAttributeList, DescribeAccountAttributesError>;
fn describe_cluster_db_revisions(
&self,
input: DescribeClusterDbRevisionsMessage,
) -> RusotoFuture<ClusterDbRevisionsMessage, DescribeClusterDbRevisionsError>;
fn describe_cluster_parameter_groups(
&self,
input: DescribeClusterParameterGroupsMessage,
) -> RusotoFuture<ClusterParameterGroupsMessage, DescribeClusterParameterGroupsError>;
fn describe_cluster_parameters(
&self,
input: DescribeClusterParametersMessage,
) -> RusotoFuture<ClusterParameterGroupDetails, DescribeClusterParametersError>;
fn describe_cluster_security_groups(
&self,
input: DescribeClusterSecurityGroupsMessage,
) -> RusotoFuture<ClusterSecurityGroupMessage, DescribeClusterSecurityGroupsError>;
fn describe_cluster_snapshots(
&self,
input: DescribeClusterSnapshotsMessage,
) -> RusotoFuture<SnapshotMessage, DescribeClusterSnapshotsError>;
fn describe_cluster_subnet_groups(
&self,
input: DescribeClusterSubnetGroupsMessage,
) -> RusotoFuture<ClusterSubnetGroupMessage, DescribeClusterSubnetGroupsError>;
fn describe_cluster_tracks(
&self,
input: DescribeClusterTracksMessage,
) -> RusotoFuture<TrackListMessage, DescribeClusterTracksError>;
fn describe_cluster_versions(
&self,
input: DescribeClusterVersionsMessage,
) -> RusotoFuture<ClusterVersionsMessage, DescribeClusterVersionsError>;
fn describe_clusters(
&self,
input: DescribeClustersMessage,
) -> RusotoFuture<ClustersMessage, DescribeClustersError>;
fn describe_default_cluster_parameters(
&self,
input: DescribeDefaultClusterParametersMessage,
) -> RusotoFuture<DescribeDefaultClusterParametersResult, DescribeDefaultClusterParametersError>;
fn describe_event_categories(
&self,
input: DescribeEventCategoriesMessage,
) -> RusotoFuture<EventCategoriesMessage, DescribeEventCategoriesError>;
fn describe_event_subscriptions(
&self,
input: DescribeEventSubscriptionsMessage,
) -> RusotoFuture<EventSubscriptionsMessage, DescribeEventSubscriptionsError>;
fn describe_events(
&self,
input: DescribeEventsMessage,
) -> RusotoFuture<EventsMessage, DescribeEventsError>;
fn describe_hsm_client_certificates(
&self,
input: DescribeHsmClientCertificatesMessage,
) -> RusotoFuture<HsmClientCertificateMessage, DescribeHsmClientCertificatesError>;
fn describe_hsm_configurations(
&self,
input: DescribeHsmConfigurationsMessage,
) -> RusotoFuture<HsmConfigurationMessage, DescribeHsmConfigurationsError>;
fn describe_logging_status(
&self,
input: DescribeLoggingStatusMessage,
) -> RusotoFuture<LoggingStatus, DescribeLoggingStatusError>;
fn describe_orderable_cluster_options(
&self,
input: DescribeOrderableClusterOptionsMessage,
) -> RusotoFuture<OrderableClusterOptionsMessage, DescribeOrderableClusterOptionsError>;
fn describe_reserved_node_offerings(
&self,
input: DescribeReservedNodeOfferingsMessage,
) -> RusotoFuture<ReservedNodeOfferingsMessage, DescribeReservedNodeOfferingsError>;
fn describe_reserved_nodes(
&self,
input: DescribeReservedNodesMessage,
) -> RusotoFuture<ReservedNodesMessage, DescribeReservedNodesError>;
fn describe_resize(
&self,
input: DescribeResizeMessage,
) -> RusotoFuture<ResizeProgressMessage, DescribeResizeError>;
fn describe_snapshot_copy_grants(
&self,
input: DescribeSnapshotCopyGrantsMessage,
) -> RusotoFuture<SnapshotCopyGrantMessage, DescribeSnapshotCopyGrantsError>;
fn describe_snapshot_schedules(
&self,
input: DescribeSnapshotSchedulesMessage,
) -> RusotoFuture<DescribeSnapshotSchedulesOutputMessage, DescribeSnapshotSchedulesError>;
fn describe_storage(&self) -> RusotoFuture<CustomerStorageMessage, DescribeStorageError>;
fn describe_table_restore_status(
&self,
input: DescribeTableRestoreStatusMessage,
) -> RusotoFuture<TableRestoreStatusMessage, DescribeTableRestoreStatusError>;
fn describe_tags(
&self,
input: DescribeTagsMessage,
) -> RusotoFuture<TaggedResourceListMessage, DescribeTagsError>;
fn disable_logging(
&self,
input: DisableLoggingMessage,
) -> RusotoFuture<LoggingStatus, DisableLoggingError>;
fn disable_snapshot_copy(
&self,
input: DisableSnapshotCopyMessage,
) -> RusotoFuture<DisableSnapshotCopyResult, DisableSnapshotCopyError>;
fn enable_logging(
&self,
input: EnableLoggingMessage,
) -> RusotoFuture<LoggingStatus, EnableLoggingError>;
fn enable_snapshot_copy(
&self,
input: EnableSnapshotCopyMessage,
) -> RusotoFuture<EnableSnapshotCopyResult, EnableSnapshotCopyError>;
fn get_cluster_credentials(
&self,
input: GetClusterCredentialsMessage,
) -> RusotoFuture<ClusterCredentials, GetClusterCredentialsError>;
fn get_reserved_node_exchange_offerings(
&self,
input: GetReservedNodeExchangeOfferingsInputMessage,
) -> RusotoFuture<
GetReservedNodeExchangeOfferingsOutputMessage,
GetReservedNodeExchangeOfferingsError,
>;
fn modify_cluster(
&self,
input: ModifyClusterMessage,
) -> RusotoFuture<ModifyClusterResult, ModifyClusterError>;
fn modify_cluster_db_revision(
&self,
input: ModifyClusterDbRevisionMessage,
) -> RusotoFuture<ModifyClusterDbRevisionResult, ModifyClusterDbRevisionError>;
fn modify_cluster_iam_roles(
&self,
input: ModifyClusterIamRolesMessage,
) -> RusotoFuture<ModifyClusterIamRolesResult, ModifyClusterIamRolesError>;
fn modify_cluster_maintenance(
&self,
input: ModifyClusterMaintenanceMessage,
) -> RusotoFuture<ModifyClusterMaintenanceResult, ModifyClusterMaintenanceError>;
fn modify_cluster_parameter_group(
&self,
input: ModifyClusterParameterGroupMessage,
) -> RusotoFuture<ClusterParameterGroupNameMessage, ModifyClusterParameterGroupError>;
fn modify_cluster_snapshot(
&self,
input: ModifyClusterSnapshotMessage,
) -> RusotoFuture<ModifyClusterSnapshotResult, ModifyClusterSnapshotError>;
fn modify_cluster_snapshot_schedule(
&self,
input: ModifyClusterSnapshotScheduleMessage,
) -> RusotoFuture<(), ModifyClusterSnapshotScheduleError>;
fn modify_cluster_subnet_group(
&self,
input: ModifyClusterSubnetGroupMessage,
) -> RusotoFuture<ModifyClusterSubnetGroupResult, ModifyClusterSubnetGroupError>;
fn modify_event_subscription(
&self,
input: ModifyEventSubscriptionMessage,
) -> RusotoFuture<ModifyEventSubscriptionResult, ModifyEventSubscriptionError>;
fn modify_snapshot_copy_retention_period(
&self,
input: ModifySnapshotCopyRetentionPeriodMessage,
) -> RusotoFuture<ModifySnapshotCopyRetentionPeriodResult, ModifySnapshotCopyRetentionPeriodError>;
fn modify_snapshot_schedule(
&self,
input: ModifySnapshotScheduleMessage,
) -> RusotoFuture<SnapshotSchedule, ModifySnapshotScheduleError>;
fn purchase_reserved_node_offering(
&self,
input: PurchaseReservedNodeOfferingMessage,
) -> RusotoFuture<PurchaseReservedNodeOfferingResult, PurchaseReservedNodeOfferingError>;
fn reboot_cluster(
&self,
input: RebootClusterMessage,
) -> RusotoFuture<RebootClusterResult, RebootClusterError>;
fn reset_cluster_parameter_group(
&self,
input: ResetClusterParameterGroupMessage,
) -> RusotoFuture<ClusterParameterGroupNameMessage, ResetClusterParameterGroupError>;
fn resize_cluster(
&self,
input: ResizeClusterMessage,
) -> RusotoFuture<ResizeClusterResult, ResizeClusterError>;
fn restore_from_cluster_snapshot(
&self,
input: RestoreFromClusterSnapshotMessage,
) -> RusotoFuture<RestoreFromClusterSnapshotResult, RestoreFromClusterSnapshotError>;
fn restore_table_from_cluster_snapshot(
&self,
input: RestoreTableFromClusterSnapshotMessage,
) -> RusotoFuture<RestoreTableFromClusterSnapshotResult, RestoreTableFromClusterSnapshotError>;
fn revoke_cluster_security_group_ingress(
&self,
input: RevokeClusterSecurityGroupIngressMessage,
) -> RusotoFuture<RevokeClusterSecurityGroupIngressResult, RevokeClusterSecurityGroupIngressError>;
fn revoke_snapshot_access(
&self,
input: RevokeSnapshotAccessMessage,
) -> RusotoFuture<RevokeSnapshotAccessResult, RevokeSnapshotAccessError>;
fn rotate_encryption_key(
&self,
input: RotateEncryptionKeyMessage,
) -> RusotoFuture<RotateEncryptionKeyResult, RotateEncryptionKeyError>;
}
#[derive(Clone)]
pub struct RedshiftClient {
client: Client,
region: region::Region,
}
impl RedshiftClient {
pub fn new(region: region::Region) -> RedshiftClient {
RedshiftClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> RedshiftClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
RedshiftClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Redshift for RedshiftClient {
fn accept_reserved_node_exchange(
&self,
input: AcceptReservedNodeExchangeInputMessage,
) -> RusotoFuture<AcceptReservedNodeExchangeOutputMessage, AcceptReservedNodeExchangeError>
{
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AcceptReservedNodeExchange");
params.put("Version", "2012-12-01");
AcceptReservedNodeExchangeInputMessageSerializer::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(AcceptReservedNodeExchangeError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AcceptReservedNodeExchangeOutputMessage::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 = AcceptReservedNodeExchangeOutputMessageDeserializer::deserialize(
"AcceptReservedNodeExchangeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn authorize_cluster_security_group_ingress(
&self,
input: AuthorizeClusterSecurityGroupIngressMessage,
) -> RusotoFuture<
AuthorizeClusterSecurityGroupIngressResult,
AuthorizeClusterSecurityGroupIngressError,
> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AuthorizeClusterSecurityGroupIngress");
params.put("Version", "2012-12-01");
AuthorizeClusterSecurityGroupIngressMessageSerializer::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(AuthorizeClusterSecurityGroupIngressError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AuthorizeClusterSecurityGroupIngressResult::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 = AuthorizeClusterSecurityGroupIngressResultDeserializer::deserialize(
"AuthorizeClusterSecurityGroupIngressResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn authorize_snapshot_access(
&self,
input: AuthorizeSnapshotAccessMessage,
) -> RusotoFuture<AuthorizeSnapshotAccessResult, AuthorizeSnapshotAccessError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AuthorizeSnapshotAccess");
params.put("Version", "2012-12-01");
AuthorizeSnapshotAccessMessageSerializer::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(AuthorizeSnapshotAccessError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AuthorizeSnapshotAccessResult::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 = AuthorizeSnapshotAccessResultDeserializer::deserialize(
"AuthorizeSnapshotAccessResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn batch_delete_cluster_snapshots(
&self,
input: BatchDeleteClusterSnapshotsRequest,
) -> RusotoFuture<BatchDeleteClusterSnapshotsResult, BatchDeleteClusterSnapshotsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "BatchDeleteClusterSnapshots");
params.put("Version", "2012-12-01");
BatchDeleteClusterSnapshotsRequestSerializer::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(BatchDeleteClusterSnapshotsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = BatchDeleteClusterSnapshotsResult::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 = BatchDeleteClusterSnapshotsResultDeserializer::deserialize(
"BatchDeleteClusterSnapshotsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn batch_modify_cluster_snapshots(
&self,
input: BatchModifyClusterSnapshotsMessage,
) -> RusotoFuture<BatchModifyClusterSnapshotsOutputMessage, BatchModifyClusterSnapshotsError>
{
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "BatchModifyClusterSnapshots");
params.put("Version", "2012-12-01");
BatchModifyClusterSnapshotsMessageSerializer::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(BatchModifyClusterSnapshotsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = BatchModifyClusterSnapshotsOutputMessage::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 = BatchModifyClusterSnapshotsOutputMessageDeserializer::deserialize(
"BatchModifyClusterSnapshotsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn cancel_resize(
&self,
input: CancelResizeMessage,
) -> RusotoFuture<ResizeProgressMessage, CancelResizeError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CancelResize");
params.put("Version", "2012-12-01");
CancelResizeMessageSerializer::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(CancelResizeError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ResizeProgressMessage::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 = ResizeProgressMessageDeserializer::deserialize(
"CancelResizeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_cluster_snapshot(
&self,
input: CopyClusterSnapshotMessage,
) -> RusotoFuture<CopyClusterSnapshotResult, CopyClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyClusterSnapshot");
params.put("Version", "2012-12-01");
CopyClusterSnapshotMessageSerializer::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(CopyClusterSnapshotError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyClusterSnapshotResult::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 = CopyClusterSnapshotResultDeserializer::deserialize(
"CopyClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_cluster(
&self,
input: CreateClusterMessage,
) -> RusotoFuture<CreateClusterResult, CreateClusterError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateCluster");
params.put("Version", "2012-12-01");
CreateClusterMessageSerializer::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(CreateClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateClusterResult::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 = CreateClusterResultDeserializer::deserialize(
"CreateClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_cluster_parameter_group(
&self,
input: CreateClusterParameterGroupMessage,
) -> RusotoFuture<CreateClusterParameterGroupResult, CreateClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateClusterParameterGroup");
params.put("Version", "2012-12-01");
CreateClusterParameterGroupMessageSerializer::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(CreateClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateClusterParameterGroupResult::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 = CreateClusterParameterGroupResultDeserializer::deserialize(
"CreateClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_cluster_security_group(
&self,
input: CreateClusterSecurityGroupMessage,
) -> RusotoFuture<CreateClusterSecurityGroupResult, CreateClusterSecurityGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateClusterSecurityGroup");
params.put("Version", "2012-12-01");
CreateClusterSecurityGroupMessageSerializer::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(CreateClusterSecurityGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateClusterSecurityGroupResult::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 = CreateClusterSecurityGroupResultDeserializer::deserialize(
"CreateClusterSecurityGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_cluster_snapshot(
&self,
input: CreateClusterSnapshotMessage,
) -> RusotoFuture<CreateClusterSnapshotResult, CreateClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateClusterSnapshot");
params.put("Version", "2012-12-01");
CreateClusterSnapshotMessageSerializer::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(CreateClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateClusterSnapshotResult::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 = CreateClusterSnapshotResultDeserializer::deserialize(
"CreateClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_cluster_subnet_group(
&self,
input: CreateClusterSubnetGroupMessage,
) -> RusotoFuture<CreateClusterSubnetGroupResult, CreateClusterSubnetGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateClusterSubnetGroup");
params.put("Version", "2012-12-01");
CreateClusterSubnetGroupMessageSerializer::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(CreateClusterSubnetGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateClusterSubnetGroupResult::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 = CreateClusterSubnetGroupResultDeserializer::deserialize(
"CreateClusterSubnetGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_event_subscription(
&self,
input: CreateEventSubscriptionMessage,
) -> RusotoFuture<CreateEventSubscriptionResult, CreateEventSubscriptionError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateEventSubscription");
params.put("Version", "2012-12-01");
CreateEventSubscriptionMessageSerializer::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(CreateEventSubscriptionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateEventSubscriptionResult::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 = CreateEventSubscriptionResultDeserializer::deserialize(
"CreateEventSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_hsm_client_certificate(
&self,
input: CreateHsmClientCertificateMessage,
) -> RusotoFuture<CreateHsmClientCertificateResult, CreateHsmClientCertificateError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateHsmClientCertificate");
params.put("Version", "2012-12-01");
CreateHsmClientCertificateMessageSerializer::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(CreateHsmClientCertificateError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateHsmClientCertificateResult::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 = CreateHsmClientCertificateResultDeserializer::deserialize(
"CreateHsmClientCertificateResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_hsm_configuration(
&self,
input: CreateHsmConfigurationMessage,
) -> RusotoFuture<CreateHsmConfigurationResult, CreateHsmConfigurationError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateHsmConfiguration");
params.put("Version", "2012-12-01");
CreateHsmConfigurationMessageSerializer::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(CreateHsmConfigurationError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateHsmConfigurationResult::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 = CreateHsmConfigurationResultDeserializer::deserialize(
"CreateHsmConfigurationResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_snapshot_copy_grant(
&self,
input: CreateSnapshotCopyGrantMessage,
) -> RusotoFuture<CreateSnapshotCopyGrantResult, CreateSnapshotCopyGrantError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateSnapshotCopyGrant");
params.put("Version", "2012-12-01");
CreateSnapshotCopyGrantMessageSerializer::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(CreateSnapshotCopyGrantError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateSnapshotCopyGrantResult::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 = CreateSnapshotCopyGrantResultDeserializer::deserialize(
"CreateSnapshotCopyGrantResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_snapshot_schedule(
&self,
input: CreateSnapshotScheduleMessage,
) -> RusotoFuture<SnapshotSchedule, CreateSnapshotScheduleError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateSnapshotSchedule");
params.put("Version", "2012-12-01");
CreateSnapshotScheduleMessageSerializer::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(CreateSnapshotScheduleError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SnapshotSchedule::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 = SnapshotScheduleDeserializer::deserialize(
"CreateSnapshotScheduleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_tags(&self, input: CreateTagsMessage) -> RusotoFuture<(), CreateTagsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateTags");
params.put("Version", "2012-12-01");
CreateTagsMessageSerializer::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(CreateTagsError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_cluster(
&self,
input: DeleteClusterMessage,
) -> RusotoFuture<DeleteClusterResult, DeleteClusterError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteCluster");
params.put("Version", "2012-12-01");
DeleteClusterMessageSerializer::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(DeleteClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteClusterResult::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 = DeleteClusterResultDeserializer::deserialize(
"DeleteClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_cluster_parameter_group(
&self,
input: DeleteClusterParameterGroupMessage,
) -> RusotoFuture<(), DeleteClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteClusterParameterGroup");
params.put("Version", "2012-12-01");
DeleteClusterParameterGroupMessageSerializer::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(DeleteClusterParameterGroupError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_cluster_security_group(
&self,
input: DeleteClusterSecurityGroupMessage,
) -> RusotoFuture<(), DeleteClusterSecurityGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteClusterSecurityGroup");
params.put("Version", "2012-12-01");
DeleteClusterSecurityGroupMessageSerializer::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(DeleteClusterSecurityGroupError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_cluster_snapshot(
&self,
input: DeleteClusterSnapshotMessage,
) -> RusotoFuture<DeleteClusterSnapshotResult, DeleteClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteClusterSnapshot");
params.put("Version", "2012-12-01");
DeleteClusterSnapshotMessageSerializer::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(DeleteClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteClusterSnapshotResult::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 = DeleteClusterSnapshotResultDeserializer::deserialize(
"DeleteClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_cluster_subnet_group(
&self,
input: DeleteClusterSubnetGroupMessage,
) -> RusotoFuture<(), DeleteClusterSubnetGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteClusterSubnetGroup");
params.put("Version", "2012-12-01");
DeleteClusterSubnetGroupMessageSerializer::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(DeleteClusterSubnetGroupError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_event_subscription(
&self,
input: DeleteEventSubscriptionMessage,
) -> RusotoFuture<(), DeleteEventSubscriptionError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteEventSubscription");
params.put("Version", "2012-12-01");
DeleteEventSubscriptionMessageSerializer::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(DeleteEventSubscriptionError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_hsm_client_certificate(
&self,
input: DeleteHsmClientCertificateMessage,
) -> RusotoFuture<(), DeleteHsmClientCertificateError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteHsmClientCertificate");
params.put("Version", "2012-12-01");
DeleteHsmClientCertificateMessageSerializer::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(DeleteHsmClientCertificateError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_hsm_configuration(
&self,
input: DeleteHsmConfigurationMessage,
) -> RusotoFuture<(), DeleteHsmConfigurationError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteHsmConfiguration");
params.put("Version", "2012-12-01");
DeleteHsmConfigurationMessageSerializer::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(DeleteHsmConfigurationError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_snapshot_copy_grant(
&self,
input: DeleteSnapshotCopyGrantMessage,
) -> RusotoFuture<(), DeleteSnapshotCopyGrantError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteSnapshotCopyGrant");
params.put("Version", "2012-12-01");
DeleteSnapshotCopyGrantMessageSerializer::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(DeleteSnapshotCopyGrantError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_snapshot_schedule(
&self,
input: DeleteSnapshotScheduleMessage,
) -> RusotoFuture<(), DeleteSnapshotScheduleError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteSnapshotSchedule");
params.put("Version", "2012-12-01");
DeleteSnapshotScheduleMessageSerializer::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(DeleteSnapshotScheduleError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_tags(&self, input: DeleteTagsMessage) -> RusotoFuture<(), DeleteTagsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteTags");
params.put("Version", "2012-12-01");
DeleteTagsMessageSerializer::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(DeleteTagsError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn describe_account_attributes(
&self,
input: DescribeAccountAttributesMessage,
) -> RusotoFuture<AccountAttributeList, DescribeAccountAttributesError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeAccountAttributes");
params.put("Version", "2012-12-01");
DescribeAccountAttributesMessageSerializer::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(DescribeAccountAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AccountAttributeList::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 = AccountAttributeListDeserializer::deserialize(
"DescribeAccountAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_db_revisions(
&self,
input: DescribeClusterDbRevisionsMessage,
) -> RusotoFuture<ClusterDbRevisionsMessage, DescribeClusterDbRevisionsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterDbRevisions");
params.put("Version", "2012-12-01");
DescribeClusterDbRevisionsMessageSerializer::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(DescribeClusterDbRevisionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterDbRevisionsMessage::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 = ClusterDbRevisionsMessageDeserializer::deserialize(
"DescribeClusterDbRevisionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_parameter_groups(
&self,
input: DescribeClusterParameterGroupsMessage,
) -> RusotoFuture<ClusterParameterGroupsMessage, DescribeClusterParameterGroupsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterParameterGroups");
params.put("Version", "2012-12-01");
DescribeClusterParameterGroupsMessageSerializer::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(DescribeClusterParameterGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterParameterGroupsMessage::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 = ClusterParameterGroupsMessageDeserializer::deserialize(
"DescribeClusterParameterGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_parameters(
&self,
input: DescribeClusterParametersMessage,
) -> RusotoFuture<ClusterParameterGroupDetails, DescribeClusterParametersError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterParameters");
params.put("Version", "2012-12-01");
DescribeClusterParametersMessageSerializer::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(DescribeClusterParametersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterParameterGroupDetails::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 = ClusterParameterGroupDetailsDeserializer::deserialize(
"DescribeClusterParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_security_groups(
&self,
input: DescribeClusterSecurityGroupsMessage,
) -> RusotoFuture<ClusterSecurityGroupMessage, DescribeClusterSecurityGroupsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterSecurityGroups");
params.put("Version", "2012-12-01");
DescribeClusterSecurityGroupsMessageSerializer::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(DescribeClusterSecurityGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterSecurityGroupMessage::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 = ClusterSecurityGroupMessageDeserializer::deserialize(
"DescribeClusterSecurityGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_snapshots(
&self,
input: DescribeClusterSnapshotsMessage,
) -> RusotoFuture<SnapshotMessage, DescribeClusterSnapshotsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterSnapshots");
params.put("Version", "2012-12-01");
DescribeClusterSnapshotsMessageSerializer::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(DescribeClusterSnapshotsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SnapshotMessage::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 = SnapshotMessageDeserializer::deserialize(
"DescribeClusterSnapshotsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_subnet_groups(
&self,
input: DescribeClusterSubnetGroupsMessage,
) -> RusotoFuture<ClusterSubnetGroupMessage, DescribeClusterSubnetGroupsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterSubnetGroups");
params.put("Version", "2012-12-01");
DescribeClusterSubnetGroupsMessageSerializer::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(DescribeClusterSubnetGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterSubnetGroupMessage::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 = ClusterSubnetGroupMessageDeserializer::deserialize(
"DescribeClusterSubnetGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_tracks(
&self,
input: DescribeClusterTracksMessage,
) -> RusotoFuture<TrackListMessage, DescribeClusterTracksError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterTracks");
params.put("Version", "2012-12-01");
DescribeClusterTracksMessageSerializer::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(DescribeClusterTracksError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = TrackListMessage::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 = TrackListMessageDeserializer::deserialize(
"DescribeClusterTracksResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_cluster_versions(
&self,
input: DescribeClusterVersionsMessage,
) -> RusotoFuture<ClusterVersionsMessage, DescribeClusterVersionsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusterVersions");
params.put("Version", "2012-12-01");
DescribeClusterVersionsMessageSerializer::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(DescribeClusterVersionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterVersionsMessage::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 = ClusterVersionsMessageDeserializer::deserialize(
"DescribeClusterVersionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_clusters(
&self,
input: DescribeClustersMessage,
) -> RusotoFuture<ClustersMessage, DescribeClustersError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeClusters");
params.put("Version", "2012-12-01");
DescribeClustersMessageSerializer::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(DescribeClustersError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClustersMessage::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 = ClustersMessageDeserializer::deserialize(
"DescribeClustersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_default_cluster_parameters(
&self,
input: DescribeDefaultClusterParametersMessage,
) -> RusotoFuture<DescribeDefaultClusterParametersResult, DescribeDefaultClusterParametersError>
{
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDefaultClusterParameters");
params.put("Version", "2012-12-01");
DescribeDefaultClusterParametersMessageSerializer::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(DescribeDefaultClusterParametersError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeDefaultClusterParametersResult::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 = DescribeDefaultClusterParametersResultDeserializer::deserialize(
"DescribeDefaultClusterParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_event_categories(
&self,
input: DescribeEventCategoriesMessage,
) -> RusotoFuture<EventCategoriesMessage, DescribeEventCategoriesError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEventCategories");
params.put("Version", "2012-12-01");
DescribeEventCategoriesMessageSerializer::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(DescribeEventCategoriesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EventCategoriesMessage::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 = EventCategoriesMessageDeserializer::deserialize(
"DescribeEventCategoriesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_event_subscriptions(
&self,
input: DescribeEventSubscriptionsMessage,
) -> RusotoFuture<EventSubscriptionsMessage, DescribeEventSubscriptionsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEventSubscriptions");
params.put("Version", "2012-12-01");
DescribeEventSubscriptionsMessageSerializer::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(DescribeEventSubscriptionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EventSubscriptionsMessage::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 = EventSubscriptionsMessageDeserializer::deserialize(
"DescribeEventSubscriptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_events(
&self,
input: DescribeEventsMessage,
) -> RusotoFuture<EventsMessage, DescribeEventsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEvents");
params.put("Version", "2012-12-01");
DescribeEventsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeEventsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EventsMessage::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 =
EventsMessageDeserializer::deserialize("DescribeEventsResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_hsm_client_certificates(
&self,
input: DescribeHsmClientCertificatesMessage,
) -> RusotoFuture<HsmClientCertificateMessage, DescribeHsmClientCertificatesError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeHsmClientCertificates");
params.put("Version", "2012-12-01");
DescribeHsmClientCertificatesMessageSerializer::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(DescribeHsmClientCertificatesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = HsmClientCertificateMessage::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 = HsmClientCertificateMessageDeserializer::deserialize(
"DescribeHsmClientCertificatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_hsm_configurations(
&self,
input: DescribeHsmConfigurationsMessage,
) -> RusotoFuture<HsmConfigurationMessage, DescribeHsmConfigurationsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeHsmConfigurations");
params.put("Version", "2012-12-01");
DescribeHsmConfigurationsMessageSerializer::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(DescribeHsmConfigurationsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = HsmConfigurationMessage::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 = HsmConfigurationMessageDeserializer::deserialize(
"DescribeHsmConfigurationsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_logging_status(
&self,
input: DescribeLoggingStatusMessage,
) -> RusotoFuture<LoggingStatus, DescribeLoggingStatusError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeLoggingStatus");
params.put("Version", "2012-12-01");
DescribeLoggingStatusMessageSerializer::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(DescribeLoggingStatusError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = LoggingStatus::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 = LoggingStatusDeserializer::deserialize(
"DescribeLoggingStatusResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_orderable_cluster_options(
&self,
input: DescribeOrderableClusterOptionsMessage,
) -> RusotoFuture<OrderableClusterOptionsMessage, DescribeOrderableClusterOptionsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeOrderableClusterOptions");
params.put("Version", "2012-12-01");
DescribeOrderableClusterOptionsMessageSerializer::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(DescribeOrderableClusterOptionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = OrderableClusterOptionsMessage::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 = OrderableClusterOptionsMessageDeserializer::deserialize(
"DescribeOrderableClusterOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_reserved_node_offerings(
&self,
input: DescribeReservedNodeOfferingsMessage,
) -> RusotoFuture<ReservedNodeOfferingsMessage, DescribeReservedNodeOfferingsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeReservedNodeOfferings");
params.put("Version", "2012-12-01");
DescribeReservedNodeOfferingsMessageSerializer::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(DescribeReservedNodeOfferingsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ReservedNodeOfferingsMessage::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 = ReservedNodeOfferingsMessageDeserializer::deserialize(
"DescribeReservedNodeOfferingsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_reserved_nodes(
&self,
input: DescribeReservedNodesMessage,
) -> RusotoFuture<ReservedNodesMessage, DescribeReservedNodesError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeReservedNodes");
params.put("Version", "2012-12-01");
DescribeReservedNodesMessageSerializer::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(DescribeReservedNodesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ReservedNodesMessage::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 = ReservedNodesMessageDeserializer::deserialize(
"DescribeReservedNodesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_resize(
&self,
input: DescribeResizeMessage,
) -> RusotoFuture<ResizeProgressMessage, DescribeResizeError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeResize");
params.put("Version", "2012-12-01");
DescribeResizeMessageSerializer::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(DescribeResizeError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ResizeProgressMessage::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 = ResizeProgressMessageDeserializer::deserialize(
"DescribeResizeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_snapshot_copy_grants(
&self,
input: DescribeSnapshotCopyGrantsMessage,
) -> RusotoFuture<SnapshotCopyGrantMessage, DescribeSnapshotCopyGrantsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeSnapshotCopyGrants");
params.put("Version", "2012-12-01");
DescribeSnapshotCopyGrantsMessageSerializer::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(DescribeSnapshotCopyGrantsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SnapshotCopyGrantMessage::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 = SnapshotCopyGrantMessageDeserializer::deserialize(
"DescribeSnapshotCopyGrantsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_snapshot_schedules(
&self,
input: DescribeSnapshotSchedulesMessage,
) -> RusotoFuture<DescribeSnapshotSchedulesOutputMessage, DescribeSnapshotSchedulesError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeSnapshotSchedules");
params.put("Version", "2012-12-01");
DescribeSnapshotSchedulesMessageSerializer::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(DescribeSnapshotSchedulesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeSnapshotSchedulesOutputMessage::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 = DescribeSnapshotSchedulesOutputMessageDeserializer::deserialize(
"DescribeSnapshotSchedulesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_storage(&self) -> RusotoFuture<CustomerStorageMessage, DescribeStorageError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeStorage");
params.put("Version", "2012-12-01");
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeStorageError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CustomerStorageMessage::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 = CustomerStorageMessageDeserializer::deserialize(
"DescribeStorageResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_table_restore_status(
&self,
input: DescribeTableRestoreStatusMessage,
) -> RusotoFuture<TableRestoreStatusMessage, DescribeTableRestoreStatusError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeTableRestoreStatus");
params.put("Version", "2012-12-01");
DescribeTableRestoreStatusMessageSerializer::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(DescribeTableRestoreStatusError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = TableRestoreStatusMessage::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 = TableRestoreStatusMessageDeserializer::deserialize(
"DescribeTableRestoreStatusResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_tags(
&self,
input: DescribeTagsMessage,
) -> RusotoFuture<TaggedResourceListMessage, DescribeTagsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeTags");
params.put("Version", "2012-12-01");
DescribeTagsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeTagsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = TaggedResourceListMessage::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 = TaggedResourceListMessageDeserializer::deserialize(
"DescribeTagsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn disable_logging(
&self,
input: DisableLoggingMessage,
) -> RusotoFuture<LoggingStatus, DisableLoggingError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DisableLogging");
params.put("Version", "2012-12-01");
DisableLoggingMessageSerializer::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(DisableLoggingError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = LoggingStatus::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 =
LoggingStatusDeserializer::deserialize("DisableLoggingResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn disable_snapshot_copy(
&self,
input: DisableSnapshotCopyMessage,
) -> RusotoFuture<DisableSnapshotCopyResult, DisableSnapshotCopyError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DisableSnapshotCopy");
params.put("Version", "2012-12-01");
DisableSnapshotCopyMessageSerializer::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(DisableSnapshotCopyError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DisableSnapshotCopyResult::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 = DisableSnapshotCopyResultDeserializer::deserialize(
"DisableSnapshotCopyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn enable_logging(
&self,
input: EnableLoggingMessage,
) -> RusotoFuture<LoggingStatus, EnableLoggingError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "EnableLogging");
params.put("Version", "2012-12-01");
EnableLoggingMessageSerializer::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(EnableLoggingError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = LoggingStatus::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 =
LoggingStatusDeserializer::deserialize("EnableLoggingResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn enable_snapshot_copy(
&self,
input: EnableSnapshotCopyMessage,
) -> RusotoFuture<EnableSnapshotCopyResult, EnableSnapshotCopyError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "EnableSnapshotCopy");
params.put("Version", "2012-12-01");
EnableSnapshotCopyMessageSerializer::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(EnableSnapshotCopyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EnableSnapshotCopyResult::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 = EnableSnapshotCopyResultDeserializer::deserialize(
"EnableSnapshotCopyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_cluster_credentials(
&self,
input: GetClusterCredentialsMessage,
) -> RusotoFuture<ClusterCredentials, GetClusterCredentialsError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetClusterCredentials");
params.put("Version", "2012-12-01");
GetClusterCredentialsMessageSerializer::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(GetClusterCredentialsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterCredentials::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 = ClusterCredentialsDeserializer::deserialize(
"GetClusterCredentialsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn get_reserved_node_exchange_offerings(
&self,
input: GetReservedNodeExchangeOfferingsInputMessage,
) -> RusotoFuture<
GetReservedNodeExchangeOfferingsOutputMessage,
GetReservedNodeExchangeOfferingsError,
> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "GetReservedNodeExchangeOfferings");
params.put("Version", "2012-12-01");
GetReservedNodeExchangeOfferingsInputMessageSerializer::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(GetReservedNodeExchangeOfferingsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GetReservedNodeExchangeOfferingsOutputMessage::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 =
GetReservedNodeExchangeOfferingsOutputMessageDeserializer::deserialize(
"GetReservedNodeExchangeOfferingsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_cluster(
&self,
input: ModifyClusterMessage,
) -> RusotoFuture<ModifyClusterResult, ModifyClusterError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyCluster");
params.put("Version", "2012-12-01");
ModifyClusterMessageSerializer::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(ModifyClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyClusterResult::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 = ModifyClusterResultDeserializer::deserialize(
"ModifyClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_cluster_db_revision(
&self,
input: ModifyClusterDbRevisionMessage,
) -> RusotoFuture<ModifyClusterDbRevisionResult, ModifyClusterDbRevisionError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyClusterDbRevision");
params.put("Version", "2012-12-01");
ModifyClusterDbRevisionMessageSerializer::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(ModifyClusterDbRevisionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyClusterDbRevisionResult::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 = ModifyClusterDbRevisionResultDeserializer::deserialize(
"ModifyClusterDbRevisionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_cluster_iam_roles(
&self,
input: ModifyClusterIamRolesMessage,
) -> RusotoFuture<ModifyClusterIamRolesResult, ModifyClusterIamRolesError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyClusterIamRoles");
params.put("Version", "2012-12-01");
ModifyClusterIamRolesMessageSerializer::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(ModifyClusterIamRolesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyClusterIamRolesResult::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 = ModifyClusterIamRolesResultDeserializer::deserialize(
"ModifyClusterIamRolesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_cluster_maintenance(
&self,
input: ModifyClusterMaintenanceMessage,
) -> RusotoFuture<ModifyClusterMaintenanceResult, ModifyClusterMaintenanceError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyClusterMaintenance");
params.put("Version", "2012-12-01");
ModifyClusterMaintenanceMessageSerializer::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(ModifyClusterMaintenanceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyClusterMaintenanceResult::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 = ModifyClusterMaintenanceResultDeserializer::deserialize(
"ModifyClusterMaintenanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_cluster_parameter_group(
&self,
input: ModifyClusterParameterGroupMessage,
) -> RusotoFuture<ClusterParameterGroupNameMessage, ModifyClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyClusterParameterGroup");
params.put("Version", "2012-12-01");
ModifyClusterParameterGroupMessageSerializer::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(ModifyClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterParameterGroupNameMessage::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 = ClusterParameterGroupNameMessageDeserializer::deserialize(
"ModifyClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_cluster_snapshot(
&self,
input: ModifyClusterSnapshotMessage,
) -> RusotoFuture<ModifyClusterSnapshotResult, ModifyClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyClusterSnapshot");
params.put("Version", "2012-12-01");
ModifyClusterSnapshotMessageSerializer::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(ModifyClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyClusterSnapshotResult::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 = ModifyClusterSnapshotResultDeserializer::deserialize(
"ModifyClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_cluster_snapshot_schedule(
&self,
input: ModifyClusterSnapshotScheduleMessage,
) -> RusotoFuture<(), ModifyClusterSnapshotScheduleError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyClusterSnapshotSchedule");
params.put("Version", "2012-12-01");
ModifyClusterSnapshotScheduleMessageSerializer::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(ModifyClusterSnapshotScheduleError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn modify_cluster_subnet_group(
&self,
input: ModifyClusterSubnetGroupMessage,
) -> RusotoFuture<ModifyClusterSubnetGroupResult, ModifyClusterSubnetGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyClusterSubnetGroup");
params.put("Version", "2012-12-01");
ModifyClusterSubnetGroupMessageSerializer::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(ModifyClusterSubnetGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyClusterSubnetGroupResult::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 = ModifyClusterSubnetGroupResultDeserializer::deserialize(
"ModifyClusterSubnetGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_event_subscription(
&self,
input: ModifyEventSubscriptionMessage,
) -> RusotoFuture<ModifyEventSubscriptionResult, ModifyEventSubscriptionError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyEventSubscription");
params.put("Version", "2012-12-01");
ModifyEventSubscriptionMessageSerializer::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(ModifyEventSubscriptionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyEventSubscriptionResult::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 = ModifyEventSubscriptionResultDeserializer::deserialize(
"ModifyEventSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_snapshot_copy_retention_period(
&self,
input: ModifySnapshotCopyRetentionPeriodMessage,
) -> RusotoFuture<ModifySnapshotCopyRetentionPeriodResult, ModifySnapshotCopyRetentionPeriodError>
{
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifySnapshotCopyRetentionPeriod");
params.put("Version", "2012-12-01");
ModifySnapshotCopyRetentionPeriodMessageSerializer::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(ModifySnapshotCopyRetentionPeriodError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifySnapshotCopyRetentionPeriodResult::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 = ModifySnapshotCopyRetentionPeriodResultDeserializer::deserialize(
"ModifySnapshotCopyRetentionPeriodResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_snapshot_schedule(
&self,
input: ModifySnapshotScheduleMessage,
) -> RusotoFuture<SnapshotSchedule, ModifySnapshotScheduleError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifySnapshotSchedule");
params.put("Version", "2012-12-01");
ModifySnapshotScheduleMessageSerializer::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(ModifySnapshotScheduleError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SnapshotSchedule::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 = SnapshotScheduleDeserializer::deserialize(
"ModifySnapshotScheduleResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn purchase_reserved_node_offering(
&self,
input: PurchaseReservedNodeOfferingMessage,
) -> RusotoFuture<PurchaseReservedNodeOfferingResult, PurchaseReservedNodeOfferingError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PurchaseReservedNodeOffering");
params.put("Version", "2012-12-01");
PurchaseReservedNodeOfferingMessageSerializer::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(PurchaseReservedNodeOfferingError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PurchaseReservedNodeOfferingResult::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 = PurchaseReservedNodeOfferingResultDeserializer::deserialize(
"PurchaseReservedNodeOfferingResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn reboot_cluster(
&self,
input: RebootClusterMessage,
) -> RusotoFuture<RebootClusterResult, RebootClusterError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RebootCluster");
params.put("Version", "2012-12-01");
RebootClusterMessageSerializer::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(RebootClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RebootClusterResult::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 = RebootClusterResultDeserializer::deserialize(
"RebootClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn reset_cluster_parameter_group(
&self,
input: ResetClusterParameterGroupMessage,
) -> RusotoFuture<ClusterParameterGroupNameMessage, ResetClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResetClusterParameterGroup");
params.put("Version", "2012-12-01");
ResetClusterParameterGroupMessageSerializer::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(ResetClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ClusterParameterGroupNameMessage::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 = ClusterParameterGroupNameMessageDeserializer::deserialize(
"ResetClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn resize_cluster(
&self,
input: ResizeClusterMessage,
) -> RusotoFuture<ResizeClusterResult, ResizeClusterError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResizeCluster");
params.put("Version", "2012-12-01");
ResizeClusterMessageSerializer::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(ResizeClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ResizeClusterResult::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 = ResizeClusterResultDeserializer::deserialize(
"ResizeClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn restore_from_cluster_snapshot(
&self,
input: RestoreFromClusterSnapshotMessage,
) -> RusotoFuture<RestoreFromClusterSnapshotResult, RestoreFromClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreFromClusterSnapshot");
params.put("Version", "2012-12-01");
RestoreFromClusterSnapshotMessageSerializer::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(RestoreFromClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreFromClusterSnapshotResult::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 = RestoreFromClusterSnapshotResultDeserializer::deserialize(
"RestoreFromClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn restore_table_from_cluster_snapshot(
&self,
input: RestoreTableFromClusterSnapshotMessage,
) -> RusotoFuture<RestoreTableFromClusterSnapshotResult, RestoreTableFromClusterSnapshotError>
{
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreTableFromClusterSnapshot");
params.put("Version", "2012-12-01");
RestoreTableFromClusterSnapshotMessageSerializer::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(RestoreTableFromClusterSnapshotError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreTableFromClusterSnapshotResult::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 = RestoreTableFromClusterSnapshotResultDeserializer::deserialize(
"RestoreTableFromClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn revoke_cluster_security_group_ingress(
&self,
input: RevokeClusterSecurityGroupIngressMessage,
) -> RusotoFuture<RevokeClusterSecurityGroupIngressResult, RevokeClusterSecurityGroupIngressError>
{
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RevokeClusterSecurityGroupIngress");
params.put("Version", "2012-12-01");
RevokeClusterSecurityGroupIngressMessageSerializer::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(RevokeClusterSecurityGroupIngressError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RevokeClusterSecurityGroupIngressResult::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 = RevokeClusterSecurityGroupIngressResultDeserializer::deserialize(
"RevokeClusterSecurityGroupIngressResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn revoke_snapshot_access(
&self,
input: RevokeSnapshotAccessMessage,
) -> RusotoFuture<RevokeSnapshotAccessResult, RevokeSnapshotAccessError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RevokeSnapshotAccess");
params.put("Version", "2012-12-01");
RevokeSnapshotAccessMessageSerializer::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(RevokeSnapshotAccessError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RevokeSnapshotAccessResult::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 = RevokeSnapshotAccessResultDeserializer::deserialize(
"RevokeSnapshotAccessResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn rotate_encryption_key(
&self,
input: RotateEncryptionKeyMessage,
) -> RusotoFuture<RotateEncryptionKeyResult, RotateEncryptionKeyError> {
let mut request = SignedRequest::new("POST", "redshift", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RotateEncryptionKey");
params.put("Version", "2012-12-01");
RotateEncryptionKeyMessageSerializer::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(RotateEncryptionKeyError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RotateEncryptionKeyResult::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 = RotateEncryptionKeyResultDeserializer::deserialize(
"RotateEncryptionKeyResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
}
#[cfg(test)]
mod protocol_tests {
extern crate rusoto_mock;
use self::rusoto_mock::*;
use super::*;
use rusoto_core::Region as rusoto_region;
#[test]
fn test_parse_valid_redshift_authorize_cluster_security_group_ingress() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-authorize-cluster-security-group-ingress.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = AuthorizeClusterSecurityGroupIngressMessage::default();
let result = client
.authorize_cluster_security_group_ingress(request)
.sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_copy_cluster_snapshot() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-copy-cluster-snapshot.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CopyClusterSnapshotMessage::default();
let result = client.copy_cluster_snapshot(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_create_cluster_parameter_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-create-cluster-parameter-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateClusterParameterGroupMessage::default();
let result = client.create_cluster_parameter_group(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_create_cluster_security_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-create-cluster-security-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateClusterSecurityGroupMessage::default();
let result = client.create_cluster_security_group(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_create_cluster_snapshot() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-create-cluster-snapshot.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateClusterSnapshotMessage::default();
let result = client.create_cluster_snapshot(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_create_cluster_subnet_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-create-cluster-subnet-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateClusterSubnetGroupMessage::default();
let result = client.create_cluster_subnet_group(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_create_cluster() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-create-cluster.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = CreateClusterMessage::default();
let result = client.create_cluster(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_delete_cluster_parameter_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-delete-cluster-parameter-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DeleteClusterParameterGroupMessage::default();
let result = client.delete_cluster_parameter_group(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_delete_cluster_snapshot() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-delete-cluster-snapshot.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DeleteClusterSnapshotMessage::default();
let result = client.delete_cluster_snapshot(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_delete_cluster() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-delete-cluster.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DeleteClusterMessage::default();
let result = client.delete_cluster(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_cluster_parameter_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-cluster-parameter-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeClusterParameterGroupsMessage::default();
let result = client.describe_cluster_parameter_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_cluster_parameters() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-cluster-parameters.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeClusterParametersMessage::default();
let result = client.describe_cluster_parameters(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_cluster_security_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-cluster-security-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeClusterSecurityGroupsMessage::default();
let result = client.describe_cluster_security_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_cluster_snapshots() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-cluster-snapshots.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeClusterSnapshotsMessage::default();
let result = client.describe_cluster_snapshots(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_cluster_subnet_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-cluster-subnet-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeClusterSubnetGroupsMessage::default();
let result = client.describe_cluster_subnet_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_cluster_versions() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-cluster-versions.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeClusterVersionsMessage::default();
let result = client.describe_cluster_versions(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_clusters() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-clusters.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeClustersMessage::default();
let result = client.describe_clusters(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_events() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-events.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeEventsMessage::default();
let result = client.describe_events(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_orderable_cluster_options() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-orderable-cluster-options.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeOrderableClusterOptionsMessage::default();
let result = client.describe_orderable_cluster_options(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_reserved_node_offerings() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-reserved-node-offerings.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeReservedNodeOfferingsMessage::default();
let result = client.describe_reserved_node_offerings(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_reserved_nodes() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-reserved-nodes.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeReservedNodesMessage::default();
let result = client.describe_reserved_nodes(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_describe_resize() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-describe-resize.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeResizeMessage::default();
let result = client.describe_resize(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_modify_cluster_parameter_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-modify-cluster-parameter-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ModifyClusterParameterGroupMessage::default();
let result = client.modify_cluster_parameter_group(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_purchase_reserved_node_offering() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-purchase-reserved-node-offering.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = PurchaseReservedNodeOfferingMessage::default();
let result = client.purchase_reserved_node_offering(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_reboot_cluster() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-reboot-cluster.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = RebootClusterMessage::default();
let result = client.reboot_cluster(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_reset_cluster_parameter_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-reset-cluster-parameter-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = ResetClusterParameterGroupMessage::default();
let result = client.reset_cluster_parameter_group(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_restore_from_cluster_snapshot() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-restore-from-cluster-snapshot.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = RestoreFromClusterSnapshotMessage::default();
let result = client.restore_from_cluster_snapshot(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_redshift_revoke_cluster_security_group_ingress() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-revoke-cluster-security-group-ingress.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client =
RedshiftClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = RevokeClusterSecurityGroupIngressMessage::default();
let result = client.revoke_cluster_security_group_ingress(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}