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 AddRoleToDBClusterMessage {
pub db_cluster_identifier: String,
pub role_arn: String,
}
struct AddRoleToDBClusterMessageSerializer;
impl AddRoleToDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddRoleToDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
params.put(&format!("{}{}", prefix, "RoleArn"), &obj.role_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddSourceIdentifierToSubscriptionMessage {
pub source_identifier: String,
pub subscription_name: String,
}
struct AddSourceIdentifierToSubscriptionMessageSerializer;
impl AddSourceIdentifierToSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddSourceIdentifierToSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceIdentifier"),
&obj.source_identifier,
);
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddSourceIdentifierToSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct AddSourceIdentifierToSubscriptionResultDeserializer;
impl AddSourceIdentifierToSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AddSourceIdentifierToSubscriptionResult, XmlParseError> {
deserialize_elements::<_, AddSourceIdentifierToSubscriptionResult, _>(
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 AddTagsToResourceMessage {
pub resource_name: String,
pub tags: Vec<Tag>,
}
struct AddTagsToResourceMessageSerializer;
impl AddTagsToResourceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddTagsToResourceMessage) {
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);
}
}
struct ApplyMethodDeserializer;
impl ApplyMethodDeserializer {
#[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 ApplyPendingMaintenanceActionMessage {
pub apply_action: String,
pub opt_in_type: String,
pub resource_identifier: String,
}
struct ApplyPendingMaintenanceActionMessageSerializer;
impl ApplyPendingMaintenanceActionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ApplyPendingMaintenanceActionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ApplyAction"), &obj.apply_action);
params.put(&format!("{}{}", prefix, "OptInType"), &obj.opt_in_type);
params.put(
&format!("{}{}", prefix, "ResourceIdentifier"),
&obj.resource_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplyPendingMaintenanceActionResult {
pub resource_pending_maintenance_actions: Option<ResourcePendingMaintenanceActions>,
}
struct ApplyPendingMaintenanceActionResultDeserializer;
impl ApplyPendingMaintenanceActionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplyPendingMaintenanceActionResult, XmlParseError> {
deserialize_elements::<_, ApplyPendingMaintenanceActionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ResourcePendingMaintenanceActions" => {
obj.resource_pending_maintenance_actions =
Some(ResourcePendingMaintenanceActionsDeserializer::deserialize(
"ResourcePendingMaintenanceActions",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AttributeValueListDeserializer;
impl AttributeValueListDeserializer {
#[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 == "AttributeValue" {
obj.push(StringDeserializer::deserialize("AttributeValue", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AttributeValueListSerializer;
impl AttributeValueListSerializer {
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 AvailabilityZone {
pub name: Option<String>,
}
struct AvailabilityZoneDeserializer;
impl AvailabilityZoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AvailabilityZone, XmlParseError> {
deserialize_elements::<_, AvailabilityZone, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", 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(())
})
}
}
struct AvailabilityZonesDeserializer;
impl AvailabilityZonesDeserializer {
#[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 == "AvailabilityZone" {
obj.push(StringDeserializer::deserialize("AvailabilityZone", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AvailabilityZonesSerializer;
impl AvailabilityZonesSerializer {
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 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 CharacterSet {
pub character_set_description: Option<String>,
pub character_set_name: Option<String>,
}
struct CharacterSetDeserializer;
impl CharacterSetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CharacterSet, XmlParseError> {
deserialize_elements::<_, CharacterSet, _>(tag_name, stack, |name, stack, obj| {
match name {
"CharacterSetDescription" => {
obj.character_set_description = Some(StringDeserializer::deserialize(
"CharacterSetDescription",
stack,
)?);
}
"CharacterSetName" => {
obj.character_set_name =
Some(StringDeserializer::deserialize("CharacterSetName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CloudwatchLogsExportConfiguration {
pub disable_log_types: Option<Vec<String>>,
pub enable_log_types: Option<Vec<String>>,
}
struct CloudwatchLogsExportConfigurationSerializer;
impl CloudwatchLogsExportConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CloudwatchLogsExportConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.disable_log_types {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "DisableLogTypes"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_log_types {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableLogTypes"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterParameterGroupMessage {
pub source_db_cluster_parameter_group_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_db_cluster_parameter_group_description: String,
pub target_db_cluster_parameter_group_identifier: String,
}
struct CopyDBClusterParameterGroupMessageSerializer;
impl CopyDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceDBClusterParameterGroupIdentifier"),
&obj.source_db_cluster_parameter_group_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBClusterParameterGroupDescription"),
&obj.target_db_cluster_parameter_group_description,
);
params.put(
&format!("{}{}", prefix, "TargetDBClusterParameterGroupIdentifier"),
&obj.target_db_cluster_parameter_group_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterParameterGroupResult {
pub db_cluster_parameter_group: Option<DBClusterParameterGroup>,
}
struct CopyDBClusterParameterGroupResultDeserializer;
impl CopyDBClusterParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyDBClusterParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CopyDBClusterParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroup" => {
obj.db_cluster_parameter_group =
Some(DBClusterParameterGroupDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterSnapshotMessage {
pub copy_tags: Option<bool>,
pub kms_key_id: Option<String>,
pub pre_signed_url: Option<String>,
pub source_db_cluster_snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_db_cluster_snapshot_identifier: String,
}
struct CopyDBClusterSnapshotMessageSerializer;
impl CopyDBClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyDBClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.copy_tags {
params.put(&format!("{}{}", prefix, "CopyTags"), &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.pre_signed_url {
params.put(&format!("{}{}", prefix, "PreSignedUrl"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SourceDBClusterSnapshotIdentifier"),
&obj.source_db_cluster_snapshot_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBClusterSnapshotIdentifier"),
&obj.target_db_cluster_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterSnapshotResult {
pub db_cluster_snapshot: Option<DBClusterSnapshot>,
}
struct CopyDBClusterSnapshotResultDeserializer;
impl CopyDBClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyDBClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, CopyDBClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshot" => {
obj.db_cluster_snapshot = Some(DBClusterSnapshotDeserializer::deserialize(
"DBClusterSnapshot",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBParameterGroupMessage {
pub source_db_parameter_group_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_db_parameter_group_description: String,
pub target_db_parameter_group_identifier: String,
}
struct CopyDBParameterGroupMessageSerializer;
impl CopyDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceDBParameterGroupIdentifier"),
&obj.source_db_parameter_group_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBParameterGroupDescription"),
&obj.target_db_parameter_group_description,
);
params.put(
&format!("{}{}", prefix, "TargetDBParameterGroupIdentifier"),
&obj.target_db_parameter_group_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBParameterGroupResult {
pub db_parameter_group: Option<DBParameterGroup>,
}
struct CopyDBParameterGroupResultDeserializer;
impl CopyDBParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyDBParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CopyDBParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroup" => {
obj.db_parameter_group = Some(DBParameterGroupDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterMessage {
pub availability_zones: Option<Vec<String>>,
pub backup_retention_period: Option<i64>,
pub character_set_name: Option<String>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub database_name: Option<String>,
pub enable_iam_database_authentication: Option<bool>,
pub engine: String,
pub engine_version: Option<String>,
pub kms_key_id: Option<String>,
pub master_user_password: Option<String>,
pub master_username: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub pre_signed_url: Option<String>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub replication_source_identifier: Option<String>,
pub storage_encrypted: Option<bool>,
pub tags: Option<Vec<Tag>>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct CreateDBClusterMessageSerializer;
impl CreateDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.availability_zones {
AvailabilityZonesSerializer::serialize(
params,
&format!("{}{}", prefix, "AvailabilityZone"),
field_value,
);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.character_set_name {
params.put(&format!("{}{}", prefix, "CharacterSetName"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.database_name {
params.put(&format!("{}{}", prefix, "DatabaseName"), &field_value);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &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.master_user_password {
params.put(&format!("{}{}", prefix, "MasterUserPassword"), &field_value);
}
if let Some(ref field_value) = obj.master_username {
params.put(&format!("{}{}", prefix, "MasterUsername"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.pre_signed_url {
params.put(&format!("{}{}", prefix, "PreSignedUrl"), &field_value);
}
if let Some(ref field_value) = obj.preferred_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&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.replication_source_identifier {
params.put(
&format!("{}{}", prefix, "ReplicationSourceIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.storage_encrypted {
params.put(&format!("{}{}", prefix, "StorageEncrypted"), &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 CreateDBClusterParameterGroupMessage {
pub db_cluster_parameter_group_name: String,
pub db_parameter_group_family: String,
pub description: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBClusterParameterGroupMessageSerializer;
impl CreateDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_parameter_group_name,
);
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
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 CreateDBClusterParameterGroupResult {
pub db_cluster_parameter_group: Option<DBClusterParameterGroup>,
}
struct CreateDBClusterParameterGroupResultDeserializer;
impl CreateDBClusterParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBClusterParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CreateDBClusterParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroup" => {
obj.db_cluster_parameter_group =
Some(DBClusterParameterGroupDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct CreateDBClusterResultDeserializer;
impl CreateDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBClusterResult, XmlParseError> {
deserialize_elements::<_, CreateDBClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster = Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterSnapshotMessage {
pub db_cluster_identifier: String,
pub db_cluster_snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBClusterSnapshotMessageSerializer;
impl CreateDBClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
params.put(
&format!("{}{}", prefix, "DBClusterSnapshotIdentifier"),
&obj.db_cluster_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 CreateDBClusterSnapshotResult {
pub db_cluster_snapshot: Option<DBClusterSnapshot>,
}
struct CreateDBClusterSnapshotResultDeserializer;
impl CreateDBClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, CreateDBClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshot" => {
obj.db_cluster_snapshot = Some(DBClusterSnapshotDeserializer::deserialize(
"DBClusterSnapshot",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBInstanceMessage {
pub allocated_storage: Option<i64>,
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub backup_retention_period: Option<i64>,
pub character_set_name: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: Option<String>,
pub db_instance_class: String,
pub db_instance_identifier: String,
pub db_name: Option<String>,
pub db_parameter_group_name: Option<String>,
pub db_security_groups: Option<Vec<String>>,
pub db_subnet_group_name: Option<String>,
pub domain: Option<String>,
pub domain_iam_role_name: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub enable_performance_insights: Option<bool>,
pub engine: String,
pub engine_version: Option<String>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub license_model: Option<String>,
pub master_user_password: Option<String>,
pub master_username: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub option_group_name: Option<String>,
pub performance_insights_kms_key_id: Option<String>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub promotion_tier: Option<i64>,
pub storage_encrypted: Option<bool>,
pub storage_type: Option<String>,
pub tags: Option<Vec<Tag>>,
pub tde_credential_arn: Option<String>,
pub tde_credential_password: Option<String>,
pub timezone: Option<String>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct CreateDBInstanceMessageSerializer;
impl CreateDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allocated_storage {
params.put(&format!("{}{}", prefix, "AllocatedStorage"), &field_value);
}
if let Some(ref field_value) = obj.auto_minor_version_upgrade {
params.put(
&format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.availability_zone {
params.put(&format!("{}{}", prefix, "AvailabilityZone"), &field_value);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.character_set_name {
params.put(&format!("{}{}", prefix, "CharacterSetName"), &field_value);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
if let Some(ref field_value) = obj.db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBInstanceClass"),
&obj.db_instance_class,
);
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.db_name {
params.put(&format!("{}{}", prefix, "DBName"), &field_value);
}
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_security_groups {
DBSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "DBSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.domain {
params.put(&format!("{}{}", prefix, "Domain"), &field_value);
}
if let Some(ref field_value) = obj.domain_iam_role_name {
params.put(&format!("{}{}", prefix, "DomainIAMRoleName"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.enable_performance_insights {
params.put(
&format!("{}{}", prefix, "EnablePerformanceInsights"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &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.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &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.master_username {
params.put(&format!("{}{}", prefix, "MasterUsername"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_interval {
params.put(&format!("{}{}", prefix, "MonitoringInterval"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_role_arn {
params.put(&format!("{}{}", prefix, "MonitoringRoleArn"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.performance_insights_kms_key_id {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsKMSKeyId"),
&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_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&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.promotion_tier {
params.put(&format!("{}{}", prefix, "PromotionTier"), &field_value);
}
if let Some(ref field_value) = obj.storage_encrypted {
params.put(&format!("{}{}", prefix, "StorageEncrypted"), &field_value);
}
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &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.tde_credential_arn {
params.put(&format!("{}{}", prefix, "TdeCredentialArn"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_password {
params.put(
&format!("{}{}", prefix, "TdeCredentialPassword"),
&field_value,
);
}
if let Some(ref field_value) = obj.timezone {
params.put(&format!("{}{}", prefix, "Timezone"), &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 CreateDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct CreateDBInstanceResultDeserializer;
impl CreateDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBInstanceResult, XmlParseError> {
deserialize_elements::<_, CreateDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBParameterGroupMessage {
pub db_parameter_group_family: String,
pub db_parameter_group_name: String,
pub description: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBParameterGroupMessageSerializer;
impl CreateDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_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 CreateDBParameterGroupResult {
pub db_parameter_group: Option<DBParameterGroup>,
}
struct CreateDBParameterGroupResultDeserializer;
impl CreateDBParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CreateDBParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroup" => {
obj.db_parameter_group = Some(DBParameterGroupDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBSubnetGroupMessage {
pub db_subnet_group_description: String,
pub db_subnet_group_name: String,
pub subnet_ids: Vec<String>,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBSubnetGroupMessageSerializer;
impl CreateDBSubnetGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBSubnetGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSubnetGroupDescription"),
&obj.db_subnet_group_description,
);
params.put(
&format!("{}{}", prefix, "DBSubnetGroupName"),
&obj.db_subnet_group_name,
);
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 CreateDBSubnetGroupResult {
pub db_subnet_group: Option<DBSubnetGroup>,
}
struct CreateDBSubnetGroupResultDeserializer;
impl CreateDBSubnetGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBSubnetGroupResult, XmlParseError> {
deserialize_elements::<_, CreateDBSubnetGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSubnetGroup" => {
obj.db_subnet_group = Some(DBSubnetGroupDeserializer::deserialize(
"DBSubnetGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateEventSubscriptionMessage {
pub enabled: Option<bool>,
pub event_categories: Option<Vec<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,
);
}
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 DBCluster {
pub allocated_storage: Option<i64>,
pub associated_roles: Option<Vec<DBClusterRole>>,
pub availability_zones: Option<Vec<String>>,
pub backup_retention_period: Option<i64>,
pub character_set_name: Option<String>,
pub clone_group_id: Option<String>,
pub cluster_create_time: Option<String>,
pub db_cluster_arn: Option<String>,
pub db_cluster_identifier: Option<String>,
pub db_cluster_members: Option<Vec<DBClusterMember>>,
pub db_cluster_option_group_memberships: Option<Vec<DBClusterOptionGroupStatus>>,
pub db_cluster_parameter_group: Option<String>,
pub db_subnet_group: Option<String>,
pub database_name: Option<String>,
pub db_cluster_resource_id: Option<String>,
pub earliest_restorable_time: Option<String>,
pub endpoint: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub hosted_zone_id: Option<String>,
pub iam_database_authentication_enabled: Option<bool>,
pub kms_key_id: Option<String>,
pub latest_restorable_time: Option<String>,
pub master_username: Option<String>,
pub multi_az: Option<bool>,
pub percent_progress: Option<String>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub read_replica_identifiers: Option<Vec<String>>,
pub reader_endpoint: Option<String>,
pub replication_source_identifier: Option<String>,
pub status: Option<String>,
pub storage_encrypted: Option<bool>,
pub vpc_security_groups: Option<Vec<VpcSecurityGroupMembership>>,
}
struct DBClusterDeserializer;
impl DBClusterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBCluster, XmlParseError> {
deserialize_elements::<_, DBCluster, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllocatedStorage" => {
obj.allocated_storage = Some(IntegerOptionalDeserializer::deserialize(
"AllocatedStorage",
stack,
)?);
}
"AssociatedRoles" => {
obj.associated_roles.get_or_insert(vec![]).extend(
DBClusterRolesDeserializer::deserialize("AssociatedRoles", stack)?,
);
}
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
"BackupRetentionPeriod" => {
obj.backup_retention_period = Some(IntegerOptionalDeserializer::deserialize(
"BackupRetentionPeriod",
stack,
)?);
}
"CharacterSetName" => {
obj.character_set_name =
Some(StringDeserializer::deserialize("CharacterSetName", stack)?);
}
"CloneGroupId" => {
obj.clone_group_id =
Some(StringDeserializer::deserialize("CloneGroupId", stack)?);
}
"ClusterCreateTime" => {
obj.cluster_create_time =
Some(TStampDeserializer::deserialize("ClusterCreateTime", stack)?);
}
"DBClusterArn" => {
obj.db_cluster_arn =
Some(StringDeserializer::deserialize("DBClusterArn", stack)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"DBClusterMembers" => {
obj.db_cluster_members.get_or_insert(vec![]).extend(
DBClusterMemberListDeserializer::deserialize("DBClusterMembers", stack)?,
);
}
"DBClusterOptionGroupMemberships" => {
obj.db_cluster_option_group_memberships
.get_or_insert(vec![])
.extend(DBClusterOptionGroupMembershipsDeserializer::deserialize(
"DBClusterOptionGroupMemberships",
stack,
)?);
}
"DBClusterParameterGroup" => {
obj.db_cluster_parameter_group = Some(StringDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
}
"DBSubnetGroup" => {
obj.db_subnet_group =
Some(StringDeserializer::deserialize("DBSubnetGroup", stack)?);
}
"DatabaseName" => {
obj.database_name =
Some(StringDeserializer::deserialize("DatabaseName", stack)?);
}
"DbClusterResourceId" => {
obj.db_cluster_resource_id = Some(StringDeserializer::deserialize(
"DbClusterResourceId",
stack,
)?);
}
"EarliestRestorableTime" => {
obj.earliest_restorable_time = Some(TStampDeserializer::deserialize(
"EarliestRestorableTime",
stack,
)?);
}
"Endpoint" => {
obj.endpoint = Some(StringDeserializer::deserialize("Endpoint", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"HostedZoneId" => {
obj.hosted_zone_id =
Some(StringDeserializer::deserialize("HostedZoneId", stack)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LatestRestorableTime" => {
obj.latest_restorable_time = Some(TStampDeserializer::deserialize(
"LatestRestorableTime",
stack,
)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"MultiAZ" => {
obj.multi_az = Some(BooleanDeserializer::deserialize("MultiAZ", stack)?);
}
"PercentProgress" => {
obj.percent_progress =
Some(StringDeserializer::deserialize("PercentProgress", stack)?);
}
"Port" => {
obj.port = Some(IntegerOptionalDeserializer::deserialize("Port", stack)?);
}
"PreferredBackupWindow" => {
obj.preferred_backup_window = Some(StringDeserializer::deserialize(
"PreferredBackupWindow",
stack,
)?);
}
"PreferredMaintenanceWindow" => {
obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
"PreferredMaintenanceWindow",
stack,
)?);
}
"ReadReplicaIdentifiers" => {
obj.read_replica_identifiers.get_or_insert(vec![]).extend(
ReadReplicaIdentifierListDeserializer::deserialize(
"ReadReplicaIdentifiers",
stack,
)?,
);
}
"ReaderEndpoint" => {
obj.reader_endpoint =
Some(StringDeserializer::deserialize("ReaderEndpoint", stack)?);
}
"ReplicationSourceIdentifier" => {
obj.replication_source_identifier = Some(StringDeserializer::deserialize(
"ReplicationSourceIdentifier",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StorageEncrypted" => {
obj.storage_encrypted =
Some(BooleanDeserializer::deserialize("StorageEncrypted", stack)?);
}
"VpcSecurityGroups" => {
obj.vpc_security_groups.get_or_insert(vec![]).extend(
VpcSecurityGroupMembershipListDeserializer::deserialize(
"VpcSecurityGroups",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterListDeserializer;
impl DBClusterListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBCluster>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBCluster" {
obj.push(DBClusterDeserializer::deserialize("DBCluster", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterMember {
pub db_cluster_parameter_group_status: Option<String>,
pub db_instance_identifier: Option<String>,
pub is_cluster_writer: Option<bool>,
pub promotion_tier: Option<i64>,
}
struct DBClusterMemberDeserializer;
impl DBClusterMemberDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterMember, XmlParseError> {
deserialize_elements::<_, DBClusterMember, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBClusterParameterGroupStatus" => {
obj.db_cluster_parameter_group_status = Some(StringDeserializer::deserialize(
"DBClusterParameterGroupStatus",
stack,
)?);
}
"DBInstanceIdentifier" => {
obj.db_instance_identifier = Some(StringDeserializer::deserialize(
"DBInstanceIdentifier",
stack,
)?);
}
"IsClusterWriter" => {
obj.is_cluster_writer =
Some(BooleanDeserializer::deserialize("IsClusterWriter", stack)?);
}
"PromotionTier" => {
obj.promotion_tier = Some(IntegerOptionalDeserializer::deserialize(
"PromotionTier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterMemberListDeserializer;
impl DBClusterMemberListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterMember>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterMember" {
obj.push(DBClusterMemberDeserializer::deserialize(
"DBClusterMember",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterMessage {
pub db_clusters: Option<Vec<DBCluster>>,
pub marker: Option<String>,
}
struct DBClusterMessageDeserializer;
impl DBClusterMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterMessage, XmlParseError> {
deserialize_elements::<_, DBClusterMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBClusters" => {
obj.db_clusters
.get_or_insert(vec![])
.extend(DBClusterListDeserializer::deserialize("DBClusters", stack)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterOptionGroupMembershipsDeserializer;
impl DBClusterOptionGroupMembershipsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterOptionGroupStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterOptionGroup" {
obj.push(DBClusterOptionGroupStatusDeserializer::deserialize(
"DBClusterOptionGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterOptionGroupStatus {
pub db_cluster_option_group_name: Option<String>,
pub status: Option<String>,
}
struct DBClusterOptionGroupStatusDeserializer;
impl DBClusterOptionGroupStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterOptionGroupStatus, XmlParseError> {
deserialize_elements::<_, DBClusterOptionGroupStatus, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterOptionGroupName" => {
obj.db_cluster_option_group_name = Some(StringDeserializer::deserialize(
"DBClusterOptionGroupName",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroup {
pub db_cluster_parameter_group_arn: Option<String>,
pub db_cluster_parameter_group_name: Option<String>,
pub db_parameter_group_family: Option<String>,
pub description: Option<String>,
}
struct DBClusterParameterGroupDeserializer;
impl DBClusterParameterGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroup, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroup, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroupArn" => {
obj.db_cluster_parameter_group_arn = Some(StringDeserializer::deserialize(
"DBClusterParameterGroupArn",
stack,
)?);
}
"DBClusterParameterGroupName" => {
obj.db_cluster_parameter_group_name = Some(
StringDeserializer::deserialize("DBClusterParameterGroupName", stack)?,
);
}
"DBParameterGroupFamily" => {
obj.db_parameter_group_family = Some(StringDeserializer::deserialize(
"DBParameterGroupFamily",
stack,
)?);
}
"Description" => {
obj.description =
Some(StringDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroupDetails {
pub marker: Option<String>,
pub parameters: Option<Vec<Parameter>>,
}
struct DBClusterParameterGroupDetailsDeserializer;
impl DBClusterParameterGroupDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroupDetails, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroupDetails, _>(
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(())
},
)
}
}
struct DBClusterParameterGroupListDeserializer;
impl DBClusterParameterGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterParameterGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterParameterGroup" {
obj.push(DBClusterParameterGroupDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroupNameMessage {
pub db_cluster_parameter_group_name: Option<String>,
}
struct DBClusterParameterGroupNameMessageDeserializer;
impl DBClusterParameterGroupNameMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroupNameMessage, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroupNameMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroupName" => {
obj.db_cluster_parameter_group_name = Some(
StringDeserializer::deserialize("DBClusterParameterGroupName", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroupsMessage {
pub db_cluster_parameter_groups: Option<Vec<DBClusterParameterGroup>>,
pub marker: Option<String>,
}
struct DBClusterParameterGroupsMessageDeserializer;
impl DBClusterParameterGroupsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroupsMessage, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroupsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroups" => {
obj.db_cluster_parameter_groups
.get_or_insert(vec![])
.extend(DBClusterParameterGroupListDeserializer::deserialize(
"DBClusterParameterGroups",
stack,
)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterRole {
pub role_arn: Option<String>,
pub status: Option<String>,
}
struct DBClusterRoleDeserializer;
impl DBClusterRoleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterRole, XmlParseError> {
deserialize_elements::<_, DBClusterRole, _>(tag_name, stack, |name, stack, obj| {
match name {
"RoleArn" => {
obj.role_arn = Some(StringDeserializer::deserialize("RoleArn", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterRolesDeserializer;
impl DBClusterRolesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterRole>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterRole" {
obj.push(DBClusterRoleDeserializer::deserialize(
"DBClusterRole",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshot {
pub allocated_storage: Option<i64>,
pub availability_zones: Option<Vec<String>>,
pub cluster_create_time: Option<String>,
pub db_cluster_identifier: Option<String>,
pub db_cluster_snapshot_arn: Option<String>,
pub db_cluster_snapshot_identifier: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub iam_database_authentication_enabled: Option<bool>,
pub kms_key_id: Option<String>,
pub license_model: Option<String>,
pub master_username: Option<String>,
pub percent_progress: Option<i64>,
pub port: Option<i64>,
pub snapshot_create_time: Option<String>,
pub snapshot_type: Option<String>,
pub source_db_cluster_snapshot_arn: Option<String>,
pub status: Option<String>,
pub storage_encrypted: Option<bool>,
pub vpc_id: Option<String>,
}
struct DBClusterSnapshotDeserializer;
impl DBClusterSnapshotDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshot, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshot, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllocatedStorage" => {
obj.allocated_storage =
Some(IntegerDeserializer::deserialize("AllocatedStorage", stack)?);
}
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
"ClusterCreateTime" => {
obj.cluster_create_time =
Some(TStampDeserializer::deserialize("ClusterCreateTime", stack)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"DBClusterSnapshotArn" => {
obj.db_cluster_snapshot_arn = Some(StringDeserializer::deserialize(
"DBClusterSnapshotArn",
stack,
)?);
}
"DBClusterSnapshotIdentifier" => {
obj.db_cluster_snapshot_identifier = Some(StringDeserializer::deserialize(
"DBClusterSnapshotIdentifier",
stack,
)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"PercentProgress" => {
obj.percent_progress =
Some(IntegerDeserializer::deserialize("PercentProgress", stack)?);
}
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
"SnapshotCreateTime" => {
obj.snapshot_create_time = Some(TStampDeserializer::deserialize(
"SnapshotCreateTime",
stack,
)?);
}
"SnapshotType" => {
obj.snapshot_type =
Some(StringDeserializer::deserialize("SnapshotType", stack)?);
}
"SourceDBClusterSnapshotArn" => {
obj.source_db_cluster_snapshot_arn = Some(StringDeserializer::deserialize(
"SourceDBClusterSnapshotArn",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StorageEncrypted" => {
obj.storage_encrypted =
Some(BooleanDeserializer::deserialize("StorageEncrypted", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshotAttribute {
pub attribute_name: Option<String>,
pub attribute_values: Option<Vec<String>>,
}
struct DBClusterSnapshotAttributeDeserializer;
impl DBClusterSnapshotAttributeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshotAttribute, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshotAttribute, _>(
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(())
},
)
}
}
struct DBClusterSnapshotAttributeListDeserializer;
impl DBClusterSnapshotAttributeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterSnapshotAttribute>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterSnapshotAttribute" {
obj.push(DBClusterSnapshotAttributeDeserializer::deserialize(
"DBClusterSnapshotAttribute",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshotAttributesResult {
pub db_cluster_snapshot_attributes: Option<Vec<DBClusterSnapshotAttribute>>,
pub db_cluster_snapshot_identifier: Option<String>,
}
struct DBClusterSnapshotAttributesResultDeserializer;
impl DBClusterSnapshotAttributesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshotAttributesResult, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshotAttributesResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshotAttributes" => {
obj.db_cluster_snapshot_attributes
.get_or_insert(vec![])
.extend(DBClusterSnapshotAttributeListDeserializer::deserialize(
"DBClusterSnapshotAttributes",
stack,
)?);
}
"DBClusterSnapshotIdentifier" => {
obj.db_cluster_snapshot_identifier = Some(StringDeserializer::deserialize(
"DBClusterSnapshotIdentifier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBClusterSnapshotListDeserializer;
impl DBClusterSnapshotListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterSnapshot>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterSnapshot" {
obj.push(DBClusterSnapshotDeserializer::deserialize(
"DBClusterSnapshot",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshotMessage {
pub db_cluster_snapshots: Option<Vec<DBClusterSnapshot>>,
pub marker: Option<String>,
}
struct DBClusterSnapshotMessageDeserializer;
impl DBClusterSnapshotMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshotMessage, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshotMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshots" => {
obj.db_cluster_snapshots.get_or_insert(vec![]).extend(
DBClusterSnapshotListDeserializer::deserialize(
"DBClusterSnapshots",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBEngineVersion {
pub db_engine_description: Option<String>,
pub db_engine_version_description: Option<String>,
pub db_parameter_group_family: Option<String>,
pub default_character_set: Option<CharacterSet>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub exportable_log_types: Option<Vec<String>>,
pub supported_character_sets: Option<Vec<CharacterSet>>,
pub supported_timezones: Option<Vec<Timezone>>,
pub supports_log_exports_to_cloudwatch_logs: Option<bool>,
pub supports_read_replica: Option<bool>,
pub valid_upgrade_target: Option<Vec<UpgradeTarget>>,
}
struct DBEngineVersionDeserializer;
impl DBEngineVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBEngineVersion, XmlParseError> {
deserialize_elements::<_, DBEngineVersion, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBEngineDescription" => {
obj.db_engine_description = Some(StringDeserializer::deserialize(
"DBEngineDescription",
stack,
)?);
}
"DBEngineVersionDescription" => {
obj.db_engine_version_description = Some(StringDeserializer::deserialize(
"DBEngineVersionDescription",
stack,
)?);
}
"DBParameterGroupFamily" => {
obj.db_parameter_group_family = Some(StringDeserializer::deserialize(
"DBParameterGroupFamily",
stack,
)?);
}
"DefaultCharacterSet" => {
obj.default_character_set = Some(CharacterSetDeserializer::deserialize(
"DefaultCharacterSet",
stack,
)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"ExportableLogTypes" => {
obj.exportable_log_types.get_or_insert(vec![]).extend(
LogTypeListDeserializer::deserialize("ExportableLogTypes", stack)?,
);
}
"SupportedCharacterSets" => {
obj.supported_character_sets.get_or_insert(vec![]).extend(
SupportedCharacterSetsListDeserializer::deserialize(
"SupportedCharacterSets",
stack,
)?,
);
}
"SupportedTimezones" => {
obj.supported_timezones.get_or_insert(vec![]).extend(
SupportedTimezonesListDeserializer::deserialize(
"SupportedTimezones",
stack,
)?,
);
}
"SupportsLogExportsToCloudwatchLogs" => {
obj.supports_log_exports_to_cloudwatch_logs =
Some(BooleanDeserializer::deserialize(
"SupportsLogExportsToCloudwatchLogs",
stack,
)?);
}
"SupportsReadReplica" => {
obj.supports_read_replica = Some(BooleanDeserializer::deserialize(
"SupportsReadReplica",
stack,
)?);
}
"ValidUpgradeTarget" => {
obj.valid_upgrade_target.get_or_insert(vec![]).extend(
ValidUpgradeTargetListDeserializer::deserialize(
"ValidUpgradeTarget",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBEngineVersionListDeserializer;
impl DBEngineVersionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBEngineVersion>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBEngineVersion" {
obj.push(DBEngineVersionDeserializer::deserialize(
"DBEngineVersion",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBEngineVersionMessage {
pub db_engine_versions: Option<Vec<DBEngineVersion>>,
pub marker: Option<String>,
}
struct DBEngineVersionMessageDeserializer;
impl DBEngineVersionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBEngineVersionMessage, XmlParseError> {
deserialize_elements::<_, DBEngineVersionMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBEngineVersions" => {
obj.db_engine_versions.get_or_insert(vec![]).extend(
DBEngineVersionListDeserializer::deserialize("DBEngineVersions", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBInstance {
pub allocated_storage: Option<i64>,
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub backup_retention_period: Option<i64>,
pub ca_certificate_identifier: Option<String>,
pub character_set_name: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: Option<String>,
pub db_instance_arn: Option<String>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: Option<String>,
pub db_instance_status: Option<String>,
pub db_name: Option<String>,
pub db_parameter_groups: Option<Vec<DBParameterGroupStatus>>,
pub db_security_groups: Option<Vec<DBSecurityGroupMembership>>,
pub db_subnet_group: Option<DBSubnetGroup>,
pub db_instance_port: Option<i64>,
pub dbi_resource_id: Option<String>,
pub domain_memberships: Option<Vec<DomainMembership>>,
pub enabled_cloudwatch_logs_exports: Option<Vec<String>>,
pub endpoint: Option<Endpoint>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub enhanced_monitoring_resource_arn: Option<String>,
pub iam_database_authentication_enabled: Option<bool>,
pub instance_create_time: Option<String>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub latest_restorable_time: Option<String>,
pub license_model: Option<String>,
pub master_username: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub option_group_memberships: Option<Vec<OptionGroupMembership>>,
pub pending_modified_values: Option<PendingModifiedValues>,
pub performance_insights_enabled: Option<bool>,
pub performance_insights_kms_key_id: Option<String>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub promotion_tier: Option<i64>,
pub read_replica_db_cluster_identifiers: Option<Vec<String>>,
pub read_replica_db_instance_identifiers: Option<Vec<String>>,
pub read_replica_source_db_instance_identifier: Option<String>,
pub secondary_availability_zone: Option<String>,
pub status_infos: Option<Vec<DBInstanceStatusInfo>>,
pub storage_encrypted: Option<bool>,
pub storage_type: Option<String>,
pub tde_credential_arn: Option<String>,
pub timezone: Option<String>,
pub vpc_security_groups: Option<Vec<VpcSecurityGroupMembership>>,
}
struct DBInstanceDeserializer;
impl DBInstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstance, XmlParseError> {
deserialize_elements::<_, DBInstance, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllocatedStorage" => {
obj.allocated_storage =
Some(IntegerDeserializer::deserialize("AllocatedStorage", stack)?);
}
"AutoMinorVersionUpgrade" => {
obj.auto_minor_version_upgrade = Some(BooleanDeserializer::deserialize(
"AutoMinorVersionUpgrade",
stack,
)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"BackupRetentionPeriod" => {
obj.backup_retention_period = Some(IntegerDeserializer::deserialize(
"BackupRetentionPeriod",
stack,
)?);
}
"CACertificateIdentifier" => {
obj.ca_certificate_identifier = Some(StringDeserializer::deserialize(
"CACertificateIdentifier",
stack,
)?);
}
"CharacterSetName" => {
obj.character_set_name =
Some(StringDeserializer::deserialize("CharacterSetName", stack)?);
}
"CopyTagsToSnapshot" => {
obj.copy_tags_to_snapshot = Some(BooleanDeserializer::deserialize(
"CopyTagsToSnapshot",
stack,
)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"DBInstanceArn" => {
obj.db_instance_arn =
Some(StringDeserializer::deserialize("DBInstanceArn", stack)?);
}
"DBInstanceClass" => {
obj.db_instance_class =
Some(StringDeserializer::deserialize("DBInstanceClass", stack)?);
}
"DBInstanceIdentifier" => {
obj.db_instance_identifier = Some(StringDeserializer::deserialize(
"DBInstanceIdentifier",
stack,
)?);
}
"DBInstanceStatus" => {
obj.db_instance_status =
Some(StringDeserializer::deserialize("DBInstanceStatus", stack)?);
}
"DBName" => {
obj.db_name = Some(StringDeserializer::deserialize("DBName", stack)?);
}
"DBParameterGroups" => {
obj.db_parameter_groups.get_or_insert(vec![]).extend(
DBParameterGroupStatusListDeserializer::deserialize(
"DBParameterGroups",
stack,
)?,
);
}
"DBSecurityGroups" => {
obj.db_security_groups.get_or_insert(vec![]).extend(
DBSecurityGroupMembershipListDeserializer::deserialize(
"DBSecurityGroups",
stack,
)?,
);
}
"DBSubnetGroup" => {
obj.db_subnet_group = Some(DBSubnetGroupDeserializer::deserialize(
"DBSubnetGroup",
stack,
)?);
}
"DbInstancePort" => {
obj.db_instance_port =
Some(IntegerDeserializer::deserialize("DbInstancePort", stack)?);
}
"DbiResourceId" => {
obj.dbi_resource_id =
Some(StringDeserializer::deserialize("DbiResourceId", stack)?);
}
"DomainMemberships" => {
obj.domain_memberships.get_or_insert(vec![]).extend(
DomainMembershipListDeserializer::deserialize("DomainMemberships", stack)?,
);
}
"EnabledCloudwatchLogsExports" => {
obj.enabled_cloudwatch_logs_exports
.get_or_insert(vec![])
.extend(LogTypeListDeserializer::deserialize(
"EnabledCloudwatchLogsExports",
stack,
)?);
}
"Endpoint" => {
obj.endpoint = Some(EndpointDeserializer::deserialize("Endpoint", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"EnhancedMonitoringResourceArn" => {
obj.enhanced_monitoring_resource_arn = Some(StringDeserializer::deserialize(
"EnhancedMonitoringResourceArn",
stack,
)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"InstanceCreateTime" => {
obj.instance_create_time = Some(TStampDeserializer::deserialize(
"InstanceCreateTime",
stack,
)?);
}
"Iops" => {
obj.iops = Some(IntegerOptionalDeserializer::deserialize("Iops", stack)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LatestRestorableTime" => {
obj.latest_restorable_time = Some(TStampDeserializer::deserialize(
"LatestRestorableTime",
stack,
)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"MonitoringInterval" => {
obj.monitoring_interval = Some(IntegerOptionalDeserializer::deserialize(
"MonitoringInterval",
stack,
)?);
}
"MonitoringRoleArn" => {
obj.monitoring_role_arn =
Some(StringDeserializer::deserialize("MonitoringRoleArn", stack)?);
}
"MultiAZ" => {
obj.multi_az = Some(BooleanDeserializer::deserialize("MultiAZ", stack)?);
}
"OptionGroupMemberships" => {
obj.option_group_memberships.get_or_insert(vec![]).extend(
OptionGroupMembershipListDeserializer::deserialize(
"OptionGroupMemberships",
stack,
)?,
);
}
"PendingModifiedValues" => {
obj.pending_modified_values =
Some(PendingModifiedValuesDeserializer::deserialize(
"PendingModifiedValues",
stack,
)?);
}
"PerformanceInsightsEnabled" => {
obj.performance_insights_enabled =
Some(BooleanOptionalDeserializer::deserialize(
"PerformanceInsightsEnabled",
stack,
)?);
}
"PerformanceInsightsKMSKeyId" => {
obj.performance_insights_kms_key_id = Some(StringDeserializer::deserialize(
"PerformanceInsightsKMSKeyId",
stack,
)?);
}
"PreferredBackupWindow" => {
obj.preferred_backup_window = Some(StringDeserializer::deserialize(
"PreferredBackupWindow",
stack,
)?);
}
"PreferredMaintenanceWindow" => {
obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
"PreferredMaintenanceWindow",
stack,
)?);
}
"PromotionTier" => {
obj.promotion_tier = Some(IntegerOptionalDeserializer::deserialize(
"PromotionTier",
stack,
)?);
}
"ReadReplicaDBClusterIdentifiers" => {
obj.read_replica_db_cluster_identifiers
.get_or_insert(vec![])
.extend(ReadReplicaDBClusterIdentifierListDeserializer::deserialize(
"ReadReplicaDBClusterIdentifiers",
stack,
)?);
}
"ReadReplicaDBInstanceIdentifiers" => {
obj.read_replica_db_instance_identifiers
.get_or_insert(vec![])
.extend(
ReadReplicaDBInstanceIdentifierListDeserializer::deserialize(
"ReadReplicaDBInstanceIdentifiers",
stack,
)?,
);
}
"ReadReplicaSourceDBInstanceIdentifier" => {
obj.read_replica_source_db_instance_identifier =
Some(StringDeserializer::deserialize(
"ReadReplicaSourceDBInstanceIdentifier",
stack,
)?);
}
"SecondaryAvailabilityZone" => {
obj.secondary_availability_zone = Some(StringDeserializer::deserialize(
"SecondaryAvailabilityZone",
stack,
)?);
}
"StatusInfos" => {
obj.status_infos.get_or_insert(vec![]).extend(
DBInstanceStatusInfoListDeserializer::deserialize("StatusInfos", stack)?,
);
}
"StorageEncrypted" => {
obj.storage_encrypted =
Some(BooleanDeserializer::deserialize("StorageEncrypted", stack)?);
}
"StorageType" => {
obj.storage_type = Some(StringDeserializer::deserialize("StorageType", stack)?);
}
"TdeCredentialArn" => {
obj.tde_credential_arn =
Some(StringDeserializer::deserialize("TdeCredentialArn", stack)?);
}
"Timezone" => {
obj.timezone = Some(StringDeserializer::deserialize("Timezone", stack)?);
}
"VpcSecurityGroups" => {
obj.vpc_security_groups.get_or_insert(vec![]).extend(
VpcSecurityGroupMembershipListDeserializer::deserialize(
"VpcSecurityGroups",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBInstanceListDeserializer;
impl DBInstanceListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBInstance>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBInstance" {
obj.push(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBInstanceMessage {
pub db_instances: Option<Vec<DBInstance>>,
pub marker: Option<String>,
}
struct DBInstanceMessageDeserializer;
impl DBInstanceMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstanceMessage, XmlParseError> {
deserialize_elements::<_, DBInstanceMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstances" => {
obj.db_instances.get_or_insert(vec![]).extend(
DBInstanceListDeserializer::deserialize("DBInstances", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBInstanceStatusInfo {
pub message: Option<String>,
pub normal: Option<bool>,
pub status: Option<String>,
pub status_type: Option<String>,
}
struct DBInstanceStatusInfoDeserializer;
impl DBInstanceStatusInfoDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstanceStatusInfo, XmlParseError> {
deserialize_elements::<_, DBInstanceStatusInfo, _>(tag_name, stack, |name, stack, obj| {
match name {
"Message" => {
obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
}
"Normal" => {
obj.normal = Some(BooleanDeserializer::deserialize("Normal", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StatusType" => {
obj.status_type = Some(StringDeserializer::deserialize("StatusType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBInstanceStatusInfoListDeserializer;
impl DBInstanceStatusInfoListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBInstanceStatusInfo>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBInstanceStatusInfo" {
obj.push(DBInstanceStatusInfoDeserializer::deserialize(
"DBInstanceStatusInfo",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroup {
pub db_parameter_group_arn: Option<String>,
pub db_parameter_group_family: Option<String>,
pub db_parameter_group_name: Option<String>,
pub description: Option<String>,
}
struct DBParameterGroupDeserializer;
impl DBParameterGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroup, XmlParseError> {
deserialize_elements::<_, DBParameterGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBParameterGroupArn" => {
obj.db_parameter_group_arn = Some(StringDeserializer::deserialize(
"DBParameterGroupArn",
stack,
)?);
}
"DBParameterGroupFamily" => {
obj.db_parameter_group_family = Some(StringDeserializer::deserialize(
"DBParameterGroupFamily",
stack,
)?);
}
"DBParameterGroupName" => {
obj.db_parameter_group_name = Some(StringDeserializer::deserialize(
"DBParameterGroupName",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupDetails {
pub marker: Option<String>,
pub parameters: Option<Vec<Parameter>>,
}
struct DBParameterGroupDetailsDeserializer;
impl DBParameterGroupDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupDetails, XmlParseError> {
deserialize_elements::<_, DBParameterGroupDetails, _>(
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(())
},
)
}
}
struct DBParameterGroupListDeserializer;
impl DBParameterGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBParameterGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBParameterGroup" {
obj.push(DBParameterGroupDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupNameMessage {
pub db_parameter_group_name: Option<String>,
}
struct DBParameterGroupNameMessageDeserializer;
impl DBParameterGroupNameMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupNameMessage, XmlParseError> {
deserialize_elements::<_, DBParameterGroupNameMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroupName" => {
obj.db_parameter_group_name = Some(StringDeserializer::deserialize(
"DBParameterGroupName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupStatus {
pub db_parameter_group_name: Option<String>,
pub parameter_apply_status: Option<String>,
}
struct DBParameterGroupStatusDeserializer;
impl DBParameterGroupStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupStatus, XmlParseError> {
deserialize_elements::<_, DBParameterGroupStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBParameterGroupName" => {
obj.db_parameter_group_name = Some(StringDeserializer::deserialize(
"DBParameterGroupName",
stack,
)?);
}
"ParameterApplyStatus" => {
obj.parameter_apply_status = Some(StringDeserializer::deserialize(
"ParameterApplyStatus",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBParameterGroupStatusListDeserializer;
impl DBParameterGroupStatusListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBParameterGroupStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBParameterGroup" {
obj.push(DBParameterGroupStatusDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupsMessage {
pub db_parameter_groups: Option<Vec<DBParameterGroup>>,
pub marker: Option<String>,
}
struct DBParameterGroupsMessageDeserializer;
impl DBParameterGroupsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupsMessage, XmlParseError> {
deserialize_elements::<_, DBParameterGroupsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroups" => {
obj.db_parameter_groups.get_or_insert(vec![]).extend(
DBParameterGroupListDeserializer::deserialize(
"DBParameterGroups",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSecurityGroupMembership {
pub db_security_group_name: Option<String>,
pub status: Option<String>,
}
struct DBSecurityGroupMembershipDeserializer;
impl DBSecurityGroupMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSecurityGroupMembership, XmlParseError> {
deserialize_elements::<_, DBSecurityGroupMembership, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSecurityGroupName" => {
obj.db_security_group_name = Some(StringDeserializer::deserialize(
"DBSecurityGroupName",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBSecurityGroupMembershipListDeserializer;
impl DBSecurityGroupMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBSecurityGroupMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBSecurityGroup" {
obj.push(DBSecurityGroupMembershipDeserializer::deserialize(
"DBSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct DBSecurityGroupNameListSerializer;
impl DBSecurityGroupNameListSerializer {
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 DBSubnetGroup {
pub db_subnet_group_arn: Option<String>,
pub db_subnet_group_description: Option<String>,
pub db_subnet_group_name: Option<String>,
pub subnet_group_status: Option<String>,
pub subnets: Option<Vec<Subnet>>,
pub vpc_id: Option<String>,
}
struct DBSubnetGroupDeserializer;
impl DBSubnetGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSubnetGroup, XmlParseError> {
deserialize_elements::<_, DBSubnetGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSubnetGroupArn" => {
obj.db_subnet_group_arn =
Some(StringDeserializer::deserialize("DBSubnetGroupArn", stack)?);
}
"DBSubnetGroupDescription" => {
obj.db_subnet_group_description = Some(StringDeserializer::deserialize(
"DBSubnetGroupDescription",
stack,
)?);
}
"DBSubnetGroupName" => {
obj.db_subnet_group_name =
Some(StringDeserializer::deserialize("DBSubnetGroupName", stack)?);
}
"SubnetGroupStatus" => {
obj.subnet_group_status =
Some(StringDeserializer::deserialize("SubnetGroupStatus", stack)?);
}
"Subnets" => {
obj.subnets
.get_or_insert(vec![])
.extend(SubnetListDeserializer::deserialize("Subnets", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSubnetGroupMessage {
pub db_subnet_groups: Option<Vec<DBSubnetGroup>>,
pub marker: Option<String>,
}
struct DBSubnetGroupMessageDeserializer;
impl DBSubnetGroupMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSubnetGroupMessage, XmlParseError> {
deserialize_elements::<_, DBSubnetGroupMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSubnetGroups" => {
obj.db_subnet_groups.get_or_insert(vec![]).extend(
DBSubnetGroupsDeserializer::deserialize("DBSubnetGroups", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBSubnetGroupsDeserializer;
impl DBSubnetGroupsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBSubnetGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBSubnetGroup" {
obj.push(DBSubnetGroupDeserializer::deserialize(
"DBSubnetGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBClusterMessage {
pub db_cluster_identifier: String,
pub final_db_snapshot_identifier: Option<String>,
pub skip_final_snapshot: Option<bool>,
}
struct DeleteDBClusterMessageSerializer;
impl DeleteDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.final_db_snapshot_identifier {
params.put(
&format!("{}{}", prefix, "FinalDBSnapshotIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.skip_final_snapshot {
params.put(&format!("{}{}", prefix, "SkipFinalSnapshot"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBClusterParameterGroupMessage {
pub db_cluster_parameter_group_name: String,
}
struct DeleteDBClusterParameterGroupMessageSerializer;
impl DeleteDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_parameter_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct DeleteDBClusterResultDeserializer;
impl DeleteDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteDBClusterResult, XmlParseError> {
deserialize_elements::<_, DeleteDBClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster = Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBClusterSnapshotMessage {
pub db_cluster_snapshot_identifier: String,
}
struct DeleteDBClusterSnapshotMessageSerializer;
impl DeleteDBClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterSnapshotIdentifier"),
&obj.db_cluster_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBClusterSnapshotResult {
pub db_cluster_snapshot: Option<DBClusterSnapshot>,
}
struct DeleteDBClusterSnapshotResultDeserializer;
impl DeleteDBClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteDBClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, DeleteDBClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshot" => {
obj.db_cluster_snapshot = Some(DBClusterSnapshotDeserializer::deserialize(
"DBClusterSnapshot",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBInstanceMessage {
pub db_instance_identifier: String,
pub final_db_snapshot_identifier: Option<String>,
pub skip_final_snapshot: Option<bool>,
}
struct DeleteDBInstanceMessageSerializer;
impl DeleteDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.final_db_snapshot_identifier {
params.put(
&format!("{}{}", prefix, "FinalDBSnapshotIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.skip_final_snapshot {
params.put(&format!("{}{}", prefix, "SkipFinalSnapshot"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct DeleteDBInstanceResultDeserializer;
impl DeleteDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteDBInstanceResult, XmlParseError> {
deserialize_elements::<_, DeleteDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBParameterGroupMessage {
pub db_parameter_group_name: String,
}
struct DeleteDBParameterGroupMessageSerializer;
impl DeleteDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBSubnetGroupMessage {
pub db_subnet_group_name: String,
}
struct DeleteDBSubnetGroupMessageSerializer;
impl DeleteDBSubnetGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBSubnetGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSubnetGroupName"),
&obj.db_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 DeleteEventSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct DeleteEventSubscriptionResultDeserializer;
impl DeleteEventSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteEventSubscriptionResult, XmlParseError> {
deserialize_elements::<_, DeleteEventSubscriptionResult, _>(
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 DescribeDBClusterParameterGroupsMessage {
pub db_cluster_parameter_group_name: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBClusterParameterGroupsMessageSerializer;
impl DescribeDBClusterParameterGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBClusterParameterGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeDBClusterParametersMessage {
pub db_cluster_parameter_group_name: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub source: Option<String>,
}
struct DescribeDBClusterParametersMessageSerializer;
impl DescribeDBClusterParametersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBClusterParametersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_parameter_group_name,
);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 {
params.put(&format!("{}{}", prefix, "Source"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBClusterSnapshotAttributesMessage {
pub db_cluster_snapshot_identifier: String,
}
struct DescribeDBClusterSnapshotAttributesMessageSerializer;
impl DescribeDBClusterSnapshotAttributesMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DescribeDBClusterSnapshotAttributesMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterSnapshotIdentifier"),
&obj.db_cluster_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBClusterSnapshotAttributesResult {
pub db_cluster_snapshot_attributes_result: Option<DBClusterSnapshotAttributesResult>,
}
struct DescribeDBClusterSnapshotAttributesResultDeserializer;
impl DescribeDBClusterSnapshotAttributesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeDBClusterSnapshotAttributesResult, XmlParseError> {
deserialize_elements::<_, DescribeDBClusterSnapshotAttributesResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshotAttributesResult" => {
obj.db_cluster_snapshot_attributes_result =
Some(DBClusterSnapshotAttributesResultDeserializer::deserialize(
"DBClusterSnapshotAttributesResult",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBClusterSnapshotsMessage {
pub db_cluster_identifier: Option<String>,
pub db_cluster_snapshot_identifier: Option<String>,
pub filters: Option<Vec<Filter>>,
pub include_public: Option<bool>,
pub include_shared: Option<bool>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub snapshot_type: Option<String>,
}
struct DescribeDBClusterSnapshotsMessageSerializer;
impl DescribeDBClusterSnapshotsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBClusterSnapshotsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_cluster_snapshot_identifier {
params.put(
&format!("{}{}", prefix, "DBClusterSnapshotIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.include_public {
params.put(&format!("{}{}", prefix, "IncludePublic"), &field_value);
}
if let Some(ref field_value) = obj.include_shared {
params.put(&format!("{}{}", prefix, "IncludeShared"), &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.snapshot_type {
params.put(&format!("{}{}", prefix, "SnapshotType"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBClustersMessage {
pub db_cluster_identifier: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBClustersMessageSerializer;
impl DescribeDBClustersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBClustersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeDBEngineVersionsMessage {
pub db_parameter_group_family: Option<String>,
pub default_only: Option<bool>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub filters: Option<Vec<Filter>>,
pub list_supported_character_sets: Option<bool>,
pub list_supported_timezones: Option<bool>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBEngineVersionsMessageSerializer;
impl DescribeDBEngineVersionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBEngineVersionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_parameter_group_family {
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&field_value,
);
}
if let Some(ref field_value) = obj.default_only {
params.put(&format!("{}{}", prefix, "DefaultOnly"), &field_value);
}
if let Some(ref field_value) = obj.engine {
params.put(&format!("{}{}", prefix, "Engine"), &field_value);
}
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.list_supported_character_sets {
params.put(
&format!("{}{}", prefix, "ListSupportedCharacterSets"),
&field_value,
);
}
if let Some(ref field_value) = obj.list_supported_timezones {
params.put(
&format!("{}{}", prefix, "ListSupportedTimezones"),
&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 DescribeDBInstancesMessage {
pub db_instance_identifier: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBInstancesMessageSerializer;
impl DescribeDBInstancesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBInstancesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_instance_identifier {
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeDBParameterGroupsMessage {
pub db_parameter_group_name: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBParameterGroupsMessageSerializer;
impl DescribeDBParameterGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBParameterGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeDBParametersMessage {
pub db_parameter_group_name: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub source: Option<String>,
}
struct DescribeDBParametersMessageSerializer;
impl DescribeDBParametersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBParametersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 {
params.put(&format!("{}{}", prefix, "Source"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBSubnetGroupsMessage {
pub db_subnet_group_name: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBSubnetGroupsMessageSerializer;
impl DescribeDBSubnetGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBSubnetGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeEngineDefaultClusterParametersMessage {
pub db_parameter_group_family: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeEngineDefaultClusterParametersMessageSerializer;
impl DescribeEngineDefaultClusterParametersMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DescribeEngineDefaultClusterParametersMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeEngineDefaultClusterParametersResult {
pub engine_defaults: Option<EngineDefaults>,
}
struct DescribeEngineDefaultClusterParametersResultDeserializer;
impl DescribeEngineDefaultClusterParametersResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEngineDefaultClusterParametersResult, XmlParseError> {
deserialize_elements::<_, DescribeEngineDefaultClusterParametersResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EngineDefaults" => {
obj.engine_defaults = Some(EngineDefaultsDeserializer::deserialize(
"EngineDefaults",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEngineDefaultParametersMessage {
pub db_parameter_group_family: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeEngineDefaultParametersMessageSerializer;
impl DescribeEngineDefaultParametersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEngineDefaultParametersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeEngineDefaultParametersResult {
pub engine_defaults: Option<EngineDefaults>,
}
struct DescribeEngineDefaultParametersResultDeserializer;
impl DescribeEngineDefaultParametersResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEngineDefaultParametersResult, XmlParseError> {
deserialize_elements::<_, DescribeEngineDefaultParametersResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EngineDefaults" => {
obj.engine_defaults = Some(EngineDefaultsDeserializer::deserialize(
"EngineDefaults",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventCategoriesMessage {
pub filters: Option<Vec<Filter>>,
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.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
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 filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub subscription_name: Option<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.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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.subscription_name {
params.put(&format!("{}{}", prefix, "SubscriptionName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventsMessage {
pub duration: Option<i64>,
pub end_time: Option<String>,
pub event_categories: Option<Vec<String>>,
pub filters: Option<Vec<Filter>>,
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.event_categories {
EventCategoriesListSerializer::serialize(
params,
&format!("{}{}", prefix, "EventCategory"),
field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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 DescribeOrderableDBInstanceOptionsMessage {
pub db_instance_class: Option<String>,
pub engine: String,
pub engine_version: Option<String>,
pub filters: Option<Vec<Filter>>,
pub license_model: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub vpc: Option<bool>,
}
struct DescribeOrderableDBInstanceOptionsMessageSerializer;
impl DescribeOrderableDBInstanceOptionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeOrderableDBInstanceOptionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_instance_class {
params.put(&format!("{}{}", prefix, "DBInstanceClass"), &field_value);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &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.vpc {
params.put(&format!("{}{}", prefix, "Vpc"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribePendingMaintenanceActionsMessage {
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub resource_identifier: Option<String>,
}
struct DescribePendingMaintenanceActionsMessageSerializer;
impl DescribePendingMaintenanceActionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribePendingMaintenanceActionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
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.resource_identifier {
params.put(&format!("{}{}", prefix, "ResourceIdentifier"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeValidDBInstanceModificationsMessage {
pub db_instance_identifier: String,
}
struct DescribeValidDBInstanceModificationsMessageSerializer;
impl DescribeValidDBInstanceModificationsMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DescribeValidDBInstanceModificationsMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeValidDBInstanceModificationsResult {
pub valid_db_instance_modifications_message: Option<ValidDBInstanceModificationsMessage>,
}
struct DescribeValidDBInstanceModificationsResultDeserializer;
impl DescribeValidDBInstanceModificationsResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeValidDBInstanceModificationsResult, XmlParseError> {
deserialize_elements::<_, DescribeValidDBInstanceModificationsResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ValidDBInstanceModificationsMessage" => {
obj.valid_db_instance_modifications_message = Some(
ValidDBInstanceModificationsMessageDeserializer::deserialize(
"ValidDBInstanceModificationsMessage",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DomainMembership {
pub domain: Option<String>,
pub fqdn: Option<String>,
pub iam_role_name: Option<String>,
pub status: Option<String>,
}
struct DomainMembershipDeserializer;
impl DomainMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DomainMembership, XmlParseError> {
deserialize_elements::<_, DomainMembership, _>(tag_name, stack, |name, stack, obj| {
match name {
"Domain" => {
obj.domain = Some(StringDeserializer::deserialize("Domain", stack)?);
}
"FQDN" => {
obj.fqdn = Some(StringDeserializer::deserialize("FQDN", stack)?);
}
"IAMRoleName" => {
obj.iam_role_name =
Some(StringDeserializer::deserialize("IAMRoleName", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DomainMembershipListDeserializer;
impl DomainMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DomainMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DomainMembership" {
obj.push(DomainMembershipDeserializer::deserialize(
"DomainMembership",
stack,
)?);
} else {
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 DoubleRange {
pub from: Option<f64>,
pub to: Option<f64>,
}
struct DoubleRangeDeserializer;
impl DoubleRangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DoubleRange, XmlParseError> {
deserialize_elements::<_, DoubleRange, _>(tag_name, stack, |name, stack, obj| {
match name {
"From" => {
obj.from = Some(DoubleDeserializer::deserialize("From", stack)?);
}
"To" => {
obj.to = Some(DoubleDeserializer::deserialize("To", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DoubleRangeListDeserializer;
impl DoubleRangeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DoubleRange>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DoubleRange" {
obj.push(DoubleRangeDeserializer::deserialize("DoubleRange", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Endpoint {
pub address: Option<String>,
pub hosted_zone_id: 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)?);
}
"HostedZoneId" => {
obj.hosted_zone_id =
Some(StringDeserializer::deserialize("HostedZoneId", stack)?);
}
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EngineDefaults {
pub db_parameter_group_family: Option<String>,
pub marker: Option<String>,
pub parameters: Option<Vec<Parameter>>,
}
struct EngineDefaultsDeserializer;
impl EngineDefaultsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EngineDefaults, XmlParseError> {
deserialize_elements::<_, EngineDefaults, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBParameterGroupFamily" => {
obj.db_parameter_group_family = Some(StringDeserializer::deserialize(
"DBParameterGroupFamily",
stack,
)?);
}
"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 Event {
pub date: Option<String>,
pub event_categories: Option<Vec<String>>,
pub message: Option<String>,
pub source_arn: 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)?,
);
}
"Message" => {
obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
}
"SourceArn" => {
obj.source_arn = Some(StringDeserializer::deserialize("SourceArn", 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 event_categories: Option<Vec<String>>,
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 {
"EventCategories" => {
obj.event_categories.get_or_insert(vec![]).extend(
EventCategoriesListDeserializer::deserialize("EventCategories", 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(())
})
}
}
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 event_subscription_arn: 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>,
}
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)?,
);
}
"EventSubscriptionArn" => {
obj.event_subscription_arn = Some(StringDeserializer::deserialize(
"EventSubscriptionArn",
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(StringDeserializer::deserialize(
"SubscriptionCreationTime",
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 FailoverDBClusterMessage {
pub db_cluster_identifier: Option<String>,
pub target_db_instance_identifier: Option<String>,
}
struct FailoverDBClusterMessageSerializer;
impl FailoverDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &FailoverDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.target_db_instance_identifier {
params.put(
&format!("{}{}", prefix, "TargetDBInstanceIdentifier"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct FailoverDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct FailoverDBClusterResultDeserializer;
impl FailoverDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<FailoverDBClusterResult, XmlParseError> {
deserialize_elements::<_, FailoverDBClusterResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster =
Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Filter {
pub name: String,
pub values: Vec<String>,
}
struct FilterSerializer;
impl FilterSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Filter) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "Name"), &obj.name);
FilterValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "Value"),
&obj.values,
);
}
}
struct FilterListSerializer;
impl FilterListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Filter>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
FilterSerializer::serialize(params, &key, obj);
}
}
}
struct FilterValueListSerializer;
impl FilterValueListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct IntegerDeserializer;
impl IntegerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
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)
}
}
struct KeyListSerializer;
impl KeyListSerializer {
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 ListTagsForResourceMessage {
pub filters: Option<Vec<Filter>>,
pub resource_name: String,
}
struct ListTagsForResourceMessageSerializer;
impl ListTagsForResourceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ListTagsForResourceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
}
}
struct LogTypeListDeserializer;
impl LogTypeListDeserializer {
#[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 LogTypeListSerializer;
impl LogTypeListSerializer {
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 ModifyDBClusterMessage {
pub apply_immediately: Option<bool>,
pub backup_retention_period: Option<i64>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub enable_iam_database_authentication: Option<bool>,
pub engine_version: Option<String>,
pub master_user_password: Option<String>,
pub new_db_cluster_identifier: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct ModifyDBClusterMessageSerializer;
impl ModifyDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.apply_immediately {
params.put(&format!("{}{}", prefix, "ApplyImmediately"), &field_value);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &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_db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "NewDBClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &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_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&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.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterParameterGroupMessage {
pub db_cluster_parameter_group_name: String,
pub parameters: Vec<Parameter>,
}
struct ModifyDBClusterParameterGroupMessageSerializer;
impl ModifyDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_parameter_group_name,
);
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
&obj.parameters,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct ModifyDBClusterResultDeserializer;
impl ModifyDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBClusterResult, XmlParseError> {
deserialize_elements::<_, ModifyDBClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster = Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterSnapshotAttributeMessage {
pub attribute_name: String,
pub db_cluster_snapshot_identifier: String,
pub values_to_add: Option<Vec<String>>,
pub values_to_remove: Option<Vec<String>>,
}
struct ModifyDBClusterSnapshotAttributeMessageSerializer;
impl ModifyDBClusterSnapshotAttributeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBClusterSnapshotAttributeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AttributeName"),
&obj.attribute_name,
);
params.put(
&format!("{}{}", prefix, "DBClusterSnapshotIdentifier"),
&obj.db_cluster_snapshot_identifier,
);
if let Some(ref field_value) = obj.values_to_add {
AttributeValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "AttributeValue"),
field_value,
);
}
if let Some(ref field_value) = obj.values_to_remove {
AttributeValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "AttributeValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterSnapshotAttributeResult {
pub db_cluster_snapshot_attributes_result: Option<DBClusterSnapshotAttributesResult>,
}
struct ModifyDBClusterSnapshotAttributeResultDeserializer;
impl ModifyDBClusterSnapshotAttributeResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBClusterSnapshotAttributeResult, XmlParseError> {
deserialize_elements::<_, ModifyDBClusterSnapshotAttributeResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshotAttributesResult" => {
obj.db_cluster_snapshot_attributes_result =
Some(DBClusterSnapshotAttributesResultDeserializer::deserialize(
"DBClusterSnapshotAttributesResult",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBInstanceMessage {
pub allocated_storage: Option<i64>,
pub allow_major_version_upgrade: Option<bool>,
pub apply_immediately: Option<bool>,
pub auto_minor_version_upgrade: Option<bool>,
pub backup_retention_period: Option<i64>,
pub ca_certificate_identifier: Option<String>,
pub cloudwatch_logs_export_configuration: Option<CloudwatchLogsExportConfiguration>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: String,
pub db_parameter_group_name: Option<String>,
pub db_port_number: Option<i64>,
pub db_security_groups: Option<Vec<String>>,
pub db_subnet_group_name: Option<String>,
pub domain: Option<String>,
pub domain_iam_role_name: Option<String>,
pub enable_iam_database_authentication: Option<bool>,
pub enable_performance_insights: Option<bool>,
pub engine_version: Option<String>,
pub iops: Option<i64>,
pub license_model: Option<String>,
pub master_user_password: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub new_db_instance_identifier: Option<String>,
pub option_group_name: Option<String>,
pub performance_insights_kms_key_id: Option<String>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub promotion_tier: Option<i64>,
pub storage_type: Option<String>,
pub tde_credential_arn: Option<String>,
pub tde_credential_password: Option<String>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct ModifyDBInstanceMessageSerializer;
impl ModifyDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allocated_storage {
params.put(&format!("{}{}", prefix, "AllocatedStorage"), &field_value);
}
if let Some(ref field_value) = obj.allow_major_version_upgrade {
params.put(
&format!("{}{}", prefix, "AllowMajorVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.apply_immediately {
params.put(&format!("{}{}", prefix, "ApplyImmediately"), &field_value);
}
if let Some(ref field_value) = obj.auto_minor_version_upgrade {
params.put(
&format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.ca_certificate_identifier {
params.put(
&format!("{}{}", prefix, "CACertificateIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.cloudwatch_logs_export_configuration {
CloudwatchLogsExportConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "CloudwatchLogsExportConfiguration"),
field_value,
);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
if let Some(ref field_value) = obj.db_instance_class {
params.put(&format!("{}{}", prefix, "DBInstanceClass"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_port_number {
params.put(&format!("{}{}", prefix, "DBPortNumber"), &field_value);
}
if let Some(ref field_value) = obj.db_security_groups {
DBSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "DBSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.domain {
params.put(&format!("{}{}", prefix, "Domain"), &field_value);
}
if let Some(ref field_value) = obj.domain_iam_role_name {
params.put(&format!("{}{}", prefix, "DomainIAMRoleName"), &field_value);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.enable_performance_insights {
params.put(
&format!("{}{}", prefix, "EnablePerformanceInsights"),
&field_value,
);
}
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &field_value);
}
if let Some(ref field_value) = obj.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &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.monitoring_interval {
params.put(&format!("{}{}", prefix, "MonitoringInterval"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_role_arn {
params.put(&format!("{}{}", prefix, "MonitoringRoleArn"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.new_db_instance_identifier {
params.put(
&format!("{}{}", prefix, "NewDBInstanceIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.performance_insights_kms_key_id {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsKMSKeyId"),
&field_value,
);
}
if let Some(ref field_value) = obj.preferred_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&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.promotion_tier {
params.put(&format!("{}{}", prefix, "PromotionTier"), &field_value);
}
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_arn {
params.put(&format!("{}{}", prefix, "TdeCredentialArn"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_password {
params.put(
&format!("{}{}", prefix, "TdeCredentialPassword"),
&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 ModifyDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct ModifyDBInstanceResultDeserializer;
impl ModifyDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBInstanceResult, XmlParseError> {
deserialize_elements::<_, ModifyDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBParameterGroupMessage {
pub db_parameter_group_name: String,
pub parameters: Vec<Parameter>,
}
struct ModifyDBParameterGroupMessageSerializer;
impl ModifyDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
&obj.parameters,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBSubnetGroupMessage {
pub db_subnet_group_description: Option<String>,
pub db_subnet_group_name: String,
pub subnet_ids: Vec<String>,
}
struct ModifyDBSubnetGroupMessageSerializer;
impl ModifyDBSubnetGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBSubnetGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_subnet_group_description {
params.put(
&format!("{}{}", prefix, "DBSubnetGroupDescription"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBSubnetGroupName"),
&obj.db_subnet_group_name,
);
SubnetIdentifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "SubnetIdentifier"),
&obj.subnet_ids,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBSubnetGroupResult {
pub db_subnet_group: Option<DBSubnetGroup>,
}
struct ModifyDBSubnetGroupResultDeserializer;
impl ModifyDBSubnetGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBSubnetGroupResult, XmlParseError> {
deserialize_elements::<_, ModifyDBSubnetGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSubnetGroup" => {
obj.db_subnet_group = Some(DBSubnetGroupDeserializer::deserialize(
"DBSubnetGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyEventSubscriptionMessage {
pub enabled: Option<bool>,
pub event_categories: Option<Vec<String>>,
pub sns_topic_arn: Option<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.sns_topic_arn {
params.put(&format!("{}{}", prefix, "SnsTopicArn"), &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 OptionGroupMembership {
pub option_group_name: Option<String>,
pub status: Option<String>,
}
struct OptionGroupMembershipDeserializer;
impl OptionGroupMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionGroupMembership, XmlParseError> {
deserialize_elements::<_, OptionGroupMembership, _>(tag_name, stack, |name, stack, obj| {
match name {
"OptionGroupName" => {
obj.option_group_name =
Some(StringDeserializer::deserialize("OptionGroupName", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct OptionGroupMembershipListDeserializer;
impl OptionGroupMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OptionGroupMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OptionGroupMembership" {
obj.push(OptionGroupMembershipDeserializer::deserialize(
"OptionGroupMembership",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OrderableDBInstanceOption {
pub availability_zones: Option<Vec<AvailabilityZone>>,
pub db_instance_class: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub license_model: Option<String>,
pub max_iops_per_db_instance: Option<i64>,
pub max_iops_per_gib: Option<f64>,
pub max_storage_size: Option<i64>,
pub min_iops_per_db_instance: Option<i64>,
pub min_iops_per_gib: Option<f64>,
pub min_storage_size: Option<i64>,
pub multi_az_capable: Option<bool>,
pub read_replica_capable: Option<bool>,
pub storage_type: Option<String>,
pub supports_enhanced_monitoring: Option<bool>,
pub supports_iam_database_authentication: Option<bool>,
pub supports_iops: Option<bool>,
pub supports_performance_insights: Option<bool>,
pub supports_storage_encryption: Option<bool>,
pub vpc: Option<bool>,
}
struct OrderableDBInstanceOptionDeserializer;
impl OrderableDBInstanceOptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OrderableDBInstanceOption, XmlParseError> {
deserialize_elements::<_, OrderableDBInstanceOption, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZoneListDeserializer::deserialize(
"AvailabilityZones",
stack,
)?,
);
}
"DBInstanceClass" => {
obj.db_instance_class =
Some(StringDeserializer::deserialize("DBInstanceClass", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MaxIopsPerDbInstance" => {
obj.max_iops_per_db_instance =
Some(IntegerOptionalDeserializer::deserialize(
"MaxIopsPerDbInstance",
stack,
)?);
}
"MaxIopsPerGib" => {
obj.max_iops_per_gib = Some(DoubleOptionalDeserializer::deserialize(
"MaxIopsPerGib",
stack,
)?);
}
"MaxStorageSize" => {
obj.max_storage_size = Some(IntegerOptionalDeserializer::deserialize(
"MaxStorageSize",
stack,
)?);
}
"MinIopsPerDbInstance" => {
obj.min_iops_per_db_instance =
Some(IntegerOptionalDeserializer::deserialize(
"MinIopsPerDbInstance",
stack,
)?);
}
"MinIopsPerGib" => {
obj.min_iops_per_gib = Some(DoubleOptionalDeserializer::deserialize(
"MinIopsPerGib",
stack,
)?);
}
"MinStorageSize" => {
obj.min_storage_size = Some(IntegerOptionalDeserializer::deserialize(
"MinStorageSize",
stack,
)?);
}
"MultiAZCapable" => {
obj.multi_az_capable =
Some(BooleanDeserializer::deserialize("MultiAZCapable", stack)?);
}
"ReadReplicaCapable" => {
obj.read_replica_capable = Some(BooleanDeserializer::deserialize(
"ReadReplicaCapable",
stack,
)?);
}
"StorageType" => {
obj.storage_type =
Some(StringDeserializer::deserialize("StorageType", stack)?);
}
"SupportsEnhancedMonitoring" => {
obj.supports_enhanced_monitoring = Some(BooleanDeserializer::deserialize(
"SupportsEnhancedMonitoring",
stack,
)?);
}
"SupportsIAMDatabaseAuthentication" => {
obj.supports_iam_database_authentication =
Some(BooleanDeserializer::deserialize(
"SupportsIAMDatabaseAuthentication",
stack,
)?);
}
"SupportsIops" => {
obj.supports_iops =
Some(BooleanDeserializer::deserialize("SupportsIops", stack)?);
}
"SupportsPerformanceInsights" => {
obj.supports_performance_insights = Some(BooleanDeserializer::deserialize(
"SupportsPerformanceInsights",
stack,
)?);
}
"SupportsStorageEncryption" => {
obj.supports_storage_encryption = Some(BooleanDeserializer::deserialize(
"SupportsStorageEncryption",
stack,
)?);
}
"Vpc" => {
obj.vpc = Some(BooleanDeserializer::deserialize("Vpc", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct OrderableDBInstanceOptionsListDeserializer;
impl OrderableDBInstanceOptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OrderableDBInstanceOption>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OrderableDBInstanceOption" {
obj.push(OrderableDBInstanceOptionDeserializer::deserialize(
"OrderableDBInstanceOption",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OrderableDBInstanceOptionsMessage {
pub marker: Option<String>,
pub orderable_db_instance_options: Option<Vec<OrderableDBInstanceOption>>,
}
struct OrderableDBInstanceOptionsMessageDeserializer;
impl OrderableDBInstanceOptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OrderableDBInstanceOptionsMessage, XmlParseError> {
deserialize_elements::<_, OrderableDBInstanceOptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"OrderableDBInstanceOptions" => {
obj.orderable_db_instance_options
.get_or_insert(vec![])
.extend(OrderableDBInstanceOptionsListDeserializer::deserialize(
"OrderableDBInstanceOptions",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Parameter {
pub allowed_values: Option<String>,
pub apply_method: 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)?);
}
"ApplyMethod" => {
obj.apply_method =
Some(ApplyMethodDeserializer::deserialize("ApplyMethod", stack)?);
}
"ApplyType" => {
obj.apply_type = Some(StringDeserializer::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_method {
params.put(&format!("{}{}", prefix, "ApplyMethod"), &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 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);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PendingCloudwatchLogsExports {
pub log_types_to_disable: Option<Vec<String>>,
pub log_types_to_enable: Option<Vec<String>>,
}
struct PendingCloudwatchLogsExportsDeserializer;
impl PendingCloudwatchLogsExportsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PendingCloudwatchLogsExports, XmlParseError> {
deserialize_elements::<_, PendingCloudwatchLogsExports, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LogTypesToDisable" => {
obj.log_types_to_disable.get_or_insert(vec![]).extend(
LogTypeListDeserializer::deserialize("LogTypesToDisable", stack)?,
);
}
"LogTypesToEnable" => {
obj.log_types_to_enable.get_or_insert(vec![]).extend(
LogTypeListDeserializer::deserialize("LogTypesToEnable", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PendingMaintenanceAction {
pub action: Option<String>,
pub auto_applied_after_date: Option<String>,
pub current_apply_date: Option<String>,
pub description: Option<String>,
pub forced_apply_date: Option<String>,
pub opt_in_status: Option<String>,
}
struct PendingMaintenanceActionDeserializer;
impl PendingMaintenanceActionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PendingMaintenanceAction, XmlParseError> {
deserialize_elements::<_, PendingMaintenanceAction, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Action" => {
obj.action = Some(StringDeserializer::deserialize("Action", stack)?);
}
"AutoAppliedAfterDate" => {
obj.auto_applied_after_date = Some(TStampDeserializer::deserialize(
"AutoAppliedAfterDate",
stack,
)?);
}
"CurrentApplyDate" => {
obj.current_apply_date =
Some(TStampDeserializer::deserialize("CurrentApplyDate", stack)?);
}
"Description" => {
obj.description =
Some(StringDeserializer::deserialize("Description", stack)?);
}
"ForcedApplyDate" => {
obj.forced_apply_date =
Some(TStampDeserializer::deserialize("ForcedApplyDate", stack)?);
}
"OptInStatus" => {
obj.opt_in_status =
Some(StringDeserializer::deserialize("OptInStatus", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct PendingMaintenanceActionDetailsDeserializer;
impl PendingMaintenanceActionDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<PendingMaintenanceAction>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "PendingMaintenanceAction" {
obj.push(PendingMaintenanceActionDeserializer::deserialize(
"PendingMaintenanceAction",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct PendingMaintenanceActionsDeserializer;
impl PendingMaintenanceActionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ResourcePendingMaintenanceActions>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ResourcePendingMaintenanceActions" {
obj.push(ResourcePendingMaintenanceActionsDeserializer::deserialize(
"ResourcePendingMaintenanceActions",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PendingMaintenanceActionsMessage {
pub marker: Option<String>,
pub pending_maintenance_actions: Option<Vec<ResourcePendingMaintenanceActions>>,
}
struct PendingMaintenanceActionsMessageDeserializer;
impl PendingMaintenanceActionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PendingMaintenanceActionsMessage, XmlParseError> {
deserialize_elements::<_, PendingMaintenanceActionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"PendingMaintenanceActions" => {
obj.pending_maintenance_actions
.get_or_insert(vec![])
.extend(PendingMaintenanceActionsDeserializer::deserialize(
"PendingMaintenanceActions",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PendingModifiedValues {
pub allocated_storage: Option<i64>,
pub backup_retention_period: Option<i64>,
pub ca_certificate_identifier: Option<String>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: Option<String>,
pub db_subnet_group_name: Option<String>,
pub engine_version: Option<String>,
pub iops: Option<i64>,
pub license_model: Option<String>,
pub master_user_password: Option<String>,
pub multi_az: Option<bool>,
pub pending_cloudwatch_logs_exports: Option<PendingCloudwatchLogsExports>,
pub port: Option<i64>,
pub storage_type: Option<String>,
}
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 {
"AllocatedStorage" => {
obj.allocated_storage = Some(IntegerOptionalDeserializer::deserialize(
"AllocatedStorage",
stack,
)?);
}
"BackupRetentionPeriod" => {
obj.backup_retention_period = Some(IntegerOptionalDeserializer::deserialize(
"BackupRetentionPeriod",
stack,
)?);
}
"CACertificateIdentifier" => {
obj.ca_certificate_identifier = Some(StringDeserializer::deserialize(
"CACertificateIdentifier",
stack,
)?);
}
"DBInstanceClass" => {
obj.db_instance_class =
Some(StringDeserializer::deserialize("DBInstanceClass", stack)?);
}
"DBInstanceIdentifier" => {
obj.db_instance_identifier = Some(StringDeserializer::deserialize(
"DBInstanceIdentifier",
stack,
)?);
}
"DBSubnetGroupName" => {
obj.db_subnet_group_name =
Some(StringDeserializer::deserialize("DBSubnetGroupName", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"Iops" => {
obj.iops = Some(IntegerOptionalDeserializer::deserialize("Iops", stack)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MasterUserPassword" => {
obj.master_user_password = Some(StringDeserializer::deserialize(
"MasterUserPassword",
stack,
)?);
}
"MultiAZ" => {
obj.multi_az =
Some(BooleanOptionalDeserializer::deserialize("MultiAZ", stack)?);
}
"PendingCloudwatchLogsExports" => {
obj.pending_cloudwatch_logs_exports =
Some(PendingCloudwatchLogsExportsDeserializer::deserialize(
"PendingCloudwatchLogsExports",
stack,
)?);
}
"Port" => {
obj.port = Some(IntegerOptionalDeserializer::deserialize("Port", stack)?);
}
"StorageType" => {
obj.storage_type = Some(StringDeserializer::deserialize("StorageType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PromoteReadReplicaDBClusterMessage {
pub db_cluster_identifier: String,
}
struct PromoteReadReplicaDBClusterMessageSerializer;
impl PromoteReadReplicaDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PromoteReadReplicaDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PromoteReadReplicaDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct PromoteReadReplicaDBClusterResultDeserializer;
impl PromoteReadReplicaDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PromoteReadReplicaDBClusterResult, XmlParseError> {
deserialize_elements::<_, PromoteReadReplicaDBClusterResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster =
Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Range {
pub from: Option<i64>,
pub step: Option<i64>,
pub to: Option<i64>,
}
struct RangeDeserializer;
impl RangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Range, XmlParseError> {
deserialize_elements::<_, Range, _>(tag_name, stack, |name, stack, obj| {
match name {
"From" => {
obj.from = Some(IntegerDeserializer::deserialize("From", stack)?);
}
"Step" => {
obj.step = Some(IntegerOptionalDeserializer::deserialize("Step", stack)?);
}
"To" => {
obj.to = Some(IntegerDeserializer::deserialize("To", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RangeListDeserializer;
impl RangeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Range>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Range" {
obj.push(RangeDeserializer::deserialize("Range", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReadReplicaDBClusterIdentifierListDeserializer;
impl ReadReplicaDBClusterIdentifierListDeserializer {
#[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 == "ReadReplicaDBClusterIdentifier" {
obj.push(StringDeserializer::deserialize(
"ReadReplicaDBClusterIdentifier",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReadReplicaDBInstanceIdentifierListDeserializer;
impl ReadReplicaDBInstanceIdentifierListDeserializer {
#[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 == "ReadReplicaDBInstanceIdentifier" {
obj.push(StringDeserializer::deserialize(
"ReadReplicaDBInstanceIdentifier",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReadReplicaIdentifierListDeserializer;
impl ReadReplicaIdentifierListDeserializer {
#[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 == "ReadReplicaIdentifier" {
obj.push(StringDeserializer::deserialize(
"ReadReplicaIdentifier",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RebootDBInstanceMessage {
pub db_instance_identifier: String,
pub force_failover: Option<bool>,
}
struct RebootDBInstanceMessageSerializer;
impl RebootDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RebootDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.force_failover {
params.put(&format!("{}{}", prefix, "ForceFailover"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RebootDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct RebootDBInstanceResultDeserializer;
impl RebootDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RebootDBInstanceResult, XmlParseError> {
deserialize_elements::<_, RebootDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveRoleFromDBClusterMessage {
pub db_cluster_identifier: String,
pub role_arn: String,
}
struct RemoveRoleFromDBClusterMessageSerializer;
impl RemoveRoleFromDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveRoleFromDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
params.put(&format!("{}{}", prefix, "RoleArn"), &obj.role_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveSourceIdentifierFromSubscriptionMessage {
pub source_identifier: String,
pub subscription_name: String,
}
struct RemoveSourceIdentifierFromSubscriptionMessageSerializer;
impl RemoveSourceIdentifierFromSubscriptionMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &RemoveSourceIdentifierFromSubscriptionMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceIdentifier"),
&obj.source_identifier,
);
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveSourceIdentifierFromSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct RemoveSourceIdentifierFromSubscriptionResultDeserializer;
impl RemoveSourceIdentifierFromSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RemoveSourceIdentifierFromSubscriptionResult, XmlParseError> {
deserialize_elements::<_, RemoveSourceIdentifierFromSubscriptionResult, _>(
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 RemoveTagsFromResourceMessage {
pub resource_name: String,
pub tag_keys: Vec<String>,
}
struct RemoveTagsFromResourceMessageSerializer;
impl RemoveTagsFromResourceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveTagsFromResourceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
KeyListSerializer::serialize(params, &format!("{}{}", prefix, "TagKeys"), &obj.tag_keys);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResetDBClusterParameterGroupMessage {
pub db_cluster_parameter_group_name: String,
pub parameters: Option<Vec<Parameter>>,
pub reset_all_parameters: Option<bool>,
}
struct ResetDBClusterParameterGroupMessageSerializer;
impl ResetDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResetDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_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 ResetDBParameterGroupMessage {
pub db_parameter_group_name: String,
pub parameters: Option<Vec<Parameter>>,
pub reset_all_parameters: Option<bool>,
}
struct ResetDBParameterGroupMessageSerializer;
impl ResetDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResetDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_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 ResourcePendingMaintenanceActions {
pub pending_maintenance_action_details: Option<Vec<PendingMaintenanceAction>>,
pub resource_identifier: Option<String>,
}
struct ResourcePendingMaintenanceActionsDeserializer;
impl ResourcePendingMaintenanceActionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourcePendingMaintenanceActions, XmlParseError> {
deserialize_elements::<_, ResourcePendingMaintenanceActions, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PendingMaintenanceActionDetails" => {
obj.pending_maintenance_action_details
.get_or_insert(vec![])
.extend(PendingMaintenanceActionDetailsDeserializer::deserialize(
"PendingMaintenanceActionDetails",
stack,
)?);
}
"ResourceIdentifier" => {
obj.resource_identifier = Some(StringDeserializer::deserialize(
"ResourceIdentifier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreDBClusterFromSnapshotMessage {
pub availability_zones: Option<Vec<String>>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub database_name: Option<String>,
pub enable_iam_database_authentication: Option<bool>,
pub engine: String,
pub engine_version: Option<String>,
pub kms_key_id: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreDBClusterFromSnapshotMessageSerializer;
impl RestoreDBClusterFromSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreDBClusterFromSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.availability_zones {
AvailabilityZonesSerializer::serialize(
params,
&format!("{}{}", prefix, "AvailabilityZone"),
field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.database_name {
params.put(&format!("{}{}", prefix, "DatabaseName"), &field_value);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &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.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &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);
}
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 RestoreDBClusterFromSnapshotResult {
pub db_cluster: Option<DBCluster>,
}
struct RestoreDBClusterFromSnapshotResultDeserializer;
impl RestoreDBClusterFromSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreDBClusterFromSnapshotResult, XmlParseError> {
deserialize_elements::<_, RestoreDBClusterFromSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster =
Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreDBClusterToPointInTimeMessage {
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub enable_iam_database_authentication: Option<bool>,
pub kms_key_id: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub restore_to_time: Option<String>,
pub restore_type: Option<String>,
pub source_db_cluster_identifier: String,
pub tags: Option<Vec<Tag>>,
pub use_latest_restorable_time: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreDBClusterToPointInTimeMessageSerializer;
impl RestoreDBClusterToPointInTimeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreDBClusterToPointInTimeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&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.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.restore_to_time {
params.put(&format!("{}{}", prefix, "RestoreToTime"), &field_value);
}
if let Some(ref field_value) = obj.restore_type {
params.put(&format!("{}{}", prefix, "RestoreType"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SourceDBClusterIdentifier"),
&obj.source_db_cluster_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.use_latest_restorable_time {
params.put(
&format!("{}{}", prefix, "UseLatestRestorableTime"),
&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 RestoreDBClusterToPointInTimeResult {
pub db_cluster: Option<DBCluster>,
}
struct RestoreDBClusterToPointInTimeResultDeserializer;
impl RestoreDBClusterToPointInTimeResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreDBClusterToPointInTimeResult, XmlParseError> {
deserialize_elements::<_, RestoreDBClusterToPointInTimeResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster =
Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
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(())
})
}
}
struct SupportedCharacterSetsListDeserializer;
impl SupportedCharacterSetsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<CharacterSet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "CharacterSet" {
obj.push(CharacterSetDeserializer::deserialize(
"CharacterSet",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SupportedTimezonesListDeserializer;
impl SupportedTimezonesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Timezone>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Timezone" {
obj.push(TimezoneDeserializer::deserialize("Timezone", 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 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 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);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TagListMessage {
pub tag_list: Option<Vec<Tag>>,
}
struct TagListMessageDeserializer;
impl TagListMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TagListMessage, XmlParseError> {
deserialize_elements::<_, TagListMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"TagList" => {
obj.tag_list
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("TagList", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Timezone {
pub timezone_name: Option<String>,
}
struct TimezoneDeserializer;
impl TimezoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Timezone, XmlParseError> {
deserialize_elements::<_, Timezone, _>(tag_name, stack, |name, stack, obj| {
match name {
"TimezoneName" => {
obj.timezone_name =
Some(StringDeserializer::deserialize("TimezoneName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpgradeTarget {
pub auto_upgrade: Option<bool>,
pub description: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub is_major_version_upgrade: Option<bool>,
}
struct UpgradeTargetDeserializer;
impl UpgradeTargetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpgradeTarget, XmlParseError> {
deserialize_elements::<_, UpgradeTarget, _>(tag_name, stack, |name, stack, obj| {
match name {
"AutoUpgrade" => {
obj.auto_upgrade =
Some(BooleanDeserializer::deserialize("AutoUpgrade", stack)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"IsMajorVersionUpgrade" => {
obj.is_major_version_upgrade = Some(BooleanDeserializer::deserialize(
"IsMajorVersionUpgrade",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ValidDBInstanceModificationsMessage {
pub storage: Option<Vec<ValidStorageOptions>>,
}
struct ValidDBInstanceModificationsMessageDeserializer;
impl ValidDBInstanceModificationsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ValidDBInstanceModificationsMessage, XmlParseError> {
deserialize_elements::<_, ValidDBInstanceModificationsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Storage" => {
obj.storage.get_or_insert(vec![]).extend(
ValidStorageOptionsListDeserializer::deserialize("Storage", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ValidStorageOptions {
pub iops_to_storage_ratio: Option<Vec<DoubleRange>>,
pub provisioned_iops: Option<Vec<Range>>,
pub storage_size: Option<Vec<Range>>,
pub storage_type: Option<String>,
}
struct ValidStorageOptionsDeserializer;
impl ValidStorageOptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ValidStorageOptions, XmlParseError> {
deserialize_elements::<_, ValidStorageOptions, _>(tag_name, stack, |name, stack, obj| {
match name {
"IopsToStorageRatio" => {
obj.iops_to_storage_ratio.get_or_insert(vec![]).extend(
DoubleRangeListDeserializer::deserialize("IopsToStorageRatio", stack)?,
);
}
"ProvisionedIops" => {
obj.provisioned_iops.get_or_insert(vec![]).extend(
RangeListDeserializer::deserialize("ProvisionedIops", stack)?,
);
}
"StorageSize" => {
obj.storage_size
.get_or_insert(vec![])
.extend(RangeListDeserializer::deserialize("StorageSize", stack)?);
}
"StorageType" => {
obj.storage_type = Some(StringDeserializer::deserialize("StorageType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ValidStorageOptionsListDeserializer;
impl ValidStorageOptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ValidStorageOptions>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ValidStorageOptions" {
obj.push(ValidStorageOptionsDeserializer::deserialize(
"ValidStorageOptions",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ValidUpgradeTargetListDeserializer;
impl ValidUpgradeTargetListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<UpgradeTarget>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "UpgradeTarget" {
obj.push(UpgradeTargetDeserializer::deserialize(
"UpgradeTarget",
stack,
)?);
} else {
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 == "VpcSecurityGroupMembership" {
obj.push(VpcSecurityGroupMembershipDeserializer::deserialize(
"VpcSecurityGroupMembership",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Debug, PartialEq)]
pub enum AddRoleToDBClusterError {
DBClusterNotFoundFault(String),
DBClusterRoleAlreadyExistsFault(String),
DBClusterRoleQuotaExceededFault(String),
InvalidDBClusterStateFault(String),
}
impl AddRoleToDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddRoleToDBClusterError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
AddRoleToDBClusterError::DBClusterNotFoundFault(parsed_error.message),
)
}
"DBClusterRoleAlreadyExists" => {
return RusotoError::Service(
AddRoleToDBClusterError::DBClusterRoleAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterRoleQuotaExceeded" => {
return RusotoError::Service(
AddRoleToDBClusterError::DBClusterRoleQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
AddRoleToDBClusterError::InvalidDBClusterStateFault(
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 AddRoleToDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddRoleToDBClusterError {
fn description(&self) -> &str {
match *self {
AddRoleToDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
AddRoleToDBClusterError::DBClusterRoleAlreadyExistsFault(ref cause) => cause,
AddRoleToDBClusterError::DBClusterRoleQuotaExceededFault(ref cause) => cause,
AddRoleToDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddSourceIdentifierToSubscriptionError {
SourceNotFoundFault(String),
SubscriptionNotFoundFault(String),
}
impl AddSourceIdentifierToSubscriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AddSourceIdentifierToSubscriptionError> {
{
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[..] {
"SourceNotFound" => {
return RusotoError::Service(
AddSourceIdentifierToSubscriptionError::SourceNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
AddSourceIdentifierToSubscriptionError::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 AddSourceIdentifierToSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddSourceIdentifierToSubscriptionError {
fn description(&self) -> &str {
match *self {
AddSourceIdentifierToSubscriptionError::SourceNotFoundFault(ref cause) => cause,
AddSourceIdentifierToSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddTagsToResourceError {
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
DBSnapshotNotFoundFault(String),
}
impl AddTagsToResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToResourceError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
AddTagsToResourceError::DBClusterNotFoundFault(parsed_error.message),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
AddTagsToResourceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
AddTagsToResourceError::DBSnapshotNotFoundFault(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 AddTagsToResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddTagsToResourceError {
fn description(&self) -> &str {
match *self {
AddTagsToResourceError::DBClusterNotFoundFault(ref cause) => cause,
AddTagsToResourceError::DBInstanceNotFoundFault(ref cause) => cause,
AddTagsToResourceError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ApplyPendingMaintenanceActionError {
ResourceNotFoundFault(String),
}
impl ApplyPendingMaintenanceActionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ApplyPendingMaintenanceActionError> {
{
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[..] {
"ResourceNotFoundFault" => {
return RusotoError::Service(
ApplyPendingMaintenanceActionError::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 ApplyPendingMaintenanceActionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ApplyPendingMaintenanceActionError {
fn description(&self) -> &str {
match *self {
ApplyPendingMaintenanceActionError::ResourceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyDBClusterParameterGroupError {
DBParameterGroupAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBParameterGroupQuotaExceededFault(String),
}
impl CopyDBClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CopyDBClusterParameterGroupError> {
{
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[..] {
"DBParameterGroupAlreadyExists" => {
return RusotoError::Service(
CopyDBClusterParameterGroupError::DBParameterGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
CopyDBClusterParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBParameterGroupQuotaExceeded" => {
return RusotoError::Service(
CopyDBClusterParameterGroupError::DBParameterGroupQuotaExceededFault(
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 CopyDBClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyDBClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
CopyDBClusterParameterGroupError::DBParameterGroupAlreadyExistsFault(ref cause) => {
cause
}
CopyDBClusterParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
CopyDBClusterParameterGroupError::DBParameterGroupQuotaExceededFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyDBClusterSnapshotError {
DBClusterSnapshotAlreadyExistsFault(String),
DBClusterSnapshotNotFoundFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBClusterStateFault(String),
KMSKeyNotAccessibleFault(String),
SnapshotQuotaExceededFault(String),
}
impl CopyDBClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyDBClusterSnapshotError> {
{
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[..] {
"DBClusterSnapshotAlreadyExistsFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::DBClusterSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::SnapshotQuotaExceededFault(
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 CopyDBClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyDBClusterSnapshotError {
fn description(&self) -> &str {
match *self {
CopyDBClusterSnapshotError::DBClusterSnapshotAlreadyExistsFault(ref cause) => cause,
CopyDBClusterSnapshotError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
CopyDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(ref cause) => cause,
CopyDBClusterSnapshotError::InvalidDBClusterStateFault(ref cause) => cause,
CopyDBClusterSnapshotError::KMSKeyNotAccessibleFault(ref cause) => cause,
CopyDBClusterSnapshotError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyDBParameterGroupError {
DBParameterGroupAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBParameterGroupQuotaExceededFault(String),
}
impl CopyDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyDBParameterGroupError> {
{
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[..] {
"DBParameterGroupAlreadyExists" => {
return RusotoError::Service(
CopyDBParameterGroupError::DBParameterGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
CopyDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBParameterGroupQuotaExceeded" => {
return RusotoError::Service(
CopyDBParameterGroupError::DBParameterGroupQuotaExceededFault(
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 CopyDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyDBParameterGroupError {
fn description(&self) -> &str {
match *self {
CopyDBParameterGroupError::DBParameterGroupAlreadyExistsFault(ref cause) => cause,
CopyDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
CopyDBParameterGroupError::DBParameterGroupQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBClusterError {
DBClusterAlreadyExistsFault(String),
DBClusterNotFoundFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBClusterQuotaExceededFault(String),
DBInstanceNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
InsufficientStorageClusterCapacityFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
InvalidDBSubnetGroupStateFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
StorageQuotaExceededFault(String),
}
impl CreateDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBClusterError> {
{
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[..] {
"DBClusterAlreadyExistsFault" => {
return RusotoError::Service(
CreateDBClusterError::DBClusterAlreadyExistsFault(parsed_error.message),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(CreateDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"DBClusterParameterGroupNotFound" => {
return RusotoError::Service(
CreateDBClusterError::DBClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterQuotaExceededFault" => {
return RusotoError::Service(
CreateDBClusterError::DBClusterQuotaExceededFault(parsed_error.message),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(CreateDBClusterError::DBInstanceNotFoundFault(
parsed_error.message,
))
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
CreateDBClusterError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
CreateDBClusterError::DBSubnetGroupNotFoundFault(parsed_error.message),
)
}
"InsufficientStorageClusterCapacity" => {
return RusotoError::Service(
CreateDBClusterError::InsufficientStorageClusterCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CreateDBClusterError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
CreateDBClusterError::InvalidDBInstanceStateFault(parsed_error.message),
)
}
"InvalidDBSubnetGroupStateFault" => {
return RusotoError::Service(
CreateDBClusterError::InvalidDBSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(CreateDBClusterError::InvalidSubnet(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
CreateDBClusterError::InvalidVPCNetworkStateFault(parsed_error.message),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
CreateDBClusterError::KMSKeyNotAccessibleFault(parsed_error.message),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
CreateDBClusterError::StorageQuotaExceededFault(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 CreateDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBClusterError {
fn description(&self) -> &str {
match *self {
CreateDBClusterError::DBClusterAlreadyExistsFault(ref cause) => cause,
CreateDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
CreateDBClusterError::DBClusterParameterGroupNotFoundFault(ref cause) => cause,
CreateDBClusterError::DBClusterQuotaExceededFault(ref cause) => cause,
CreateDBClusterError::DBInstanceNotFoundFault(ref cause) => cause,
CreateDBClusterError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
CreateDBClusterError::DBSubnetGroupNotFoundFault(ref cause) => cause,
CreateDBClusterError::InsufficientStorageClusterCapacityFault(ref cause) => cause,
CreateDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
CreateDBClusterError::InvalidDBInstanceStateFault(ref cause) => cause,
CreateDBClusterError::InvalidDBSubnetGroupStateFault(ref cause) => cause,
CreateDBClusterError::InvalidSubnet(ref cause) => cause,
CreateDBClusterError::InvalidVPCNetworkStateFault(ref cause) => cause,
CreateDBClusterError::KMSKeyNotAccessibleFault(ref cause) => cause,
CreateDBClusterError::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBClusterParameterGroupError {
DBParameterGroupAlreadyExistsFault(String),
DBParameterGroupQuotaExceededFault(String),
}
impl CreateDBClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateDBClusterParameterGroupError> {
{
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[..] {
"DBParameterGroupAlreadyExists" => {
return RusotoError::Service(
CreateDBClusterParameterGroupError::DBParameterGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupQuotaExceeded" => {
return RusotoError::Service(
CreateDBClusterParameterGroupError::DBParameterGroupQuotaExceededFault(
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 CreateDBClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
CreateDBClusterParameterGroupError::DBParameterGroupAlreadyExistsFault(ref cause) => {
cause
}
CreateDBClusterParameterGroupError::DBParameterGroupQuotaExceededFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBClusterSnapshotError {
DBClusterNotFoundFault(String),
DBClusterSnapshotAlreadyExistsFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBClusterStateFault(String),
SnapshotQuotaExceededFault(String),
}
impl CreateDBClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBClusterSnapshotError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
CreateDBClusterSnapshotError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterSnapshotAlreadyExistsFault" => {
return RusotoError::Service(
CreateDBClusterSnapshotError::DBClusterSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
CreateDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CreateDBClusterSnapshotError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
CreateDBClusterSnapshotError::SnapshotQuotaExceededFault(
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 CreateDBClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBClusterSnapshotError {
fn description(&self) -> &str {
match *self {
CreateDBClusterSnapshotError::DBClusterNotFoundFault(ref cause) => cause,
CreateDBClusterSnapshotError::DBClusterSnapshotAlreadyExistsFault(ref cause) => cause,
CreateDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(ref cause) => cause,
CreateDBClusterSnapshotError::InvalidDBClusterStateFault(ref cause) => cause,
CreateDBClusterSnapshotError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBInstanceError {
AuthorizationNotFoundFault(String),
DBClusterNotFoundFault(String),
DBInstanceAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
DomainNotFoundFault(String),
InstanceQuotaExceededFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBClusterStateFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl CreateDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBInstanceError> {
{
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(
CreateDBInstanceError::AuthorizationNotFoundFault(parsed_error.message),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(CreateDBInstanceError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
CreateDBInstanceError::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
CreateDBInstanceError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
CreateDBInstanceError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
CreateDBInstanceError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
CreateDBInstanceError::DBSubnetGroupNotFoundFault(parsed_error.message),
)
}
"DomainNotFoundFault" => {
return RusotoError::Service(CreateDBInstanceError::DomainNotFoundFault(
parsed_error.message,
))
}
"InstanceQuotaExceeded" => {
return RusotoError::Service(
CreateDBInstanceError::InstanceQuotaExceededFault(parsed_error.message),
)
}
"InsufficientDBInstanceCapacity" => {
return RusotoError::Service(
CreateDBInstanceError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CreateDBInstanceError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidSubnet" => {
return RusotoError::Service(CreateDBInstanceError::InvalidSubnet(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
CreateDBInstanceError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
CreateDBInstanceError::KMSKeyNotAccessibleFault(parsed_error.message),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
CreateDBInstanceError::OptionGroupNotFoundFault(parsed_error.message),
)
}
"ProvisionedIopsNotAvailableInAZFault" => {
return RusotoError::Service(
CreateDBInstanceError::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
CreateDBInstanceError::StorageQuotaExceededFault(parsed_error.message),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
CreateDBInstanceError::StorageTypeNotSupportedFault(
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 CreateDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBInstanceError {
fn description(&self) -> &str {
match *self {
CreateDBInstanceError::AuthorizationNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBClusterNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBInstanceAlreadyExistsFault(ref cause) => cause,
CreateDBInstanceError::DBParameterGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBSecurityGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
CreateDBInstanceError::DBSubnetGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DomainNotFoundFault(ref cause) => cause,
CreateDBInstanceError::InstanceQuotaExceededFault(ref cause) => cause,
CreateDBInstanceError::InsufficientDBInstanceCapacityFault(ref cause) => cause,
CreateDBInstanceError::InvalidDBClusterStateFault(ref cause) => cause,
CreateDBInstanceError::InvalidSubnet(ref cause) => cause,
CreateDBInstanceError::InvalidVPCNetworkStateFault(ref cause) => cause,
CreateDBInstanceError::KMSKeyNotAccessibleFault(ref cause) => cause,
CreateDBInstanceError::OptionGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::ProvisionedIopsNotAvailableInAZFault(ref cause) => cause,
CreateDBInstanceError::StorageQuotaExceededFault(ref cause) => cause,
CreateDBInstanceError::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBParameterGroupError {
DBParameterGroupAlreadyExistsFault(String),
DBParameterGroupQuotaExceededFault(String),
}
impl CreateDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBParameterGroupError> {
{
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[..] {
"DBParameterGroupAlreadyExists" => {
return RusotoError::Service(
CreateDBParameterGroupError::DBParameterGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupQuotaExceeded" => {
return RusotoError::Service(
CreateDBParameterGroupError::DBParameterGroupQuotaExceededFault(
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 CreateDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBParameterGroupError {
fn description(&self) -> &str {
match *self {
CreateDBParameterGroupError::DBParameterGroupAlreadyExistsFault(ref cause) => cause,
CreateDBParameterGroupError::DBParameterGroupQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBSubnetGroupError {
DBSubnetGroupAlreadyExistsFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupQuotaExceededFault(String),
DBSubnetQuotaExceededFault(String),
InvalidSubnet(String),
}
impl CreateDBSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBSubnetGroupError> {
{
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[..] {
"DBSubnetGroupAlreadyExists" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupQuotaExceeded" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetGroupQuotaExceededFault(
parsed_error.message,
),
)
}
"DBSubnetQuotaExceededFault" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(CreateDBSubnetGroupError::InvalidSubnet(
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 CreateDBSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBSubnetGroupError {
fn description(&self) -> &str {
match *self {
CreateDBSubnetGroupError::DBSubnetGroupAlreadyExistsFault(ref cause) => cause,
CreateDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
CreateDBSubnetGroupError::DBSubnetGroupQuotaExceededFault(ref cause) => cause,
CreateDBSubnetGroupError::DBSubnetQuotaExceededFault(ref cause) => cause,
CreateDBSubnetGroupError::InvalidSubnet(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateEventSubscriptionError {
EventSubscriptionQuotaExceededFault(String),
SNSInvalidTopicFault(String),
SNSNoAuthorizationFault(String),
SNSTopicArnNotFoundFault(String),
SourceNotFoundFault(String),
SubscriptionAlreadyExistFault(String),
SubscriptionCategoryNotFoundFault(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,
),
)
}
"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,
),
)
}
_ => {}
}
}
}
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::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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBClusterError {
DBClusterNotFoundFault(String),
DBClusterSnapshotAlreadyExistsFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBClusterStateFault(String),
SnapshotQuotaExceededFault(String),
}
impl DeleteDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBClusterError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(DeleteDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"DBClusterSnapshotAlreadyExistsFault" => {
return RusotoError::Service(
DeleteDBClusterError::DBClusterSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
DeleteDBClusterError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
DeleteDBClusterError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
DeleteDBClusterError::SnapshotQuotaExceededFault(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 DeleteDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBClusterError {
fn description(&self) -> &str {
match *self {
DeleteDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
DeleteDBClusterError::DBClusterSnapshotAlreadyExistsFault(ref cause) => cause,
DeleteDBClusterError::InvalidDBClusterSnapshotStateFault(ref cause) => cause,
DeleteDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
DeleteDBClusterError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBClusterParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl DeleteDBClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteDBClusterParameterGroupError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DeleteDBClusterParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
DeleteDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(
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 DeleteDBClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
DeleteDBClusterParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
DeleteDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBClusterSnapshotError {
DBClusterSnapshotNotFoundFault(String),
InvalidDBClusterSnapshotStateFault(String),
}
impl DeleteDBClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBClusterSnapshotError> {
{
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[..] {
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
DeleteDBClusterSnapshotError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
DeleteDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(
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 DeleteDBClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBClusterSnapshotError {
fn description(&self) -> &str {
match *self {
DeleteDBClusterSnapshotError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
DeleteDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBInstanceError {
DBInstanceNotFoundFault(String),
DBSnapshotAlreadyExistsFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
SnapshotQuotaExceededFault(String),
}
impl DeleteDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBInstanceError> {
{
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[..] {
"DBInstanceNotFound" => {
return RusotoError::Service(
DeleteDBInstanceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBSnapshotAlreadyExists" => {
return RusotoError::Service(
DeleteDBInstanceError::DBSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
DeleteDBInstanceError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
DeleteDBInstanceError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
DeleteDBInstanceError::SnapshotQuotaExceededFault(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 DeleteDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBInstanceError {
fn description(&self) -> &str {
match *self {
DeleteDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
DeleteDBInstanceError::DBSnapshotAlreadyExistsFault(ref cause) => cause,
DeleteDBInstanceError::InvalidDBClusterStateFault(ref cause) => cause,
DeleteDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
DeleteDBInstanceError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl DeleteDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBParameterGroupError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DeleteDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
DeleteDBParameterGroupError::InvalidDBParameterGroupStateFault(
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 DeleteDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBParameterGroupError {
fn description(&self) -> &str {
match *self {
DeleteDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
DeleteDBParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBSubnetGroupError {
DBSubnetGroupNotFoundFault(String),
InvalidDBSubnetGroupStateFault(String),
InvalidDBSubnetStateFault(String),
}
impl DeleteDBSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBSubnetGroupError> {
{
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[..] {
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
DeleteDBSubnetGroupError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBSubnetGroupStateFault" => {
return RusotoError::Service(
DeleteDBSubnetGroupError::InvalidDBSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidDBSubnetStateFault" => {
return RusotoError::Service(
DeleteDBSubnetGroupError::InvalidDBSubnetStateFault(
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 DeleteDBSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBSubnetGroupError {
fn description(&self) -> &str {
match *self {
DeleteDBSubnetGroupError::DBSubnetGroupNotFoundFault(ref cause) => cause,
DeleteDBSubnetGroupError::InvalidDBSubnetGroupStateFault(ref cause) => cause,
DeleteDBSubnetGroupError::InvalidDBSubnetStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteEventSubscriptionError {
InvalidEventSubscriptionStateFault(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[..] {
"InvalidEventSubscriptionState" => {
return RusotoError::Service(
DeleteEventSubscriptionError::InvalidEventSubscriptionStateFault(
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::InvalidEventSubscriptionStateFault(ref cause) => cause,
DeleteEventSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBClusterParameterGroupsError {
DBParameterGroupNotFoundFault(String),
}
impl DescribeDBClusterParameterGroupsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBClusterParameterGroupsError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DescribeDBClusterParameterGroupsError::DBParameterGroupNotFoundFault(
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 DescribeDBClusterParameterGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBClusterParameterGroupsError {
fn description(&self) -> &str {
match *self {
DescribeDBClusterParameterGroupsError::DBParameterGroupNotFoundFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBClusterParametersError {
DBParameterGroupNotFoundFault(String),
}
impl DescribeDBClusterParametersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBClusterParametersError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DescribeDBClusterParametersError::DBParameterGroupNotFoundFault(
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 DescribeDBClusterParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBClusterParametersError {
fn description(&self) -> &str {
match *self {
DescribeDBClusterParametersError::DBParameterGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBClusterSnapshotAttributesError {
DBClusterSnapshotNotFoundFault(String),
}
impl DescribeDBClusterSnapshotAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBClusterSnapshotAttributesError> {
{
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[..] {
"DBClusterSnapshotNotFoundFault" => return RusotoError::Service(
DescribeDBClusterSnapshotAttributesError::DBClusterSnapshotNotFoundFault(
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 DescribeDBClusterSnapshotAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBClusterSnapshotAttributesError {
fn description(&self) -> &str {
match *self {
DescribeDBClusterSnapshotAttributesError::DBClusterSnapshotNotFoundFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBClusterSnapshotsError {
DBClusterSnapshotNotFoundFault(String),
}
impl DescribeDBClusterSnapshotsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBClusterSnapshotsError> {
{
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[..] {
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
DescribeDBClusterSnapshotsError::DBClusterSnapshotNotFoundFault(
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 DescribeDBClusterSnapshotsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBClusterSnapshotsError {
fn description(&self) -> &str {
match *self {
DescribeDBClusterSnapshotsError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBClustersError {
DBClusterNotFoundFault(String),
}
impl DescribeDBClustersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBClustersError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
DescribeDBClustersError::DBClusterNotFoundFault(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 DescribeDBClustersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBClustersError {
fn description(&self) -> &str {
match *self {
DescribeDBClustersError::DBClusterNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBEngineVersionsError {}
impl DescribeDBEngineVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBEngineVersionsError> {
{
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 DescribeDBEngineVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBEngineVersionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBInstancesError {
DBInstanceNotFoundFault(String),
}
impl DescribeDBInstancesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBInstancesError> {
{
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[..] {
"DBInstanceNotFound" => {
return RusotoError::Service(
DescribeDBInstancesError::DBInstanceNotFoundFault(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 DescribeDBInstancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBInstancesError {
fn description(&self) -> &str {
match *self {
DescribeDBInstancesError::DBInstanceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBParameterGroupsError {
DBParameterGroupNotFoundFault(String),
}
impl DescribeDBParameterGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBParameterGroupsError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DescribeDBParameterGroupsError::DBParameterGroupNotFoundFault(
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 DescribeDBParameterGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBParameterGroupsError {
fn description(&self) -> &str {
match *self {
DescribeDBParameterGroupsError::DBParameterGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBParametersError {
DBParameterGroupNotFoundFault(String),
}
impl DescribeDBParametersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBParametersError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DescribeDBParametersError::DBParameterGroupNotFoundFault(
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 DescribeDBParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBParametersError {
fn description(&self) -> &str {
match *self {
DescribeDBParametersError::DBParameterGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBSubnetGroupsError {
DBSubnetGroupNotFoundFault(String),
}
impl DescribeDBSubnetGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBSubnetGroupsError> {
{
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[..] {
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
DescribeDBSubnetGroupsError::DBSubnetGroupNotFoundFault(
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 DescribeDBSubnetGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBSubnetGroupsError {
fn description(&self) -> &str {
match *self {
DescribeDBSubnetGroupsError::DBSubnetGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEngineDefaultClusterParametersError {}
impl DescribeEngineDefaultClusterParametersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEngineDefaultClusterParametersError> {
{
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 DescribeEngineDefaultClusterParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEngineDefaultClusterParametersError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEngineDefaultParametersError {}
impl DescribeEngineDefaultParametersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEngineDefaultParametersError> {
{
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 DescribeEngineDefaultParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEngineDefaultParametersError {
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 {
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[..] {
"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::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 DescribeOrderableDBInstanceOptionsError {}
impl DescribeOrderableDBInstanceOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeOrderableDBInstanceOptionsError> {
{
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 DescribeOrderableDBInstanceOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeOrderableDBInstanceOptionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePendingMaintenanceActionsError {
ResourceNotFoundFault(String),
}
impl DescribePendingMaintenanceActionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribePendingMaintenanceActionsError> {
{
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[..] {
"ResourceNotFoundFault" => {
return RusotoError::Service(
DescribePendingMaintenanceActionsError::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 DescribePendingMaintenanceActionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePendingMaintenanceActionsError {
fn description(&self) -> &str {
match *self {
DescribePendingMaintenanceActionsError::ResourceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeValidDBInstanceModificationsError {
DBInstanceNotFoundFault(String),
InvalidDBInstanceStateFault(String),
}
impl DescribeValidDBInstanceModificationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeValidDBInstanceModificationsError> {
{
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[..] {
"DBInstanceNotFound" => {
return RusotoError::Service(
DescribeValidDBInstanceModificationsError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
DescribeValidDBInstanceModificationsError::InvalidDBInstanceStateFault(
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 DescribeValidDBInstanceModificationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeValidDBInstanceModificationsError {
fn description(&self) -> &str {
match *self {
DescribeValidDBInstanceModificationsError::DBInstanceNotFoundFault(ref cause) => cause,
DescribeValidDBInstanceModificationsError::InvalidDBInstanceStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum FailoverDBClusterError {
DBClusterNotFoundFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
}
impl FailoverDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<FailoverDBClusterError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
FailoverDBClusterError::DBClusterNotFoundFault(parsed_error.message),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
FailoverDBClusterError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
FailoverDBClusterError::InvalidDBInstanceStateFault(
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 FailoverDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for FailoverDBClusterError {
fn description(&self) -> &str {
match *self {
FailoverDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
FailoverDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
FailoverDBClusterError::InvalidDBInstanceStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
DBSnapshotNotFoundFault(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
ListTagsForResourceError::DBClusterNotFoundFault(parsed_error.message),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
ListTagsForResourceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
ListTagsForResourceError::DBSnapshotNotFoundFault(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::DBClusterNotFoundFault(ref cause) => cause,
ListTagsForResourceError::DBInstanceNotFoundFault(ref cause) => cause,
ListTagsForResourceError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBClusterError {
DBClusterAlreadyExistsFault(String),
DBClusterNotFoundFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBSubnetGroupNotFoundFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
InvalidDBSecurityGroupStateFault(String),
InvalidDBSubnetGroupStateFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
StorageQuotaExceededFault(String),
}
impl ModifyDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBClusterError> {
{
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[..] {
"DBClusterAlreadyExistsFault" => {
return RusotoError::Service(
ModifyDBClusterError::DBClusterAlreadyExistsFault(parsed_error.message),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(ModifyDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"DBClusterParameterGroupNotFound" => {
return RusotoError::Service(
ModifyDBClusterError::DBClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
ModifyDBClusterError::DBSubnetGroupNotFoundFault(parsed_error.message),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
ModifyDBClusterError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
ModifyDBClusterError::InvalidDBInstanceStateFault(parsed_error.message),
)
}
"InvalidDBSecurityGroupState" => {
return RusotoError::Service(
ModifyDBClusterError::InvalidDBSecurityGroupStateFault(
parsed_error.message,
),
)
}
"InvalidDBSubnetGroupStateFault" => {
return RusotoError::Service(
ModifyDBClusterError::InvalidDBSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(ModifyDBClusterError::InvalidSubnet(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
ModifyDBClusterError::InvalidVPCNetworkStateFault(parsed_error.message),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
ModifyDBClusterError::StorageQuotaExceededFault(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 ModifyDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBClusterError {
fn description(&self) -> &str {
match *self {
ModifyDBClusterError::DBClusterAlreadyExistsFault(ref cause) => cause,
ModifyDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
ModifyDBClusterError::DBClusterParameterGroupNotFoundFault(ref cause) => cause,
ModifyDBClusterError::DBSubnetGroupNotFoundFault(ref cause) => cause,
ModifyDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
ModifyDBClusterError::InvalidDBInstanceStateFault(ref cause) => cause,
ModifyDBClusterError::InvalidDBSecurityGroupStateFault(ref cause) => cause,
ModifyDBClusterError::InvalidDBSubnetGroupStateFault(ref cause) => cause,
ModifyDBClusterError::InvalidSubnet(ref cause) => cause,
ModifyDBClusterError::InvalidVPCNetworkStateFault(ref cause) => cause,
ModifyDBClusterError::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBClusterParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl ModifyDBClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyDBClusterParameterGroupError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ModifyDBClusterParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
ModifyDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(
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 ModifyDBClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
ModifyDBClusterParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
ModifyDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBClusterSnapshotAttributeError {
DBClusterSnapshotNotFoundFault(String),
InvalidDBClusterSnapshotStateFault(String),
SharedSnapshotQuotaExceededFault(String),
}
impl ModifyDBClusterSnapshotAttributeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyDBClusterSnapshotAttributeError> {
{
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[..] {
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
ModifyDBClusterSnapshotAttributeError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterSnapshotStateFault" => return RusotoError::Service(
ModifyDBClusterSnapshotAttributeError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
),
"SharedSnapshotQuotaExceeded" => {
return RusotoError::Service(
ModifyDBClusterSnapshotAttributeError::SharedSnapshotQuotaExceededFault(
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 ModifyDBClusterSnapshotAttributeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBClusterSnapshotAttributeError {
fn description(&self) -> &str {
match *self {
ModifyDBClusterSnapshotAttributeError::DBClusterSnapshotNotFoundFault(ref cause) => {
cause
}
ModifyDBClusterSnapshotAttributeError::InvalidDBClusterSnapshotStateFault(
ref cause,
) => cause,
ModifyDBClusterSnapshotAttributeError::SharedSnapshotQuotaExceededFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBInstanceError {
AuthorizationNotFoundFault(String),
CertificateNotFoundFault(String),
DBInstanceAlreadyExistsFault(String),
DBInstanceNotFoundFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBUpgradeDependencyFailureFault(String),
DomainNotFoundFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBInstanceStateFault(String),
InvalidDBSecurityGroupStateFault(String),
InvalidVPCNetworkStateFault(String),
OptionGroupNotFoundFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl ModifyDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBInstanceError> {
{
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(
ModifyDBInstanceError::AuthorizationNotFoundFault(parsed_error.message),
)
}
"CertificateNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::CertificateNotFoundFault(parsed_error.message),
)
}
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
ModifyDBInstanceError::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBUpgradeDependencyFailure" => {
return RusotoError::Service(
ModifyDBInstanceError::DBUpgradeDependencyFailureFault(
parsed_error.message,
),
)
}
"DomainNotFoundFault" => {
return RusotoError::Service(ModifyDBInstanceError::DomainNotFoundFault(
parsed_error.message,
))
}
"InsufficientDBInstanceCapacity" => {
return RusotoError::Service(
ModifyDBInstanceError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
ModifyDBInstanceError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"InvalidDBSecurityGroupState" => {
return RusotoError::Service(
ModifyDBInstanceError::InvalidDBSecurityGroupStateFault(
parsed_error.message,
),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
ModifyDBInstanceError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
ModifyDBInstanceError::OptionGroupNotFoundFault(parsed_error.message),
)
}
"ProvisionedIopsNotAvailableInAZFault" => {
return RusotoError::Service(
ModifyDBInstanceError::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
ModifyDBInstanceError::StorageQuotaExceededFault(parsed_error.message),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
ModifyDBInstanceError::StorageTypeNotSupportedFault(
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 ModifyDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBInstanceError {
fn description(&self) -> &str {
match *self {
ModifyDBInstanceError::AuthorizationNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::CertificateNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBInstanceAlreadyExistsFault(ref cause) => cause,
ModifyDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBParameterGroupNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBSecurityGroupNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBUpgradeDependencyFailureFault(ref cause) => cause,
ModifyDBInstanceError::DomainNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::InsufficientDBInstanceCapacityFault(ref cause) => cause,
ModifyDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
ModifyDBInstanceError::InvalidDBSecurityGroupStateFault(ref cause) => cause,
ModifyDBInstanceError::InvalidVPCNetworkStateFault(ref cause) => cause,
ModifyDBInstanceError::OptionGroupNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::ProvisionedIopsNotAvailableInAZFault(ref cause) => cause,
ModifyDBInstanceError::StorageQuotaExceededFault(ref cause) => cause,
ModifyDBInstanceError::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl ModifyDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBParameterGroupError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ModifyDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
ModifyDBParameterGroupError::InvalidDBParameterGroupStateFault(
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 ModifyDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBParameterGroupError {
fn description(&self) -> &str {
match *self {
ModifyDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
ModifyDBParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBSubnetGroupError {
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
DBSubnetQuotaExceededFault(String),
InvalidSubnet(String),
SubnetAlreadyInUse(String),
}
impl ModifyDBSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBSubnetGroupError> {
{
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[..] {
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
ModifyDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
ModifyDBSubnetGroupError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetQuotaExceededFault" => {
return RusotoError::Service(
ModifyDBSubnetGroupError::DBSubnetQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(ModifyDBSubnetGroupError::InvalidSubnet(
parsed_error.message,
))
}
"SubnetAlreadyInUse" => {
return RusotoError::Service(ModifyDBSubnetGroupError::SubnetAlreadyInUse(
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 ModifyDBSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBSubnetGroupError {
fn description(&self) -> &str {
match *self {
ModifyDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
ModifyDBSubnetGroupError::DBSubnetGroupNotFoundFault(ref cause) => cause,
ModifyDBSubnetGroupError::DBSubnetQuotaExceededFault(ref cause) => cause,
ModifyDBSubnetGroupError::InvalidSubnet(ref cause) => cause,
ModifyDBSubnetGroupError::SubnetAlreadyInUse(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyEventSubscriptionError {
EventSubscriptionQuotaExceededFault(String),
SNSInvalidTopicFault(String),
SNSNoAuthorizationFault(String),
SNSTopicArnNotFoundFault(String),
SubscriptionCategoryNotFoundFault(String),
SubscriptionNotFoundFault(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[..] {
"EventSubscriptionQuotaExceeded" => {
return RusotoError::Service(
ModifyEventSubscriptionError::EventSubscriptionQuotaExceededFault(
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,
),
)
}
"SubscriptionCategoryNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SubscriptionCategoryNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::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 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::EventSubscriptionQuotaExceededFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSInvalidTopicFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSNoAuthorizationFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSTopicArnNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionCategoryNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PromoteReadReplicaDBClusterError {
DBClusterNotFoundFault(String),
InvalidDBClusterStateFault(String),
}
impl PromoteReadReplicaDBClusterError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PromoteReadReplicaDBClusterError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
PromoteReadReplicaDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
PromoteReadReplicaDBClusterError::InvalidDBClusterStateFault(
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 PromoteReadReplicaDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PromoteReadReplicaDBClusterError {
fn description(&self) -> &str {
match *self {
PromoteReadReplicaDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
PromoteReadReplicaDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RebootDBInstanceError {
DBInstanceNotFoundFault(String),
InvalidDBInstanceStateFault(String),
}
impl RebootDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RebootDBInstanceError> {
{
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[..] {
"DBInstanceNotFound" => {
return RusotoError::Service(
RebootDBInstanceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
RebootDBInstanceError::InvalidDBInstanceStateFault(
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 RebootDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RebootDBInstanceError {
fn description(&self) -> &str {
match *self {
RebootDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
RebootDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveRoleFromDBClusterError {
DBClusterNotFoundFault(String),
DBClusterRoleNotFoundFault(String),
InvalidDBClusterStateFault(String),
}
impl RemoveRoleFromDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveRoleFromDBClusterError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
RemoveRoleFromDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterRoleNotFound" => {
return RusotoError::Service(
RemoveRoleFromDBClusterError::DBClusterRoleNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
RemoveRoleFromDBClusterError::InvalidDBClusterStateFault(
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 RemoveRoleFromDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveRoleFromDBClusterError {
fn description(&self) -> &str {
match *self {
RemoveRoleFromDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
RemoveRoleFromDBClusterError::DBClusterRoleNotFoundFault(ref cause) => cause,
RemoveRoleFromDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveSourceIdentifierFromSubscriptionError {
SourceNotFoundFault(String),
SubscriptionNotFoundFault(String),
}
impl RemoveSourceIdentifierFromSubscriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RemoveSourceIdentifierFromSubscriptionError> {
{
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[..] {
"SourceNotFound" => {
return RusotoError::Service(
RemoveSourceIdentifierFromSubscriptionError::SourceNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
RemoveSourceIdentifierFromSubscriptionError::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 RemoveSourceIdentifierFromSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveSourceIdentifierFromSubscriptionError {
fn description(&self) -> &str {
match *self {
RemoveSourceIdentifierFromSubscriptionError::SourceNotFoundFault(ref cause) => cause,
RemoveSourceIdentifierFromSubscriptionError::SubscriptionNotFoundFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsFromResourceError {
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
DBSnapshotNotFoundFault(String),
}
impl RemoveTagsFromResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromResourceError> {
{
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[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
RemoveTagsFromResourceError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
RemoveTagsFromResourceError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
RemoveTagsFromResourceError::DBSnapshotNotFoundFault(
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 RemoveTagsFromResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveTagsFromResourceError {
fn description(&self) -> &str {
match *self {
RemoveTagsFromResourceError::DBClusterNotFoundFault(ref cause) => cause,
RemoveTagsFromResourceError::DBInstanceNotFoundFault(ref cause) => cause,
RemoveTagsFromResourceError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetDBClusterParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl ResetDBClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ResetDBClusterParameterGroupError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ResetDBClusterParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
ResetDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(
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 ResetDBClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetDBClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
ResetDBClusterParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
ResetDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetDBParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl ResetDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResetDBParameterGroupError> {
{
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[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ResetDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
ResetDBParameterGroupError::InvalidDBParameterGroupStateFault(
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 ResetDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetDBParameterGroupError {
fn description(&self) -> &str {
match *self {
ResetDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
ResetDBParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBClusterFromSnapshotError {
DBClusterAlreadyExistsFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBClusterQuotaExceededFault(String),
DBClusterSnapshotNotFoundFault(String),
DBSnapshotNotFoundFault(String),
DBSubnetGroupNotFoundFault(String),
InsufficientDBClusterCapacityFault(String),
InsufficientStorageClusterCapacityFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBSnapshotStateFault(String),
InvalidRestoreFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
StorageQuotaExceededFault(String),
}
impl RestoreDBClusterFromSnapshotError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreDBClusterFromSnapshotError> {
{
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[..] {
"DBClusterAlreadyExistsFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterParameterGroupNotFound" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterQuotaExceededFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterQuotaExceededFault(
parsed_error.message,
),
)
}
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InsufficientDBClusterCapacityFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InsufficientDBClusterCapacityFault(
parsed_error.message,
),
)
}
"InsufficientStorageClusterCapacity" => return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InsufficientStorageClusterCapacityFault(
parsed_error.message,
),
),
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBSnapshotState" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidDBSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidRestoreFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidRestoreFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidSubnet(parsed_error.message),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::StorageQuotaExceededFault(
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 RestoreDBClusterFromSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBClusterFromSnapshotError {
fn description(&self) -> &str {
match *self {
RestoreDBClusterFromSnapshotError::DBClusterAlreadyExistsFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBClusterParameterGroupNotFoundFault(ref cause) => {
cause
}
RestoreDBClusterFromSnapshotError::DBClusterQuotaExceededFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBSnapshotNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InsufficientDBClusterCapacityFault(ref cause) => {
cause
}
RestoreDBClusterFromSnapshotError::InsufficientStorageClusterCapacityFault(
ref cause,
) => cause,
RestoreDBClusterFromSnapshotError::InvalidDBClusterSnapshotStateFault(ref cause) => {
cause
}
RestoreDBClusterFromSnapshotError::InvalidDBSnapshotStateFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InvalidRestoreFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InvalidSubnet(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::OptionGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBClusterToPointInTimeError {
DBClusterAlreadyExistsFault(String),
DBClusterNotFoundFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBClusterQuotaExceededFault(String),
DBClusterSnapshotNotFoundFault(String),
DBSubnetGroupNotFoundFault(String),
InsufficientDBClusterCapacityFault(String),
InsufficientStorageClusterCapacityFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBClusterStateFault(String),
InvalidDBSnapshotStateFault(String),
InvalidRestoreFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
StorageQuotaExceededFault(String),
}
impl RestoreDBClusterToPointInTimeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreDBClusterToPointInTimeError> {
{
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[..] {
"DBClusterAlreadyExistsFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterParameterGroupNotFound" => return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterParameterGroupNotFoundFault(
parsed_error.message,
),
),
"DBClusterQuotaExceededFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterQuotaExceededFault(
parsed_error.message,
),
)
}
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InsufficientDBClusterCapacityFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InsufficientDBClusterCapacityFault(
parsed_error.message,
),
)
}
"InsufficientStorageClusterCapacity" => return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InsufficientStorageClusterCapacityFault(
parsed_error.message,
),
),
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBSnapshotState" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidDBSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidRestoreFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidRestoreFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidSubnet(parsed_error.message),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::StorageQuotaExceededFault(
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 RestoreDBClusterToPointInTimeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBClusterToPointInTimeError {
fn description(&self) -> &str {
match *self {
RestoreDBClusterToPointInTimeError::DBClusterAlreadyExistsFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBClusterNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBClusterParameterGroupNotFoundFault(ref cause) => {
cause
}
RestoreDBClusterToPointInTimeError::DBClusterQuotaExceededFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InsufficientDBClusterCapacityFault(ref cause) => {
cause
}
RestoreDBClusterToPointInTimeError::InsufficientStorageClusterCapacityFault(
ref cause,
) => cause,
RestoreDBClusterToPointInTimeError::InvalidDBClusterSnapshotStateFault(ref cause) => {
cause
}
RestoreDBClusterToPointInTimeError::InvalidDBClusterStateFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidDBSnapshotStateFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidRestoreFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidSubnet(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::OptionGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
pub trait Neptune {
fn add_role_to_db_cluster(
&self,
input: AddRoleToDBClusterMessage,
) -> RusotoFuture<(), AddRoleToDBClusterError>;
fn add_source_identifier_to_subscription(
&self,
input: AddSourceIdentifierToSubscriptionMessage,
) -> RusotoFuture<AddSourceIdentifierToSubscriptionResult, AddSourceIdentifierToSubscriptionError>;
fn add_tags_to_resource(
&self,
input: AddTagsToResourceMessage,
) -> RusotoFuture<(), AddTagsToResourceError>;
fn apply_pending_maintenance_action(
&self,
input: ApplyPendingMaintenanceActionMessage,
) -> RusotoFuture<ApplyPendingMaintenanceActionResult, ApplyPendingMaintenanceActionError>;
fn copy_db_cluster_parameter_group(
&self,
input: CopyDBClusterParameterGroupMessage,
) -> RusotoFuture<CopyDBClusterParameterGroupResult, CopyDBClusterParameterGroupError>;
fn copy_db_cluster_snapshot(
&self,
input: CopyDBClusterSnapshotMessage,
) -> RusotoFuture<CopyDBClusterSnapshotResult, CopyDBClusterSnapshotError>;
fn copy_db_parameter_group(
&self,
input: CopyDBParameterGroupMessage,
) -> RusotoFuture<CopyDBParameterGroupResult, CopyDBParameterGroupError>;
fn create_db_cluster(
&self,
input: CreateDBClusterMessage,
) -> RusotoFuture<CreateDBClusterResult, CreateDBClusterError>;
fn create_db_cluster_parameter_group(
&self,
input: CreateDBClusterParameterGroupMessage,
) -> RusotoFuture<CreateDBClusterParameterGroupResult, CreateDBClusterParameterGroupError>;
fn create_db_cluster_snapshot(
&self,
input: CreateDBClusterSnapshotMessage,
) -> RusotoFuture<CreateDBClusterSnapshotResult, CreateDBClusterSnapshotError>;
fn create_db_instance(
&self,
input: CreateDBInstanceMessage,
) -> RusotoFuture<CreateDBInstanceResult, CreateDBInstanceError>;
fn create_db_parameter_group(
&self,
input: CreateDBParameterGroupMessage,
) -> RusotoFuture<CreateDBParameterGroupResult, CreateDBParameterGroupError>;
fn create_db_subnet_group(
&self,
input: CreateDBSubnetGroupMessage,
) -> RusotoFuture<CreateDBSubnetGroupResult, CreateDBSubnetGroupError>;
fn create_event_subscription(
&self,
input: CreateEventSubscriptionMessage,
) -> RusotoFuture<CreateEventSubscriptionResult, CreateEventSubscriptionError>;
fn delete_db_cluster(
&self,
input: DeleteDBClusterMessage,
) -> RusotoFuture<DeleteDBClusterResult, DeleteDBClusterError>;
fn delete_db_cluster_parameter_group(
&self,
input: DeleteDBClusterParameterGroupMessage,
) -> RusotoFuture<(), DeleteDBClusterParameterGroupError>;
fn delete_db_cluster_snapshot(
&self,
input: DeleteDBClusterSnapshotMessage,
) -> RusotoFuture<DeleteDBClusterSnapshotResult, DeleteDBClusterSnapshotError>;
fn delete_db_instance(
&self,
input: DeleteDBInstanceMessage,
) -> RusotoFuture<DeleteDBInstanceResult, DeleteDBInstanceError>;
fn delete_db_parameter_group(
&self,
input: DeleteDBParameterGroupMessage,
) -> RusotoFuture<(), DeleteDBParameterGroupError>;
fn delete_db_subnet_group(
&self,
input: DeleteDBSubnetGroupMessage,
) -> RusotoFuture<(), DeleteDBSubnetGroupError>;
fn delete_event_subscription(
&self,
input: DeleteEventSubscriptionMessage,
) -> RusotoFuture<DeleteEventSubscriptionResult, DeleteEventSubscriptionError>;
fn describe_db_cluster_parameter_groups(
&self,
input: DescribeDBClusterParameterGroupsMessage,
) -> RusotoFuture<DBClusterParameterGroupsMessage, DescribeDBClusterParameterGroupsError>;
fn describe_db_cluster_parameters(
&self,
input: DescribeDBClusterParametersMessage,
) -> RusotoFuture<DBClusterParameterGroupDetails, DescribeDBClusterParametersError>;
fn describe_db_cluster_snapshot_attributes(
&self,
input: DescribeDBClusterSnapshotAttributesMessage,
) -> RusotoFuture<
DescribeDBClusterSnapshotAttributesResult,
DescribeDBClusterSnapshotAttributesError,
>;
fn describe_db_cluster_snapshots(
&self,
input: DescribeDBClusterSnapshotsMessage,
) -> RusotoFuture<DBClusterSnapshotMessage, DescribeDBClusterSnapshotsError>;
fn describe_db_clusters(
&self,
input: DescribeDBClustersMessage,
) -> RusotoFuture<DBClusterMessage, DescribeDBClustersError>;
fn describe_db_engine_versions(
&self,
input: DescribeDBEngineVersionsMessage,
) -> RusotoFuture<DBEngineVersionMessage, DescribeDBEngineVersionsError>;
fn describe_db_instances(
&self,
input: DescribeDBInstancesMessage,
) -> RusotoFuture<DBInstanceMessage, DescribeDBInstancesError>;
fn describe_db_parameter_groups(
&self,
input: DescribeDBParameterGroupsMessage,
) -> RusotoFuture<DBParameterGroupsMessage, DescribeDBParameterGroupsError>;
fn describe_db_parameters(
&self,
input: DescribeDBParametersMessage,
) -> RusotoFuture<DBParameterGroupDetails, DescribeDBParametersError>;
fn describe_db_subnet_groups(
&self,
input: DescribeDBSubnetGroupsMessage,
) -> RusotoFuture<DBSubnetGroupMessage, DescribeDBSubnetGroupsError>;
fn describe_engine_default_cluster_parameters(
&self,
input: DescribeEngineDefaultClusterParametersMessage,
) -> RusotoFuture<
DescribeEngineDefaultClusterParametersResult,
DescribeEngineDefaultClusterParametersError,
>;
fn describe_engine_default_parameters(
&self,
input: DescribeEngineDefaultParametersMessage,
) -> RusotoFuture<DescribeEngineDefaultParametersResult, DescribeEngineDefaultParametersError>;
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_orderable_db_instance_options(
&self,
input: DescribeOrderableDBInstanceOptionsMessage,
) -> RusotoFuture<OrderableDBInstanceOptionsMessage, DescribeOrderableDBInstanceOptionsError>;
fn describe_pending_maintenance_actions(
&self,
input: DescribePendingMaintenanceActionsMessage,
) -> RusotoFuture<PendingMaintenanceActionsMessage, DescribePendingMaintenanceActionsError>;
fn describe_valid_db_instance_modifications(
&self,
input: DescribeValidDBInstanceModificationsMessage,
) -> RusotoFuture<
DescribeValidDBInstanceModificationsResult,
DescribeValidDBInstanceModificationsError,
>;
fn failover_db_cluster(
&self,
input: FailoverDBClusterMessage,
) -> RusotoFuture<FailoverDBClusterResult, FailoverDBClusterError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceMessage,
) -> RusotoFuture<TagListMessage, ListTagsForResourceError>;
fn modify_db_cluster(
&self,
input: ModifyDBClusterMessage,
) -> RusotoFuture<ModifyDBClusterResult, ModifyDBClusterError>;
fn modify_db_cluster_parameter_group(
&self,
input: ModifyDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ModifyDBClusterParameterGroupError>;
fn modify_db_cluster_snapshot_attribute(
&self,
input: ModifyDBClusterSnapshotAttributeMessage,
) -> RusotoFuture<ModifyDBClusterSnapshotAttributeResult, ModifyDBClusterSnapshotAttributeError>;
fn modify_db_instance(
&self,
input: ModifyDBInstanceMessage,
) -> RusotoFuture<ModifyDBInstanceResult, ModifyDBInstanceError>;
fn modify_db_parameter_group(
&self,
input: ModifyDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ModifyDBParameterGroupError>;
fn modify_db_subnet_group(
&self,
input: ModifyDBSubnetGroupMessage,
) -> RusotoFuture<ModifyDBSubnetGroupResult, ModifyDBSubnetGroupError>;
fn modify_event_subscription(
&self,
input: ModifyEventSubscriptionMessage,
) -> RusotoFuture<ModifyEventSubscriptionResult, ModifyEventSubscriptionError>;
fn promote_read_replica_db_cluster(
&self,
input: PromoteReadReplicaDBClusterMessage,
) -> RusotoFuture<PromoteReadReplicaDBClusterResult, PromoteReadReplicaDBClusterError>;
fn reboot_db_instance(
&self,
input: RebootDBInstanceMessage,
) -> RusotoFuture<RebootDBInstanceResult, RebootDBInstanceError>;
fn remove_role_from_db_cluster(
&self,
input: RemoveRoleFromDBClusterMessage,
) -> RusotoFuture<(), RemoveRoleFromDBClusterError>;
fn remove_source_identifier_from_subscription(
&self,
input: RemoveSourceIdentifierFromSubscriptionMessage,
) -> RusotoFuture<
RemoveSourceIdentifierFromSubscriptionResult,
RemoveSourceIdentifierFromSubscriptionError,
>;
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceMessage,
) -> RusotoFuture<(), RemoveTagsFromResourceError>;
fn reset_db_cluster_parameter_group(
&self,
input: ResetDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ResetDBClusterParameterGroupError>;
fn reset_db_parameter_group(
&self,
input: ResetDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ResetDBParameterGroupError>;
fn restore_db_cluster_from_snapshot(
&self,
input: RestoreDBClusterFromSnapshotMessage,
) -> RusotoFuture<RestoreDBClusterFromSnapshotResult, RestoreDBClusterFromSnapshotError>;
fn restore_db_cluster_to_point_in_time(
&self,
input: RestoreDBClusterToPointInTimeMessage,
) -> RusotoFuture<RestoreDBClusterToPointInTimeResult, RestoreDBClusterToPointInTimeError>;
}
#[derive(Clone)]
pub struct NeptuneClient {
client: Client,
region: region::Region,
}
impl NeptuneClient {
pub fn new(region: region::Region) -> NeptuneClient {
NeptuneClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> NeptuneClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
NeptuneClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Neptune for NeptuneClient {
fn add_role_to_db_cluster(
&self,
input: AddRoleToDBClusterMessage,
) -> RusotoFuture<(), AddRoleToDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddRoleToDBCluster");
params.put("Version", "2014-10-31");
AddRoleToDBClusterMessageSerializer::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(AddRoleToDBClusterError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn add_source_identifier_to_subscription(
&self,
input: AddSourceIdentifierToSubscriptionMessage,
) -> RusotoFuture<AddSourceIdentifierToSubscriptionResult, AddSourceIdentifierToSubscriptionError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddSourceIdentifierToSubscription");
params.put("Version", "2014-10-31");
AddSourceIdentifierToSubscriptionMessageSerializer::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(AddSourceIdentifierToSubscriptionError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AddSourceIdentifierToSubscriptionResult::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 = AddSourceIdentifierToSubscriptionResultDeserializer::deserialize(
"AddSourceIdentifierToSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn add_tags_to_resource(
&self,
input: AddTagsToResourceMessage,
) -> RusotoFuture<(), AddTagsToResourceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddTagsToResource");
params.put("Version", "2014-10-31");
AddTagsToResourceMessageSerializer::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(AddTagsToResourceError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn apply_pending_maintenance_action(
&self,
input: ApplyPendingMaintenanceActionMessage,
) -> RusotoFuture<ApplyPendingMaintenanceActionResult, ApplyPendingMaintenanceActionError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ApplyPendingMaintenanceAction");
params.put("Version", "2014-10-31");
ApplyPendingMaintenanceActionMessageSerializer::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(ApplyPendingMaintenanceActionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplyPendingMaintenanceActionResult::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 = ApplyPendingMaintenanceActionResultDeserializer::deserialize(
"ApplyPendingMaintenanceActionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_db_cluster_parameter_group(
&self,
input: CopyDBClusterParameterGroupMessage,
) -> RusotoFuture<CopyDBClusterParameterGroupResult, CopyDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyDBClusterParameterGroup");
params.put("Version", "2014-10-31");
CopyDBClusterParameterGroupMessageSerializer::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(CopyDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyDBClusterParameterGroupResult::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 = CopyDBClusterParameterGroupResultDeserializer::deserialize(
"CopyDBClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_db_cluster_snapshot(
&self,
input: CopyDBClusterSnapshotMessage,
) -> RusotoFuture<CopyDBClusterSnapshotResult, CopyDBClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyDBClusterSnapshot");
params.put("Version", "2014-10-31");
CopyDBClusterSnapshotMessageSerializer::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(CopyDBClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyDBClusterSnapshotResult::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 = CopyDBClusterSnapshotResultDeserializer::deserialize(
"CopyDBClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_db_parameter_group(
&self,
input: CopyDBParameterGroupMessage,
) -> RusotoFuture<CopyDBParameterGroupResult, CopyDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyDBParameterGroup");
params.put("Version", "2014-10-31");
CopyDBParameterGroupMessageSerializer::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(CopyDBParameterGroupError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyDBParameterGroupResult::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 = CopyDBParameterGroupResultDeserializer::deserialize(
"CopyDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_cluster(
&self,
input: CreateDBClusterMessage,
) -> RusotoFuture<CreateDBClusterResult, CreateDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBCluster");
params.put("Version", "2014-10-31");
CreateDBClusterMessageSerializer::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(CreateDBClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBClusterResult::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 = CreateDBClusterResultDeserializer::deserialize(
"CreateDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_cluster_parameter_group(
&self,
input: CreateDBClusterParameterGroupMessage,
) -> RusotoFuture<CreateDBClusterParameterGroupResult, CreateDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBClusterParameterGroup");
params.put("Version", "2014-10-31");
CreateDBClusterParameterGroupMessageSerializer::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(CreateDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBClusterParameterGroupResult::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 = CreateDBClusterParameterGroupResultDeserializer::deserialize(
"CreateDBClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_cluster_snapshot(
&self,
input: CreateDBClusterSnapshotMessage,
) -> RusotoFuture<CreateDBClusterSnapshotResult, CreateDBClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBClusterSnapshot");
params.put("Version", "2014-10-31");
CreateDBClusterSnapshotMessageSerializer::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(CreateDBClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBClusterSnapshotResult::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 = CreateDBClusterSnapshotResultDeserializer::deserialize(
"CreateDBClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_instance(
&self,
input: CreateDBInstanceMessage,
) -> RusotoFuture<CreateDBInstanceResult, CreateDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBInstance");
params.put("Version", "2014-10-31");
CreateDBInstanceMessageSerializer::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(CreateDBInstanceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBInstanceResult::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 = CreateDBInstanceResultDeserializer::deserialize(
"CreateDBInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_parameter_group(
&self,
input: CreateDBParameterGroupMessage,
) -> RusotoFuture<CreateDBParameterGroupResult, CreateDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBParameterGroup");
params.put("Version", "2014-10-31");
CreateDBParameterGroupMessageSerializer::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(CreateDBParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBParameterGroupResult::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 = CreateDBParameterGroupResultDeserializer::deserialize(
"CreateDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_subnet_group(
&self,
input: CreateDBSubnetGroupMessage,
) -> RusotoFuture<CreateDBSubnetGroupResult, CreateDBSubnetGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBSubnetGroup");
params.put("Version", "2014-10-31");
CreateDBSubnetGroupMessageSerializer::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(CreateDBSubnetGroupError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBSubnetGroupResult::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 = CreateDBSubnetGroupResultDeserializer::deserialize(
"CreateDBSubnetGroupResult",
&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", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateEventSubscription");
params.put("Version", "2014-10-31");
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 delete_db_cluster(
&self,
input: DeleteDBClusterMessage,
) -> RusotoFuture<DeleteDBClusterResult, DeleteDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBCluster");
params.put("Version", "2014-10-31");
DeleteDBClusterMessageSerializer::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(DeleteDBClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteDBClusterResult::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 = DeleteDBClusterResultDeserializer::deserialize(
"DeleteDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_db_cluster_parameter_group(
&self,
input: DeleteDBClusterParameterGroupMessage,
) -> RusotoFuture<(), DeleteDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBClusterParameterGroup");
params.put("Version", "2014-10-31");
DeleteDBClusterParameterGroupMessageSerializer::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(DeleteDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_db_cluster_snapshot(
&self,
input: DeleteDBClusterSnapshotMessage,
) -> RusotoFuture<DeleteDBClusterSnapshotResult, DeleteDBClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBClusterSnapshot");
params.put("Version", "2014-10-31");
DeleteDBClusterSnapshotMessageSerializer::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(DeleteDBClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteDBClusterSnapshotResult::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 = DeleteDBClusterSnapshotResultDeserializer::deserialize(
"DeleteDBClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_db_instance(
&self,
input: DeleteDBInstanceMessage,
) -> RusotoFuture<DeleteDBInstanceResult, DeleteDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBInstance");
params.put("Version", "2014-10-31");
DeleteDBInstanceMessageSerializer::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(DeleteDBInstanceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteDBInstanceResult::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 = DeleteDBInstanceResultDeserializer::deserialize(
"DeleteDBInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_db_parameter_group(
&self,
input: DeleteDBParameterGroupMessage,
) -> RusotoFuture<(), DeleteDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBParameterGroup");
params.put("Version", "2014-10-31");
DeleteDBParameterGroupMessageSerializer::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(DeleteDBParameterGroupError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_db_subnet_group(
&self,
input: DeleteDBSubnetGroupMessage,
) -> RusotoFuture<(), DeleteDBSubnetGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBSubnetGroup");
params.put("Version", "2014-10-31");
DeleteDBSubnetGroupMessageSerializer::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(DeleteDBSubnetGroupError::from_response(response))
}),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_event_subscription(
&self,
input: DeleteEventSubscriptionMessage,
) -> RusotoFuture<DeleteEventSubscriptionResult, DeleteEventSubscriptionError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteEventSubscription");
params.put("Version", "2014-10-31");
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(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteEventSubscriptionResult::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 = DeleteEventSubscriptionResultDeserializer::deserialize(
"DeleteEventSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_parameter_groups(
&self,
input: DescribeDBClusterParameterGroupsMessage,
) -> RusotoFuture<DBClusterParameterGroupsMessage, DescribeDBClusterParameterGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterParameterGroups");
params.put("Version", "2014-10-31");
DescribeDBClusterParameterGroupsMessageSerializer::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(DescribeDBClusterParameterGroupsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupsMessage::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 = DBClusterParameterGroupsMessageDeserializer::deserialize(
"DescribeDBClusterParameterGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_parameters(
&self,
input: DescribeDBClusterParametersMessage,
) -> RusotoFuture<DBClusterParameterGroupDetails, DescribeDBClusterParametersError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterParameters");
params.put("Version", "2014-10-31");
DescribeDBClusterParametersMessageSerializer::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(DescribeDBClusterParametersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupDetails::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 = DBClusterParameterGroupDetailsDeserializer::deserialize(
"DescribeDBClusterParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_snapshot_attributes(
&self,
input: DescribeDBClusterSnapshotAttributesMessage,
) -> RusotoFuture<
DescribeDBClusterSnapshotAttributesResult,
DescribeDBClusterSnapshotAttributesError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterSnapshotAttributes");
params.put("Version", "2014-10-31");
DescribeDBClusterSnapshotAttributesMessageSerializer::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(DescribeDBClusterSnapshotAttributesError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeDBClusterSnapshotAttributesResult::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 = DescribeDBClusterSnapshotAttributesResultDeserializer::deserialize(
"DescribeDBClusterSnapshotAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_snapshots(
&self,
input: DescribeDBClusterSnapshotsMessage,
) -> RusotoFuture<DBClusterSnapshotMessage, DescribeDBClusterSnapshotsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterSnapshots");
params.put("Version", "2014-10-31");
DescribeDBClusterSnapshotsMessageSerializer::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(DescribeDBClusterSnapshotsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterSnapshotMessage::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 = DBClusterSnapshotMessageDeserializer::deserialize(
"DescribeDBClusterSnapshotsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_clusters(
&self,
input: DescribeDBClustersMessage,
) -> RusotoFuture<DBClusterMessage, DescribeDBClustersError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusters");
params.put("Version", "2014-10-31");
DescribeDBClustersMessageSerializer::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(DescribeDBClustersError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterMessage::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 = DBClusterMessageDeserializer::deserialize(
"DescribeDBClustersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_engine_versions(
&self,
input: DescribeDBEngineVersionsMessage,
) -> RusotoFuture<DBEngineVersionMessage, DescribeDBEngineVersionsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBEngineVersions");
params.put("Version", "2014-10-31");
DescribeDBEngineVersionsMessageSerializer::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(DescribeDBEngineVersionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBEngineVersionMessage::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 = DBEngineVersionMessageDeserializer::deserialize(
"DescribeDBEngineVersionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_instances(
&self,
input: DescribeDBInstancesMessage,
) -> RusotoFuture<DBInstanceMessage, DescribeDBInstancesError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBInstances");
params.put("Version", "2014-10-31");
DescribeDBInstancesMessageSerializer::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(DescribeDBInstancesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBInstanceMessage::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 = DBInstanceMessageDeserializer::deserialize(
"DescribeDBInstancesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_parameter_groups(
&self,
input: DescribeDBParameterGroupsMessage,
) -> RusotoFuture<DBParameterGroupsMessage, DescribeDBParameterGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBParameterGroups");
params.put("Version", "2014-10-31");
DescribeDBParameterGroupsMessageSerializer::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(DescribeDBParameterGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupsMessage::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 = DBParameterGroupsMessageDeserializer::deserialize(
"DescribeDBParameterGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_parameters(
&self,
input: DescribeDBParametersMessage,
) -> RusotoFuture<DBParameterGroupDetails, DescribeDBParametersError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBParameters");
params.put("Version", "2014-10-31");
DescribeDBParametersMessageSerializer::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(DescribeDBParametersError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupDetails::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 = DBParameterGroupDetailsDeserializer::deserialize(
"DescribeDBParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_subnet_groups(
&self,
input: DescribeDBSubnetGroupsMessage,
) -> RusotoFuture<DBSubnetGroupMessage, DescribeDBSubnetGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBSubnetGroups");
params.put("Version", "2014-10-31");
DescribeDBSubnetGroupsMessageSerializer::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(DescribeDBSubnetGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBSubnetGroupMessage::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 = DBSubnetGroupMessageDeserializer::deserialize(
"DescribeDBSubnetGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_engine_default_cluster_parameters(
&self,
input: DescribeEngineDefaultClusterParametersMessage,
) -> RusotoFuture<
DescribeEngineDefaultClusterParametersResult,
DescribeEngineDefaultClusterParametersError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEngineDefaultClusterParameters");
params.put("Version", "2014-10-31");
DescribeEngineDefaultClusterParametersMessageSerializer::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(DescribeEngineDefaultClusterParametersError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEngineDefaultClusterParametersResult::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 = DescribeEngineDefaultClusterParametersResultDeserializer::deserialize(
"DescribeEngineDefaultClusterParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_engine_default_parameters(
&self,
input: DescribeEngineDefaultParametersMessage,
) -> RusotoFuture<DescribeEngineDefaultParametersResult, DescribeEngineDefaultParametersError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEngineDefaultParameters");
params.put("Version", "2014-10-31");
DescribeEngineDefaultParametersMessageSerializer::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(DescribeEngineDefaultParametersError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEngineDefaultParametersResult::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 = DescribeEngineDefaultParametersResultDeserializer::deserialize(
"DescribeEngineDefaultParametersResult",
&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", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEventCategories");
params.put("Version", "2014-10-31");
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", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEventSubscriptions");
params.put("Version", "2014-10-31");
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", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEvents");
params.put("Version", "2014-10-31");
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_orderable_db_instance_options(
&self,
input: DescribeOrderableDBInstanceOptionsMessage,
) -> RusotoFuture<OrderableDBInstanceOptionsMessage, DescribeOrderableDBInstanceOptionsError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeOrderableDBInstanceOptions");
params.put("Version", "2014-10-31");
DescribeOrderableDBInstanceOptionsMessageSerializer::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(DescribeOrderableDBInstanceOptionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = OrderableDBInstanceOptionsMessage::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 = OrderableDBInstanceOptionsMessageDeserializer::deserialize(
"DescribeOrderableDBInstanceOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_pending_maintenance_actions(
&self,
input: DescribePendingMaintenanceActionsMessage,
) -> RusotoFuture<PendingMaintenanceActionsMessage, DescribePendingMaintenanceActionsError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribePendingMaintenanceActions");
params.put("Version", "2014-10-31");
DescribePendingMaintenanceActionsMessageSerializer::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(DescribePendingMaintenanceActionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PendingMaintenanceActionsMessage::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 = PendingMaintenanceActionsMessageDeserializer::deserialize(
"DescribePendingMaintenanceActionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_valid_db_instance_modifications(
&self,
input: DescribeValidDBInstanceModificationsMessage,
) -> RusotoFuture<
DescribeValidDBInstanceModificationsResult,
DescribeValidDBInstanceModificationsError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeValidDBInstanceModifications");
params.put("Version", "2014-10-31");
DescribeValidDBInstanceModificationsMessageSerializer::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(DescribeValidDBInstanceModificationsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeValidDBInstanceModificationsResult::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 = DescribeValidDBInstanceModificationsResultDeserializer::deserialize(
"DescribeValidDBInstanceModificationsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn failover_db_cluster(
&self,
input: FailoverDBClusterMessage,
) -> RusotoFuture<FailoverDBClusterResult, FailoverDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "FailoverDBCluster");
params.put("Version", "2014-10-31");
FailoverDBClusterMessageSerializer::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(FailoverDBClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = FailoverDBClusterResult::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 = FailoverDBClusterResultDeserializer::deserialize(
"FailoverDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceMessage,
) -> RusotoFuture<TagListMessage, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ListTagsForResource");
params.put("Version", "2014-10-31");
ListTagsForResourceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = TagListMessage::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 = TagListMessageDeserializer::deserialize(
"ListTagsForResourceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_cluster(
&self,
input: ModifyDBClusterMessage,
) -> RusotoFuture<ModifyDBClusterResult, ModifyDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBCluster");
params.put("Version", "2014-10-31");
ModifyDBClusterMessageSerializer::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(ModifyDBClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBClusterResult::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 = ModifyDBClusterResultDeserializer::deserialize(
"ModifyDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_cluster_parameter_group(
&self,
input: ModifyDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ModifyDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBClusterParameterGroup");
params.put("Version", "2014-10-31");
ModifyDBClusterParameterGroupMessageSerializer::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(ModifyDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupNameMessage::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 = DBClusterParameterGroupNameMessageDeserializer::deserialize(
"ModifyDBClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_cluster_snapshot_attribute(
&self,
input: ModifyDBClusterSnapshotAttributeMessage,
) -> RusotoFuture<ModifyDBClusterSnapshotAttributeResult, ModifyDBClusterSnapshotAttributeError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBClusterSnapshotAttribute");
params.put("Version", "2014-10-31");
ModifyDBClusterSnapshotAttributeMessageSerializer::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(ModifyDBClusterSnapshotAttributeError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBClusterSnapshotAttributeResult::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 = ModifyDBClusterSnapshotAttributeResultDeserializer::deserialize(
"ModifyDBClusterSnapshotAttributeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_instance(
&self,
input: ModifyDBInstanceMessage,
) -> RusotoFuture<ModifyDBInstanceResult, ModifyDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBInstance");
params.put("Version", "2014-10-31");
ModifyDBInstanceMessageSerializer::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(ModifyDBInstanceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBInstanceResult::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 = ModifyDBInstanceResultDeserializer::deserialize(
"ModifyDBInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_parameter_group(
&self,
input: ModifyDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ModifyDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBParameterGroup");
params.put("Version", "2014-10-31");
ModifyDBParameterGroupMessageSerializer::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(ModifyDBParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupNameMessage::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 = DBParameterGroupNameMessageDeserializer::deserialize(
"ModifyDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_subnet_group(
&self,
input: ModifyDBSubnetGroupMessage,
) -> RusotoFuture<ModifyDBSubnetGroupResult, ModifyDBSubnetGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBSubnetGroup");
params.put("Version", "2014-10-31");
ModifyDBSubnetGroupMessageSerializer::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(ModifyDBSubnetGroupError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBSubnetGroupResult::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 = ModifyDBSubnetGroupResultDeserializer::deserialize(
"ModifyDBSubnetGroupResult",
&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", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyEventSubscription");
params.put("Version", "2014-10-31");
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 promote_read_replica_db_cluster(
&self,
input: PromoteReadReplicaDBClusterMessage,
) -> RusotoFuture<PromoteReadReplicaDBClusterResult, PromoteReadReplicaDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PromoteReadReplicaDBCluster");
params.put("Version", "2014-10-31");
PromoteReadReplicaDBClusterMessageSerializer::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(PromoteReadReplicaDBClusterError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PromoteReadReplicaDBClusterResult::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 = PromoteReadReplicaDBClusterResultDeserializer::deserialize(
"PromoteReadReplicaDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn reboot_db_instance(
&self,
input: RebootDBInstanceMessage,
) -> RusotoFuture<RebootDBInstanceResult, RebootDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RebootDBInstance");
params.put("Version", "2014-10-31");
RebootDBInstanceMessageSerializer::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(RebootDBInstanceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RebootDBInstanceResult::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 = RebootDBInstanceResultDeserializer::deserialize(
"RebootDBInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn remove_role_from_db_cluster(
&self,
input: RemoveRoleFromDBClusterMessage,
) -> RusotoFuture<(), RemoveRoleFromDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveRoleFromDBCluster");
params.put("Version", "2014-10-31");
RemoveRoleFromDBClusterMessageSerializer::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(RemoveRoleFromDBClusterError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn remove_source_identifier_from_subscription(
&self,
input: RemoveSourceIdentifierFromSubscriptionMessage,
) -> RusotoFuture<
RemoveSourceIdentifierFromSubscriptionResult,
RemoveSourceIdentifierFromSubscriptionError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveSourceIdentifierFromSubscription");
params.put("Version", "2014-10-31");
RemoveSourceIdentifierFromSubscriptionMessageSerializer::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(RemoveSourceIdentifierFromSubscriptionError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RemoveSourceIdentifierFromSubscriptionResult::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 = RemoveSourceIdentifierFromSubscriptionResultDeserializer::deserialize(
"RemoveSourceIdentifierFromSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceMessage,
) -> RusotoFuture<(), RemoveTagsFromResourceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveTagsFromResource");
params.put("Version", "2014-10-31");
RemoveTagsFromResourceMessageSerializer::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(RemoveTagsFromResourceError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn reset_db_cluster_parameter_group(
&self,
input: ResetDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ResetDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResetDBClusterParameterGroup");
params.put("Version", "2014-10-31");
ResetDBClusterParameterGroupMessageSerializer::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(ResetDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupNameMessage::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 = DBClusterParameterGroupNameMessageDeserializer::deserialize(
"ResetDBClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn reset_db_parameter_group(
&self,
input: ResetDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ResetDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResetDBParameterGroup");
params.put("Version", "2014-10-31");
ResetDBParameterGroupMessageSerializer::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(ResetDBParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupNameMessage::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 = DBParameterGroupNameMessageDeserializer::deserialize(
"ResetDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn restore_db_cluster_from_snapshot(
&self,
input: RestoreDBClusterFromSnapshotMessage,
) -> RusotoFuture<RestoreDBClusterFromSnapshotResult, RestoreDBClusterFromSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreDBClusterFromSnapshot");
params.put("Version", "2014-10-31");
RestoreDBClusterFromSnapshotMessageSerializer::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(RestoreDBClusterFromSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreDBClusterFromSnapshotResult::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 = RestoreDBClusterFromSnapshotResultDeserializer::deserialize(
"RestoreDBClusterFromSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn restore_db_cluster_to_point_in_time(
&self,
input: RestoreDBClusterToPointInTimeMessage,
) -> RusotoFuture<RestoreDBClusterToPointInTimeResult, RestoreDBClusterToPointInTimeError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreDBClusterToPointInTime");
params.put("Version", "2014-10-31");
RestoreDBClusterToPointInTimeMessageSerializer::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(RestoreDBClusterToPointInTimeError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreDBClusterToPointInTimeResult::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 = RestoreDBClusterToPointInTimeResultDeserializer::deserialize(
"RestoreDBClusterToPointInTimeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
}