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 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 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 CreateDBClusterMessage {
pub availability_zones: Option<Vec<String>>,
pub backup_retention_period: Option<i64>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
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 port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: 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,
);
}
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_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
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.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.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 auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub db_cluster_identifier: String,
pub db_instance_class: String,
pub db_instance_identifier: String,
pub engine: String,
pub preferred_maintenance_window: Option<String>,
pub promotion_tier: Option<i64>,
pub tags: Option<Vec<Tag>>,
}
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.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);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
params.put(
&format!("{}{}", prefix, "DBInstanceClass"),
&obj.db_instance_class,
);
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
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.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), 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 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 DBCluster {
pub associated_roles: Option<Vec<DBClusterRole>>,
pub availability_zones: Option<Vec<String>>,
pub backup_retention_period: Option<i64>,
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_parameter_group: Option<String>,
pub db_subnet_group: Option<String>,
pub db_cluster_resource_id: Option<String>,
pub earliest_restorable_time: Option<String>,
pub enabled_cloudwatch_logs_exports: Option<Vec<String>>,
pub endpoint: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub hosted_zone_id: Option<String>,
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 reader_endpoint: 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 {
"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,
)?);
}
"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)?,
);
}
"DBClusterParameterGroup" => {
obj.db_cluster_parameter_group = Some(StringDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
}
"DBSubnetGroup" => {
obj.db_subnet_group =
Some(StringDeserializer::deserialize("DBSubnetGroup", stack)?);
}
"DbClusterResourceId" => {
obj.db_cluster_resource_id = Some(StringDeserializer::deserialize(
"DbClusterResourceId",
stack,
)?);
}
"EarliestRestorableTime" => {
obj.earliest_restorable_time = Some(TStampDeserializer::deserialize(
"EarliestRestorableTime",
stack,
)?);
}
"EnabledCloudwatchLogsExports" => {
obj.enabled_cloudwatch_logs_exports
.get_or_insert(vec![])
.extend(LogTypeListDeserializer::deserialize(
"EnabledCloudwatchLogsExports",
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)?);
}
"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,
)?);
}
"ReaderEndpoint" => {
obj.reader_endpoint =
Some(StringDeserializer::deserialize("ReaderEndpoint", 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(())
})
}
}
#[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 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 kms_key_id: 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 {
"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)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", 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 engine: Option<String>,
pub engine_version: Option<String>,
pub exportable_log_types: Option<Vec<String>>,
pub supports_log_exports_to_cloudwatch_logs: 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,
)?);
}
"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)?,
);
}
"SupportsLogExportsToCloudwatchLogs" => {
obj.supports_log_exports_to_cloudwatch_logs =
Some(BooleanDeserializer::deserialize(
"SupportsLogExportsToCloudwatchLogs",
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 auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub backup_retention_period: Option<i64>,
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_subnet_group: Option<DBSubnetGroup>,
pub dbi_resource_id: Option<String>,
pub enabled_cloudwatch_logs_exports: Option<Vec<String>>,
pub endpoint: Option<Endpoint>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub instance_create_time: Option<String>,
pub kms_key_id: Option<String>,
pub latest_restorable_time: Option<String>,
pub pending_modified_values: Option<PendingModifiedValues>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub promotion_tier: Option<i64>,
pub publicly_accessible: Option<bool>,
pub status_infos: Option<Vec<DBInstanceStatusInfo>>,
pub storage_encrypted: Option<bool>,
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 {
"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,
)?);
}
"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)?);
}
"DBSubnetGroup" => {
obj.db_subnet_group = Some(DBSubnetGroupDeserializer::deserialize(
"DBSubnetGroup",
stack,
)?);
}
"DbiResourceId" => {
obj.dbi_resource_id =
Some(StringDeserializer::deserialize("DbiResourceId", 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)?);
}
"InstanceCreateTime" => {
obj.instance_create_time = Some(TStampDeserializer::deserialize(
"InstanceCreateTime",
stack,
)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LatestRestorableTime" => {
obj.latest_restorable_time = Some(TStampDeserializer::deserialize(
"LatestRestorableTime",
stack,
)?);
}
"PendingModifiedValues" => {
obj.pending_modified_values =
Some(PendingModifiedValuesDeserializer::deserialize(
"PendingModifiedValues",
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,
)?);
}
"PubliclyAccessible" => {
obj.publicly_accessible = Some(BooleanDeserializer::deserialize(
"PubliclyAccessible",
stack,
)?);
}
"StatusInfos" => {
obj.status_infos.get_or_insert(vec![]).extend(
DBInstanceStatusInfoListDeserializer::deserialize("StatusInfos", 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 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 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,
}
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,
);
}
}
#[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 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 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 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 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 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 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 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 cloudwatch_logs_export_configuration: Option<CloudwatchLogsExportConfiguration>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub engine_version: Option<String>,
pub master_user_password: Option<String>,
pub new_db_cluster_identifier: 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,
);
}
if let Some(ref field_value) = obj.cloudwatch_logs_export_configuration {
CloudwatchLogsExportConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "CloudwatchLogsExportConfiguration"),
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.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.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 apply_immediately: Option<bool>,
pub auto_minor_version_upgrade: Option<bool>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: String,
pub new_db_instance_identifier: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub promotion_tier: Option<i64>,
}
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.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.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.new_db_instance_identifier {
params.put(
&format!("{}{}", prefix, "NewDBInstanceIdentifier"),
&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);
}
}
}
#[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 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 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 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)?);
}
"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 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 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 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_subnet_group_name: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub engine: String,
pub engine_version: Option<String>,
pub kms_key_id: 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_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
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.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_subnet_group_name: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub kms_key_id: Option<String>,
pub port: Option<i64>,
pub restore_to_time: 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_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &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.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &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);
}
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 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 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 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(())
})
}
}
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 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 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),
InstanceQuotaExceededFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBClusterStateFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(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),
)
}
"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),
)
}
"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::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::StorageQuotaExceededFault(ref cause) => cause,
CreateDBInstanceError::StorageTypeNotSupportedFault(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 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 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 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 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 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 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 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),
InsufficientDBInstanceCapacityFault(String),
InvalidDBInstanceStateFault(String),
InvalidDBSecurityGroupStateFault(String),
InvalidVPCNetworkStateFault(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,
),
)
}
"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,
),
)
}
"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::InsufficientDBInstanceCapacityFault(ref cause) => cause,
ModifyDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
ModifyDBInstanceError::InvalidDBSecurityGroupStateFault(ref cause) => cause,
ModifyDBInstanceError::InvalidVPCNetworkStateFault(ref cause) => cause,
ModifyDBInstanceError::StorageQuotaExceededFault(ref cause) => cause,
ModifyDBInstanceError::StorageTypeNotSupportedFault(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 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 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 RestoreDBClusterFromSnapshotError {
DBClusterAlreadyExistsFault(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),
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,
),
)
}
"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,
),
)
}
"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::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::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBClusterToPointInTimeError {
DBClusterAlreadyExistsFault(String),
DBClusterNotFoundFault(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),
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,
),
)
}
"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,
),
)
}
"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::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::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
pub trait Docdb {
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 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_subnet_group(
&self,
input: CreateDBSubnetGroupMessage,
) -> RusotoFuture<CreateDBSubnetGroupResult, CreateDBSubnetGroupError>;
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_subnet_group(
&self,
input: DeleteDBSubnetGroupMessage,
) -> RusotoFuture<(), DeleteDBSubnetGroupError>;
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_subnet_groups(
&self,
input: DescribeDBSubnetGroupsMessage,
) -> RusotoFuture<DBSubnetGroupMessage, DescribeDBSubnetGroupsError>;
fn describe_engine_default_cluster_parameters(
&self,
input: DescribeEngineDefaultClusterParametersMessage,
) -> RusotoFuture<
DescribeEngineDefaultClusterParametersResult,
DescribeEngineDefaultClusterParametersError,
>;
fn describe_event_categories(
&self,
input: DescribeEventCategoriesMessage,
) -> RusotoFuture<EventCategoriesMessage, DescribeEventCategoriesError>;
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 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_subnet_group(
&self,
input: ModifyDBSubnetGroupMessage,
) -> RusotoFuture<ModifyDBSubnetGroupResult, ModifyDBSubnetGroupError>;
fn reboot_db_instance(
&self,
input: RebootDBInstanceMessage,
) -> RusotoFuture<RebootDBInstanceResult, RebootDBInstanceError>;
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceMessage,
) -> RusotoFuture<(), RemoveTagsFromResourceError>;
fn reset_db_cluster_parameter_group(
&self,
input: ResetDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ResetDBClusterParameterGroupError>;
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 DocdbClient {
client: Client,
region: region::Region,
}
impl DocdbClient {
pub fn new(region: region::Region) -> DocdbClient {
DocdbClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> DocdbClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
DocdbClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Docdb for DocdbClient {
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 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_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 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_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 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_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_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_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 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_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 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_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 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)
}))
})
}
}