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 AccountAttributesMessage {
pub account_quotas: Option<Vec<AccountQuota>>,
}
struct AccountAttributesMessageDeserializer;
impl AccountAttributesMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountAttributesMessage, XmlParseError> {
deserialize_elements::<_, AccountAttributesMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AccountQuotas" => {
obj.account_quotas.get_or_insert(vec![]).extend(
AccountQuotaListDeserializer::deserialize("AccountQuotas", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccountQuota {
pub account_quota_name: Option<String>,
pub max: Option<i64>,
pub used: Option<i64>,
}
struct AccountQuotaDeserializer;
impl AccountQuotaDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountQuota, XmlParseError> {
deserialize_elements::<_, AccountQuota, _>(tag_name, stack, |name, stack, obj| {
match name {
"AccountQuotaName" => {
obj.account_quota_name =
Some(StringDeserializer::deserialize("AccountQuotaName", stack)?);
}
"Max" => {
obj.max = Some(LongDeserializer::deserialize("Max", stack)?);
}
"Used" => {
obj.used = Some(LongDeserializer::deserialize("Used", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AccountQuotaListDeserializer;
impl AccountQuotaListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AccountQuota>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AccountQuota" {
obj.push(AccountQuotaDeserializer::deserialize(
"AccountQuota",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ActivityStreamModeDeserializer;
impl ActivityStreamModeDeserializer {
#[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 ActivityStreamStatusDeserializer;
impl ActivityStreamStatusDeserializer {
#[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 AddRoleToDBClusterMessage {
pub db_cluster_identifier: String,
pub feature_name: Option<String>,
pub role_arn: String,
}
struct AddRoleToDBClusterMessageSerializer;
impl AddRoleToDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddRoleToDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.feature_name {
params.put(&format!("{}{}", prefix, "FeatureName"), &field_value);
}
params.put(&format!("{}{}", prefix, "RoleArn"), &obj.role_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddRoleToDBInstanceMessage {
pub db_instance_identifier: String,
pub feature_name: String,
pub role_arn: String,
}
struct AddRoleToDBInstanceMessageSerializer;
impl AddRoleToDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddRoleToDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
params.put(&format!("{}{}", prefix, "FeatureName"), &obj.feature_name);
params.put(&format!("{}{}", prefix, "RoleArn"), &obj.role_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddSourceIdentifierToSubscriptionMessage {
pub source_identifier: String,
pub subscription_name: String,
}
struct AddSourceIdentifierToSubscriptionMessageSerializer;
impl AddSourceIdentifierToSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddSourceIdentifierToSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceIdentifier"),
&obj.source_identifier,
);
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddSourceIdentifierToSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct AddSourceIdentifierToSubscriptionResultDeserializer;
impl AddSourceIdentifierToSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AddSourceIdentifierToSubscriptionResult, XmlParseError> {
deserialize_elements::<_, AddSourceIdentifierToSubscriptionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscription" => {
obj.event_subscription = Some(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AddTagsToResourceMessage {
pub resource_name: String,
pub tags: Vec<Tag>,
}
struct AddTagsToResourceMessageSerializer;
impl AddTagsToResourceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AddTagsToResourceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), &obj.tags);
}
}
struct ApplyMethodDeserializer;
impl ApplyMethodDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplyPendingMaintenanceActionMessage {
pub apply_action: String,
pub opt_in_type: String,
pub resource_identifier: String,
}
struct ApplyPendingMaintenanceActionMessageSerializer;
impl ApplyPendingMaintenanceActionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ApplyPendingMaintenanceActionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ApplyAction"), &obj.apply_action);
params.put(&format!("{}{}", prefix, "OptInType"), &obj.opt_in_type);
params.put(
&format!("{}{}", prefix, "ResourceIdentifier"),
&obj.resource_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ApplyPendingMaintenanceActionResult {
pub resource_pending_maintenance_actions: Option<ResourcePendingMaintenanceActions>,
}
struct ApplyPendingMaintenanceActionResultDeserializer;
impl ApplyPendingMaintenanceActionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ApplyPendingMaintenanceActionResult, XmlParseError> {
deserialize_elements::<_, ApplyPendingMaintenanceActionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ResourcePendingMaintenanceActions" => {
obj.resource_pending_maintenance_actions =
Some(ResourcePendingMaintenanceActionsDeserializer::deserialize(
"ResourcePendingMaintenanceActions",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AttributeValueListDeserializer;
impl AttributeValueListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AttributeValue" {
obj.push(StringDeserializer::deserialize("AttributeValue", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct AttributeValueListSerializer;
impl AttributeValueListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AuthorizeDBSecurityGroupIngressMessage {
pub cidrip: Option<String>,
pub db_security_group_name: String,
pub ec2_security_group_id: Option<String>,
pub ec2_security_group_name: Option<String>,
pub ec2_security_group_owner_id: Option<String>,
}
struct AuthorizeDBSecurityGroupIngressMessageSerializer;
impl AuthorizeDBSecurityGroupIngressMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &AuthorizeDBSecurityGroupIngressMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cidrip {
params.put(&format!("{}{}", prefix, "CIDRIP"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBSecurityGroupName"),
&obj.db_security_group_name,
);
if let Some(ref field_value) = obj.ec2_security_group_id {
params.put(&format!("{}{}", prefix, "EC2SecurityGroupId"), &field_value);
}
if let Some(ref field_value) = obj.ec2_security_group_name {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.ec2_security_group_owner_id {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupOwnerId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AuthorizeDBSecurityGroupIngressResult {
pub db_security_group: Option<DBSecurityGroup>,
}
struct AuthorizeDBSecurityGroupIngressResultDeserializer;
impl AuthorizeDBSecurityGroupIngressResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AuthorizeDBSecurityGroupIngressResult, XmlParseError> {
deserialize_elements::<_, AuthorizeDBSecurityGroupIngressResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSecurityGroup" => {
obj.db_security_group = Some(DBSecurityGroupDeserializer::deserialize(
"DBSecurityGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[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);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AvailableProcessorFeature {
pub allowed_values: Option<String>,
pub default_value: Option<String>,
pub name: Option<String>,
}
struct AvailableProcessorFeatureDeserializer;
impl AvailableProcessorFeatureDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AvailableProcessorFeature, XmlParseError> {
deserialize_elements::<_, AvailableProcessorFeature, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AllowedValues" => {
obj.allowed_values =
Some(StringDeserializer::deserialize("AllowedValues", stack)?);
}
"DefaultValue" => {
obj.default_value =
Some(StringDeserializer::deserialize("DefaultValue", stack)?);
}
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct AvailableProcessorFeatureListDeserializer;
impl AvailableProcessorFeatureListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<AvailableProcessorFeature>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "AvailableProcessorFeature" {
obj.push(AvailableProcessorFeatureDeserializer::deserialize(
"AvailableProcessorFeature",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct BacktrackDBClusterMessage {
pub backtrack_to: String,
pub db_cluster_identifier: String,
pub force: Option<bool>,
pub use_earliest_time_on_point_in_time_unavailable: Option<bool>,
}
struct BacktrackDBClusterMessageSerializer;
impl BacktrackDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &BacktrackDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "BacktrackTo"), &obj.backtrack_to);
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.force {
params.put(&format!("{}{}", prefix, "Force"), &field_value);
}
if let Some(ref field_value) = obj.use_earliest_time_on_point_in_time_unavailable {
params.put(
&format!("{}{}", prefix, "UseEarliestTimeOnPointInTimeUnavailable"),
&field_value,
);
}
}
}
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 Certificate {
pub certificate_arn: Option<String>,
pub certificate_identifier: Option<String>,
pub certificate_type: Option<String>,
pub thumbprint: Option<String>,
pub valid_from: Option<String>,
pub valid_till: Option<String>,
}
struct CertificateDeserializer;
impl CertificateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Certificate, XmlParseError> {
deserialize_elements::<_, Certificate, _>(tag_name, stack, |name, stack, obj| {
match name {
"CertificateArn" => {
obj.certificate_arn =
Some(StringDeserializer::deserialize("CertificateArn", stack)?);
}
"CertificateIdentifier" => {
obj.certificate_identifier = Some(StringDeserializer::deserialize(
"CertificateIdentifier",
stack,
)?);
}
"CertificateType" => {
obj.certificate_type =
Some(StringDeserializer::deserialize("CertificateType", stack)?);
}
"Thumbprint" => {
obj.thumbprint = Some(StringDeserializer::deserialize("Thumbprint", stack)?);
}
"ValidFrom" => {
obj.valid_from = Some(TStampDeserializer::deserialize("ValidFrom", stack)?);
}
"ValidTill" => {
obj.valid_till = Some(TStampDeserializer::deserialize("ValidTill", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct CertificateListDeserializer;
impl CertificateListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Certificate>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Certificate" {
obj.push(CertificateDeserializer::deserialize("Certificate", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CertificateMessage {
pub certificates: Option<Vec<Certificate>>,
pub marker: Option<String>,
}
struct CertificateMessageDeserializer;
impl CertificateMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CertificateMessage, XmlParseError> {
deserialize_elements::<_, CertificateMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Certificates" => {
obj.certificates.get_or_insert(vec![]).extend(
CertificateListDeserializer::deserialize("Certificates", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CharacterSet {
pub character_set_description: Option<String>,
pub character_set_name: Option<String>,
}
struct CharacterSetDeserializer;
impl CharacterSetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CharacterSet, XmlParseError> {
deserialize_elements::<_, CharacterSet, _>(tag_name, stack, |name, stack, obj| {
match name {
"CharacterSetDescription" => {
obj.character_set_description = Some(StringDeserializer::deserialize(
"CharacterSetDescription",
stack,
)?);
}
"CharacterSetName" => {
obj.character_set_name =
Some(StringDeserializer::deserialize("CharacterSetName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CloudwatchLogsExportConfiguration {
pub disable_log_types: Option<Vec<String>>,
pub enable_log_types: Option<Vec<String>>,
}
struct CloudwatchLogsExportConfigurationSerializer;
impl CloudwatchLogsExportConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CloudwatchLogsExportConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.disable_log_types {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "DisableLogTypes"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_log_types {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableLogTypes"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterParameterGroupMessage {
pub source_db_cluster_parameter_group_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_db_cluster_parameter_group_description: String,
pub target_db_cluster_parameter_group_identifier: String,
}
struct CopyDBClusterParameterGroupMessageSerializer;
impl CopyDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceDBClusterParameterGroupIdentifier"),
&obj.source_db_cluster_parameter_group_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBClusterParameterGroupDescription"),
&obj.target_db_cluster_parameter_group_description,
);
params.put(
&format!("{}{}", prefix, "TargetDBClusterParameterGroupIdentifier"),
&obj.target_db_cluster_parameter_group_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterParameterGroupResult {
pub db_cluster_parameter_group: Option<DBClusterParameterGroup>,
}
struct CopyDBClusterParameterGroupResultDeserializer;
impl CopyDBClusterParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyDBClusterParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CopyDBClusterParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroup" => {
obj.db_cluster_parameter_group =
Some(DBClusterParameterGroupDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterSnapshotMessage {
pub copy_tags: Option<bool>,
pub kms_key_id: Option<String>,
pub pre_signed_url: Option<String>,
pub source_db_cluster_snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_db_cluster_snapshot_identifier: String,
}
struct CopyDBClusterSnapshotMessageSerializer;
impl CopyDBClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyDBClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.copy_tags {
params.put(&format!("{}{}", prefix, "CopyTags"), &field_value);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.pre_signed_url {
params.put(&format!("{}{}", prefix, "PreSignedUrl"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SourceDBClusterSnapshotIdentifier"),
&obj.source_db_cluster_snapshot_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBClusterSnapshotIdentifier"),
&obj.target_db_cluster_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBClusterSnapshotResult {
pub db_cluster_snapshot: Option<DBClusterSnapshot>,
}
struct CopyDBClusterSnapshotResultDeserializer;
impl CopyDBClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyDBClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, CopyDBClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshot" => {
obj.db_cluster_snapshot = Some(DBClusterSnapshotDeserializer::deserialize(
"DBClusterSnapshot",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBParameterGroupMessage {
pub source_db_parameter_group_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_db_parameter_group_description: String,
pub target_db_parameter_group_identifier: String,
}
struct CopyDBParameterGroupMessageSerializer;
impl CopyDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceDBParameterGroupIdentifier"),
&obj.source_db_parameter_group_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBParameterGroupDescription"),
&obj.target_db_parameter_group_description,
);
params.put(
&format!("{}{}", prefix, "TargetDBParameterGroupIdentifier"),
&obj.target_db_parameter_group_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBParameterGroupResult {
pub db_parameter_group: Option<DBParameterGroup>,
}
struct CopyDBParameterGroupResultDeserializer;
impl CopyDBParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyDBParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CopyDBParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroup" => {
obj.db_parameter_group = Some(DBParameterGroupDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBSnapshotMessage {
pub copy_tags: Option<bool>,
pub kms_key_id: Option<String>,
pub option_group_name: Option<String>,
pub pre_signed_url: Option<String>,
pub source_db_snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_db_snapshot_identifier: String,
}
struct CopyDBSnapshotMessageSerializer;
impl CopyDBSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyDBSnapshotMessage) {
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.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.pre_signed_url {
params.put(&format!("{}{}", prefix, "PreSignedUrl"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SourceDBSnapshotIdentifier"),
&obj.source_db_snapshot_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBSnapshotIdentifier"),
&obj.target_db_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyDBSnapshotResult {
pub db_snapshot: Option<DBSnapshot>,
}
struct CopyDBSnapshotResultDeserializer;
impl CopyDBSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyDBSnapshotResult, XmlParseError> {
deserialize_elements::<_, CopyDBSnapshotResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSnapshot" => {
obj.db_snapshot =
Some(DBSnapshotDeserializer::deserialize("DBSnapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyOptionGroupMessage {
pub source_option_group_identifier: String,
pub tags: Option<Vec<Tag>>,
pub target_option_group_description: String,
pub target_option_group_identifier: String,
}
struct CopyOptionGroupMessageSerializer;
impl CopyOptionGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CopyOptionGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceOptionGroupIdentifier"),
&obj.source_option_group_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetOptionGroupDescription"),
&obj.target_option_group_description,
);
params.put(
&format!("{}{}", prefix, "TargetOptionGroupIdentifier"),
&obj.target_option_group_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CopyOptionGroupResult {
pub option_group: Option<OptionGroup>,
}
struct CopyOptionGroupResultDeserializer;
impl CopyOptionGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CopyOptionGroupResult, XmlParseError> {
deserialize_elements::<_, CopyOptionGroupResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"OptionGroup" => {
obj.option_group =
Some(OptionGroupDeserializer::deserialize("OptionGroup", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterEndpointMessage {
pub db_cluster_endpoint_identifier: String,
pub db_cluster_identifier: String,
pub endpoint_type: String,
pub excluded_members: Option<Vec<String>>,
pub static_members: Option<Vec<String>>,
}
struct CreateDBClusterEndpointMessageSerializer;
impl CreateDBClusterEndpointMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBClusterEndpointMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterEndpointIdentifier"),
&obj.db_cluster_endpoint_identifier,
);
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
params.put(&format!("{}{}", prefix, "EndpointType"), &obj.endpoint_type);
if let Some(ref field_value) = obj.excluded_members {
StringListSerializer::serialize(
params,
&format!("{}{}", prefix, "ExcludedMembers"),
field_value,
);
}
if let Some(ref field_value) = obj.static_members {
StringListSerializer::serialize(
params,
&format!("{}{}", prefix, "StaticMembers"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterMessage {
pub availability_zones: Option<Vec<String>>,
pub backtrack_window: Option<i64>,
pub backup_retention_period: Option<i64>,
pub character_set_name: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub database_name: Option<String>,
pub deletion_protection: Option<bool>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub engine: String,
pub engine_mode: Option<String>,
pub engine_version: Option<String>,
pub global_cluster_identifier: Option<String>,
pub kms_key_id: Option<String>,
pub master_user_password: Option<String>,
pub master_username: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub pre_signed_url: Option<String>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub replication_source_identifier: Option<String>,
pub scaling_configuration: Option<ScalingConfiguration>,
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.backtrack_window {
params.put(&format!("{}{}", prefix, "BacktrackWindow"), &field_value);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.character_set_name {
params.put(&format!("{}{}", prefix, "CharacterSetName"), &field_value);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.database_name {
params.put(&format!("{}{}", prefix, "DatabaseName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_mode {
params.put(&format!("{}{}", prefix, "EngineMode"), &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.global_cluster_identifier {
params.put(
&format!("{}{}", prefix, "GlobalClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.master_user_password {
params.put(&format!("{}{}", prefix, "MasterUserPassword"), &field_value);
}
if let Some(ref field_value) = obj.master_username {
params.put(&format!("{}{}", prefix, "MasterUsername"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.pre_signed_url {
params.put(&format!("{}{}", prefix, "PreSignedUrl"), &field_value);
}
if let Some(ref field_value) = obj.preferred_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.preferred_maintenance_window {
params.put(
&format!("{}{}", prefix, "PreferredMaintenanceWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.replication_source_identifier {
params.put(
&format!("{}{}", prefix, "ReplicationSourceIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.scaling_configuration {
ScalingConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "ScalingConfiguration"),
field_value,
);
}
if let Some(ref field_value) = obj.storage_encrypted {
params.put(&format!("{}{}", prefix, "StorageEncrypted"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterParameterGroupMessage {
pub db_cluster_parameter_group_name: String,
pub db_parameter_group_family: String,
pub description: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBClusterParameterGroupMessageSerializer;
impl CreateDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_parameter_group_name,
);
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
params.put(&format!("{}{}", prefix, "Description"), &obj.description);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterParameterGroupResult {
pub db_cluster_parameter_group: Option<DBClusterParameterGroup>,
}
struct CreateDBClusterParameterGroupResultDeserializer;
impl CreateDBClusterParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBClusterParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CreateDBClusterParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroup" => {
obj.db_cluster_parameter_group =
Some(DBClusterParameterGroupDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct CreateDBClusterResultDeserializer;
impl CreateDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBClusterResult, XmlParseError> {
deserialize_elements::<_, CreateDBClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster = Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterSnapshotMessage {
pub db_cluster_identifier: String,
pub db_cluster_snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBClusterSnapshotMessageSerializer;
impl CreateDBClusterSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBClusterSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
params.put(
&format!("{}{}", prefix, "DBClusterSnapshotIdentifier"),
&obj.db_cluster_snapshot_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBClusterSnapshotResult {
pub db_cluster_snapshot: Option<DBClusterSnapshot>,
}
struct CreateDBClusterSnapshotResultDeserializer;
impl CreateDBClusterSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBClusterSnapshotResult, XmlParseError> {
deserialize_elements::<_, CreateDBClusterSnapshotResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshot" => {
obj.db_cluster_snapshot = Some(DBClusterSnapshotDeserializer::deserialize(
"DBClusterSnapshot",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBInstanceMessage {
pub allocated_storage: Option<i64>,
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub backup_retention_period: Option<i64>,
pub character_set_name: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: Option<String>,
pub db_instance_class: String,
pub db_instance_identifier: String,
pub db_name: Option<String>,
pub db_parameter_group_name: Option<String>,
pub db_security_groups: Option<Vec<String>>,
pub db_subnet_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub domain: Option<String>,
pub domain_iam_role_name: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub enable_performance_insights: Option<bool>,
pub engine: String,
pub engine_version: Option<String>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub license_model: Option<String>,
pub master_user_password: Option<String>,
pub master_username: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub option_group_name: Option<String>,
pub performance_insights_kms_key_id: Option<String>,
pub performance_insights_retention_period: Option<i64>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub promotion_tier: Option<i64>,
pub publicly_accessible: Option<bool>,
pub storage_encrypted: Option<bool>,
pub storage_type: Option<String>,
pub tags: Option<Vec<Tag>>,
pub tde_credential_arn: Option<String>,
pub tde_credential_password: Option<String>,
pub timezone: Option<String>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct CreateDBInstanceMessageSerializer;
impl CreateDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allocated_storage {
params.put(&format!("{}{}", prefix, "AllocatedStorage"), &field_value);
}
if let Some(ref field_value) = obj.auto_minor_version_upgrade {
params.put(
&format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.availability_zone {
params.put(&format!("{}{}", prefix, "AvailabilityZone"), &field_value);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.character_set_name {
params.put(&format!("{}{}", prefix, "CharacterSetName"), &field_value);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
if let Some(ref field_value) = obj.db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBInstanceClass"),
&obj.db_instance_class,
);
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.db_name {
params.put(&format!("{}{}", prefix, "DBName"), &field_value);
}
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_security_groups {
DBSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "DBSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.domain {
params.put(&format!("{}{}", prefix, "Domain"), &field_value);
}
if let Some(ref field_value) = obj.domain_iam_role_name {
params.put(&format!("{}{}", prefix, "DomainIAMRoleName"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.enable_performance_insights {
params.put(
&format!("{}{}", prefix, "EnablePerformanceInsights"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &field_value);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &field_value);
}
if let Some(ref field_value) = obj.master_user_password {
params.put(&format!("{}{}", prefix, "MasterUserPassword"), &field_value);
}
if let Some(ref field_value) = obj.master_username {
params.put(&format!("{}{}", prefix, "MasterUsername"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_interval {
params.put(&format!("{}{}", prefix, "MonitoringInterval"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_role_arn {
params.put(&format!("{}{}", prefix, "MonitoringRoleArn"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.performance_insights_kms_key_id {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsKMSKeyId"),
&field_value,
);
}
if let Some(ref field_value) = obj.performance_insights_retention_period {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsRetentionPeriod"),
&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.processor_features {
ProcessorFeatureListSerializer::serialize(
params,
&format!("{}{}", prefix, "ProcessorFeature"),
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.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
if let Some(ref field_value) = obj.storage_encrypted {
params.put(&format!("{}{}", prefix, "StorageEncrypted"), &field_value);
}
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.tde_credential_arn {
params.put(&format!("{}{}", prefix, "TdeCredentialArn"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_password {
params.put(
&format!("{}{}", prefix, "TdeCredentialPassword"),
&field_value,
);
}
if let Some(ref field_value) = obj.timezone {
params.put(&format!("{}{}", prefix, "Timezone"), &field_value);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBInstanceReadReplicaMessage {
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: String,
pub db_subnet_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub enable_performance_insights: Option<bool>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub option_group_name: Option<String>,
pub performance_insights_kms_key_id: Option<String>,
pub performance_insights_retention_period: Option<i64>,
pub port: Option<i64>,
pub pre_signed_url: Option<String>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub publicly_accessible: Option<bool>,
pub source_db_instance_identifier: String,
pub storage_type: Option<String>,
pub tags: Option<Vec<Tag>>,
pub use_default_processor_features: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct CreateDBInstanceReadReplicaMessageSerializer;
impl CreateDBInstanceReadReplicaMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBInstanceReadReplicaMessage) {
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);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
if let Some(ref field_value) = obj.db_instance_class {
params.put(&format!("{}{}", prefix, "DBInstanceClass"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.enable_performance_insights {
params.put(
&format!("{}{}", prefix, "EnablePerformanceInsights"),
&field_value,
);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &field_value);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_interval {
params.put(&format!("{}{}", prefix, "MonitoringInterval"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_role_arn {
params.put(&format!("{}{}", prefix, "MonitoringRoleArn"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.performance_insights_kms_key_id {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsKMSKeyId"),
&field_value,
);
}
if let Some(ref field_value) = obj.performance_insights_retention_period {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.pre_signed_url {
params.put(&format!("{}{}", prefix, "PreSignedUrl"), &field_value);
}
if let Some(ref field_value) = obj.processor_features {
ProcessorFeatureListSerializer::serialize(
params,
&format!("{}{}", prefix, "ProcessorFeature"),
field_value,
);
}
if let Some(ref field_value) = obj.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SourceDBInstanceIdentifier"),
&obj.source_db_instance_identifier,
);
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.use_default_processor_features {
params.put(
&format!("{}{}", prefix, "UseDefaultProcessorFeatures"),
&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 CreateDBInstanceReadReplicaResult {
pub db_instance: Option<DBInstance>,
}
struct CreateDBInstanceReadReplicaResultDeserializer;
impl CreateDBInstanceReadReplicaResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBInstanceReadReplicaResult, XmlParseError> {
deserialize_elements::<_, CreateDBInstanceReadReplicaResult, _>(
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 CreateDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct CreateDBInstanceResultDeserializer;
impl CreateDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBInstanceResult, XmlParseError> {
deserialize_elements::<_, CreateDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBParameterGroupMessage {
pub db_parameter_group_family: String,
pub db_parameter_group_name: String,
pub description: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBParameterGroupMessageSerializer;
impl CreateDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
params.put(&format!("{}{}", prefix, "Description"), &obj.description);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBParameterGroupResult {
pub db_parameter_group: Option<DBParameterGroup>,
}
struct CreateDBParameterGroupResultDeserializer;
impl CreateDBParameterGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBParameterGroupResult, XmlParseError> {
deserialize_elements::<_, CreateDBParameterGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroup" => {
obj.db_parameter_group = Some(DBParameterGroupDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBSecurityGroupMessage {
pub db_security_group_description: String,
pub db_security_group_name: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBSecurityGroupMessageSerializer;
impl CreateDBSecurityGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBSecurityGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSecurityGroupDescription"),
&obj.db_security_group_description,
);
params.put(
&format!("{}{}", prefix, "DBSecurityGroupName"),
&obj.db_security_group_name,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBSecurityGroupResult {
pub db_security_group: Option<DBSecurityGroup>,
}
struct CreateDBSecurityGroupResultDeserializer;
impl CreateDBSecurityGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBSecurityGroupResult, XmlParseError> {
deserialize_elements::<_, CreateDBSecurityGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSecurityGroup" => {
obj.db_security_group = Some(DBSecurityGroupDeserializer::deserialize(
"DBSecurityGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBSnapshotMessage {
pub db_instance_identifier: String,
pub db_snapshot_identifier: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBSnapshotMessageSerializer;
impl CreateDBSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&obj.db_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 CreateDBSnapshotResult {
pub db_snapshot: Option<DBSnapshot>,
}
struct CreateDBSnapshotResultDeserializer;
impl CreateDBSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBSnapshotResult, XmlParseError> {
deserialize_elements::<_, CreateDBSnapshotResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSnapshot" => {
obj.db_snapshot =
Some(DBSnapshotDeserializer::deserialize("DBSnapshot", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBSubnetGroupMessage {
pub db_subnet_group_description: String,
pub db_subnet_group_name: String,
pub subnet_ids: Vec<String>,
pub tags: Option<Vec<Tag>>,
}
struct CreateDBSubnetGroupMessageSerializer;
impl CreateDBSubnetGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateDBSubnetGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSubnetGroupDescription"),
&obj.db_subnet_group_description,
);
params.put(
&format!("{}{}", prefix, "DBSubnetGroupName"),
&obj.db_subnet_group_name,
);
SubnetIdentifierListSerializer::serialize(
params,
&format!("{}{}", prefix, "SubnetIdentifier"),
&obj.subnet_ids,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateDBSubnetGroupResult {
pub db_subnet_group: Option<DBSubnetGroup>,
}
struct CreateDBSubnetGroupResultDeserializer;
impl CreateDBSubnetGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateDBSubnetGroupResult, XmlParseError> {
deserialize_elements::<_, CreateDBSubnetGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSubnetGroup" => {
obj.db_subnet_group = Some(DBSubnetGroupDeserializer::deserialize(
"DBSubnetGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateEventSubscriptionMessage {
pub enabled: Option<bool>,
pub event_categories: Option<Vec<String>>,
pub sns_topic_arn: String,
pub source_ids: Option<Vec<String>>,
pub source_type: Option<String>,
pub subscription_name: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateEventSubscriptionMessageSerializer;
impl CreateEventSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateEventSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.enabled {
params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
}
if let Some(ref field_value) = obj.event_categories {
EventCategoriesListSerializer::serialize(
params,
&format!("{}{}", prefix, "EventCategory"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "SnsTopicArn"), &obj.sns_topic_arn);
if let Some(ref field_value) = obj.source_ids {
SourceIdsListSerializer::serialize(
params,
&format!("{}{}", prefix, "SourceId"),
field_value,
);
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateEventSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct CreateEventSubscriptionResultDeserializer;
impl CreateEventSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateEventSubscriptionResult, XmlParseError> {
deserialize_elements::<_, CreateEventSubscriptionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscription" => {
obj.event_subscription = Some(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateGlobalClusterMessage {
pub database_name: Option<String>,
pub deletion_protection: Option<bool>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub global_cluster_identifier: Option<String>,
pub source_db_cluster_identifier: Option<String>,
pub storage_encrypted: Option<bool>,
}
struct CreateGlobalClusterMessageSerializer;
impl CreateGlobalClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateGlobalClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.database_name {
params.put(&format!("{}{}", prefix, "DatabaseName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &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.global_cluster_identifier {
params.put(
&format!("{}{}", prefix, "GlobalClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.source_db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "SourceDBClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.storage_encrypted {
params.put(&format!("{}{}", prefix, "StorageEncrypted"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateGlobalClusterResult {
pub global_cluster: Option<GlobalCluster>,
}
struct CreateGlobalClusterResultDeserializer;
impl CreateGlobalClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateGlobalClusterResult, XmlParseError> {
deserialize_elements::<_, CreateGlobalClusterResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"GlobalCluster" => {
obj.global_cluster = Some(GlobalClusterDeserializer::deserialize(
"GlobalCluster",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateOptionGroupMessage {
pub engine_name: String,
pub major_engine_version: String,
pub option_group_description: String,
pub option_group_name: String,
pub tags: Option<Vec<Tag>>,
}
struct CreateOptionGroupMessageSerializer;
impl CreateOptionGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &CreateOptionGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "EngineName"), &obj.engine_name);
params.put(
&format!("{}{}", prefix, "MajorEngineVersion"),
&obj.major_engine_version,
);
params.put(
&format!("{}{}", prefix, "OptionGroupDescription"),
&obj.option_group_description,
);
params.put(
&format!("{}{}", prefix, "OptionGroupName"),
&obj.option_group_name,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateOptionGroupResult {
pub option_group: Option<OptionGroup>,
}
struct CreateOptionGroupResultDeserializer;
impl CreateOptionGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateOptionGroupResult, XmlParseError> {
deserialize_elements::<_, CreateOptionGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"OptionGroup" => {
obj.option_group =
Some(OptionGroupDeserializer::deserialize("OptionGroup", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBCluster {
pub activity_stream_kinesis_stream_name: Option<String>,
pub activity_stream_kms_key_id: Option<String>,
pub activity_stream_mode: Option<String>,
pub activity_stream_status: Option<String>,
pub allocated_storage: Option<i64>,
pub associated_roles: Option<Vec<DBClusterRole>>,
pub availability_zones: Option<Vec<String>>,
pub backtrack_consumed_change_records: Option<i64>,
pub backtrack_window: Option<i64>,
pub backup_retention_period: Option<i64>,
pub capacity: Option<i64>,
pub character_set_name: Option<String>,
pub clone_group_id: Option<String>,
pub cluster_create_time: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub custom_endpoints: Option<Vec<String>>,
pub db_cluster_arn: Option<String>,
pub db_cluster_identifier: Option<String>,
pub db_cluster_members: Option<Vec<DBClusterMember>>,
pub db_cluster_option_group_memberships: Option<Vec<DBClusterOptionGroupStatus>>,
pub db_cluster_parameter_group: Option<String>,
pub db_subnet_group: Option<String>,
pub database_name: Option<String>,
pub db_cluster_resource_id: Option<String>,
pub deletion_protection: Option<bool>,
pub earliest_backtrack_time: 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_mode: Option<String>,
pub engine_version: Option<String>,
pub hosted_zone_id: Option<String>,
pub http_endpoint_enabled: Option<bool>,
pub iam_database_authentication_enabled: Option<bool>,
pub kms_key_id: Option<String>,
pub latest_restorable_time: Option<String>,
pub master_username: Option<String>,
pub multi_az: Option<bool>,
pub percent_progress: Option<String>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub read_replica_identifiers: Option<Vec<String>>,
pub reader_endpoint: Option<String>,
pub replication_source_identifier: Option<String>,
pub scaling_configuration_info: Option<ScalingConfigurationInfo>,
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 {
"ActivityStreamKinesisStreamName" => {
obj.activity_stream_kinesis_stream_name = Some(
StringDeserializer::deserialize("ActivityStreamKinesisStreamName", stack)?,
);
}
"ActivityStreamKmsKeyId" => {
obj.activity_stream_kms_key_id = Some(StringDeserializer::deserialize(
"ActivityStreamKmsKeyId",
stack,
)?);
}
"ActivityStreamMode" => {
obj.activity_stream_mode = Some(ActivityStreamModeDeserializer::deserialize(
"ActivityStreamMode",
stack,
)?);
}
"ActivityStreamStatus" => {
obj.activity_stream_status =
Some(ActivityStreamStatusDeserializer::deserialize(
"ActivityStreamStatus",
stack,
)?);
}
"AllocatedStorage" => {
obj.allocated_storage = Some(IntegerOptionalDeserializer::deserialize(
"AllocatedStorage",
stack,
)?);
}
"AssociatedRoles" => {
obj.associated_roles.get_or_insert(vec![]).extend(
DBClusterRolesDeserializer::deserialize("AssociatedRoles", stack)?,
);
}
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
"BacktrackConsumedChangeRecords" => {
obj.backtrack_consumed_change_records =
Some(LongOptionalDeserializer::deserialize(
"BacktrackConsumedChangeRecords",
stack,
)?);
}
"BacktrackWindow" => {
obj.backtrack_window = Some(LongOptionalDeserializer::deserialize(
"BacktrackWindow",
stack,
)?);
}
"BackupRetentionPeriod" => {
obj.backup_retention_period = Some(IntegerOptionalDeserializer::deserialize(
"BackupRetentionPeriod",
stack,
)?);
}
"Capacity" => {
obj.capacity =
Some(IntegerOptionalDeserializer::deserialize("Capacity", stack)?);
}
"CharacterSetName" => {
obj.character_set_name =
Some(StringDeserializer::deserialize("CharacterSetName", stack)?);
}
"CloneGroupId" => {
obj.clone_group_id =
Some(StringDeserializer::deserialize("CloneGroupId", stack)?);
}
"ClusterCreateTime" => {
obj.cluster_create_time =
Some(TStampDeserializer::deserialize("ClusterCreateTime", stack)?);
}
"CopyTagsToSnapshot" => {
obj.copy_tags_to_snapshot = Some(BooleanDeserializer::deserialize(
"CopyTagsToSnapshot",
stack,
)?);
}
"CustomEndpoints" => {
obj.custom_endpoints.get_or_insert(vec![]).extend(
StringListDeserializer::deserialize("CustomEndpoints", stack)?,
);
}
"DBClusterArn" => {
obj.db_cluster_arn =
Some(StringDeserializer::deserialize("DBClusterArn", stack)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"DBClusterMembers" => {
obj.db_cluster_members.get_or_insert(vec![]).extend(
DBClusterMemberListDeserializer::deserialize("DBClusterMembers", stack)?,
);
}
"DBClusterOptionGroupMemberships" => {
obj.db_cluster_option_group_memberships
.get_or_insert(vec![])
.extend(DBClusterOptionGroupMembershipsDeserializer::deserialize(
"DBClusterOptionGroupMemberships",
stack,
)?);
}
"DBClusterParameterGroup" => {
obj.db_cluster_parameter_group = Some(StringDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
}
"DBSubnetGroup" => {
obj.db_subnet_group =
Some(StringDeserializer::deserialize("DBSubnetGroup", stack)?);
}
"DatabaseName" => {
obj.database_name =
Some(StringDeserializer::deserialize("DatabaseName", stack)?);
}
"DbClusterResourceId" => {
obj.db_cluster_resource_id = Some(StringDeserializer::deserialize(
"DbClusterResourceId",
stack,
)?);
}
"DeletionProtection" => {
obj.deletion_protection = Some(BooleanDeserializer::deserialize(
"DeletionProtection",
stack,
)?);
}
"EarliestBacktrackTime" => {
obj.earliest_backtrack_time = Some(TStampDeserializer::deserialize(
"EarliestBacktrackTime",
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)?);
}
"EngineMode" => {
obj.engine_mode = Some(StringDeserializer::deserialize("EngineMode", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"HostedZoneId" => {
obj.hosted_zone_id =
Some(StringDeserializer::deserialize("HostedZoneId", stack)?);
}
"HttpEndpointEnabled" => {
obj.http_endpoint_enabled = Some(BooleanDeserializer::deserialize(
"HttpEndpointEnabled",
stack,
)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LatestRestorableTime" => {
obj.latest_restorable_time = Some(TStampDeserializer::deserialize(
"LatestRestorableTime",
stack,
)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"MultiAZ" => {
obj.multi_az = Some(BooleanDeserializer::deserialize("MultiAZ", stack)?);
}
"PercentProgress" => {
obj.percent_progress =
Some(StringDeserializer::deserialize("PercentProgress", stack)?);
}
"Port" => {
obj.port = Some(IntegerOptionalDeserializer::deserialize("Port", stack)?);
}
"PreferredBackupWindow" => {
obj.preferred_backup_window = Some(StringDeserializer::deserialize(
"PreferredBackupWindow",
stack,
)?);
}
"PreferredMaintenanceWindow" => {
obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
"PreferredMaintenanceWindow",
stack,
)?);
}
"ReadReplicaIdentifiers" => {
obj.read_replica_identifiers.get_or_insert(vec![]).extend(
ReadReplicaIdentifierListDeserializer::deserialize(
"ReadReplicaIdentifiers",
stack,
)?,
);
}
"ReaderEndpoint" => {
obj.reader_endpoint =
Some(StringDeserializer::deserialize("ReaderEndpoint", stack)?);
}
"ReplicationSourceIdentifier" => {
obj.replication_source_identifier = Some(StringDeserializer::deserialize(
"ReplicationSourceIdentifier",
stack,
)?);
}
"ScalingConfigurationInfo" => {
obj.scaling_configuration_info =
Some(ScalingConfigurationInfoDeserializer::deserialize(
"ScalingConfigurationInfo",
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(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterBacktrack {
pub backtrack_identifier: Option<String>,
pub backtrack_request_creation_time: Option<String>,
pub backtrack_to: Option<String>,
pub backtracked_from: Option<String>,
pub db_cluster_identifier: Option<String>,
pub status: Option<String>,
}
struct DBClusterBacktrackDeserializer;
impl DBClusterBacktrackDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterBacktrack, XmlParseError> {
deserialize_elements::<_, DBClusterBacktrack, _>(tag_name, stack, |name, stack, obj| {
match name {
"BacktrackIdentifier" => {
obj.backtrack_identifier = Some(StringDeserializer::deserialize(
"BacktrackIdentifier",
stack,
)?);
}
"BacktrackRequestCreationTime" => {
obj.backtrack_request_creation_time = Some(TStampDeserializer::deserialize(
"BacktrackRequestCreationTime",
stack,
)?);
}
"BacktrackTo" => {
obj.backtrack_to = Some(TStampDeserializer::deserialize("BacktrackTo", stack)?);
}
"BacktrackedFrom" => {
obj.backtracked_from =
Some(TStampDeserializer::deserialize("BacktrackedFrom", stack)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterBacktrackListDeserializer;
impl DBClusterBacktrackListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterBacktrack>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterBacktrack" {
obj.push(DBClusterBacktrackDeserializer::deserialize(
"DBClusterBacktrack",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterBacktrackMessage {
pub db_cluster_backtracks: Option<Vec<DBClusterBacktrack>>,
pub marker: Option<String>,
}
struct DBClusterBacktrackMessageDeserializer;
impl DBClusterBacktrackMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterBacktrackMessage, XmlParseError> {
deserialize_elements::<_, DBClusterBacktrackMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterBacktracks" => {
obj.db_cluster_backtracks.get_or_insert(vec![]).extend(
DBClusterBacktrackListDeserializer::deserialize(
"DBClusterBacktracks",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterCapacityInfo {
pub current_capacity: Option<i64>,
pub db_cluster_identifier: Option<String>,
pub pending_capacity: Option<i64>,
pub seconds_before_timeout: Option<i64>,
pub timeout_action: Option<String>,
}
struct DBClusterCapacityInfoDeserializer;
impl DBClusterCapacityInfoDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterCapacityInfo, XmlParseError> {
deserialize_elements::<_, DBClusterCapacityInfo, _>(tag_name, stack, |name, stack, obj| {
match name {
"CurrentCapacity" => {
obj.current_capacity = Some(IntegerOptionalDeserializer::deserialize(
"CurrentCapacity",
stack,
)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"PendingCapacity" => {
obj.pending_capacity = Some(IntegerOptionalDeserializer::deserialize(
"PendingCapacity",
stack,
)?);
}
"SecondsBeforeTimeout" => {
obj.seconds_before_timeout = Some(IntegerOptionalDeserializer::deserialize(
"SecondsBeforeTimeout",
stack,
)?);
}
"TimeoutAction" => {
obj.timeout_action =
Some(StringDeserializer::deserialize("TimeoutAction", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterEndpoint {
pub custom_endpoint_type: Option<String>,
pub db_cluster_endpoint_arn: Option<String>,
pub db_cluster_endpoint_identifier: Option<String>,
pub db_cluster_endpoint_resource_identifier: Option<String>,
pub db_cluster_identifier: Option<String>,
pub endpoint: Option<String>,
pub endpoint_type: Option<String>,
pub excluded_members: Option<Vec<String>>,
pub static_members: Option<Vec<String>>,
pub status: Option<String>,
}
struct DBClusterEndpointDeserializer;
impl DBClusterEndpointDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterEndpoint, XmlParseError> {
deserialize_elements::<_, DBClusterEndpoint, _>(tag_name, stack, |name, stack, obj| {
match name {
"CustomEndpointType" => {
obj.custom_endpoint_type = Some(StringDeserializer::deserialize(
"CustomEndpointType",
stack,
)?);
}
"DBClusterEndpointArn" => {
obj.db_cluster_endpoint_arn = Some(StringDeserializer::deserialize(
"DBClusterEndpointArn",
stack,
)?);
}
"DBClusterEndpointIdentifier" => {
obj.db_cluster_endpoint_identifier = Some(StringDeserializer::deserialize(
"DBClusterEndpointIdentifier",
stack,
)?);
}
"DBClusterEndpointResourceIdentifier" => {
obj.db_cluster_endpoint_resource_identifier =
Some(StringDeserializer::deserialize(
"DBClusterEndpointResourceIdentifier",
stack,
)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"Endpoint" => {
obj.endpoint = Some(StringDeserializer::deserialize("Endpoint", stack)?);
}
"EndpointType" => {
obj.endpoint_type =
Some(StringDeserializer::deserialize("EndpointType", stack)?);
}
"ExcludedMembers" => {
obj.excluded_members.get_or_insert(vec![]).extend(
StringListDeserializer::deserialize("ExcludedMembers", stack)?,
);
}
"StaticMembers" => {
obj.static_members
.get_or_insert(vec![])
.extend(StringListDeserializer::deserialize("StaticMembers", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterEndpointListDeserializer;
impl DBClusterEndpointListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterEndpoint>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterEndpointList" {
obj.push(DBClusterEndpointDeserializer::deserialize(
"DBClusterEndpointList",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterEndpointMessage {
pub db_cluster_endpoints: Option<Vec<DBClusterEndpoint>>,
pub marker: Option<String>,
}
struct DBClusterEndpointMessageDeserializer;
impl DBClusterEndpointMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterEndpointMessage, XmlParseError> {
deserialize_elements::<_, DBClusterEndpointMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterEndpoints" => {
obj.db_cluster_endpoints.get_or_insert(vec![]).extend(
DBClusterEndpointListDeserializer::deserialize(
"DBClusterEndpoints",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBClusterListDeserializer;
impl DBClusterListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBCluster>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBCluster" {
obj.push(DBClusterDeserializer::deserialize("DBCluster", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterMember {
pub db_cluster_parameter_group_status: Option<String>,
pub db_instance_identifier: Option<String>,
pub is_cluster_writer: Option<bool>,
pub promotion_tier: Option<i64>,
}
struct DBClusterMemberDeserializer;
impl DBClusterMemberDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterMember, XmlParseError> {
deserialize_elements::<_, DBClusterMember, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBClusterParameterGroupStatus" => {
obj.db_cluster_parameter_group_status = Some(StringDeserializer::deserialize(
"DBClusterParameterGroupStatus",
stack,
)?);
}
"DBInstanceIdentifier" => {
obj.db_instance_identifier = Some(StringDeserializer::deserialize(
"DBInstanceIdentifier",
stack,
)?);
}
"IsClusterWriter" => {
obj.is_cluster_writer =
Some(BooleanDeserializer::deserialize("IsClusterWriter", stack)?);
}
"PromotionTier" => {
obj.promotion_tier = Some(IntegerOptionalDeserializer::deserialize(
"PromotionTier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterMemberListDeserializer;
impl DBClusterMemberListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterMember>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterMember" {
obj.push(DBClusterMemberDeserializer::deserialize(
"DBClusterMember",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterMessage {
pub db_clusters: Option<Vec<DBCluster>>,
pub marker: Option<String>,
}
struct DBClusterMessageDeserializer;
impl DBClusterMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterMessage, XmlParseError> {
deserialize_elements::<_, DBClusterMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBClusters" => {
obj.db_clusters
.get_or_insert(vec![])
.extend(DBClusterListDeserializer::deserialize("DBClusters", stack)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterOptionGroupMembershipsDeserializer;
impl DBClusterOptionGroupMembershipsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterOptionGroupStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterOptionGroup" {
obj.push(DBClusterOptionGroupStatusDeserializer::deserialize(
"DBClusterOptionGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterOptionGroupStatus {
pub db_cluster_option_group_name: Option<String>,
pub status: Option<String>,
}
struct DBClusterOptionGroupStatusDeserializer;
impl DBClusterOptionGroupStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterOptionGroupStatus, XmlParseError> {
deserialize_elements::<_, DBClusterOptionGroupStatus, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterOptionGroupName" => {
obj.db_cluster_option_group_name = Some(StringDeserializer::deserialize(
"DBClusterOptionGroupName",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroup {
pub db_cluster_parameter_group_arn: Option<String>,
pub db_cluster_parameter_group_name: Option<String>,
pub db_parameter_group_family: Option<String>,
pub description: Option<String>,
}
struct DBClusterParameterGroupDeserializer;
impl DBClusterParameterGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroup, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroup, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroupArn" => {
obj.db_cluster_parameter_group_arn = Some(StringDeserializer::deserialize(
"DBClusterParameterGroupArn",
stack,
)?);
}
"DBClusterParameterGroupName" => {
obj.db_cluster_parameter_group_name = Some(
StringDeserializer::deserialize("DBClusterParameterGroupName", stack)?,
);
}
"DBParameterGroupFamily" => {
obj.db_parameter_group_family = Some(StringDeserializer::deserialize(
"DBParameterGroupFamily",
stack,
)?);
}
"Description" => {
obj.description =
Some(StringDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroupDetails {
pub marker: Option<String>,
pub parameters: Option<Vec<Parameter>>,
}
struct DBClusterParameterGroupDetailsDeserializer;
impl DBClusterParameterGroupDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroupDetails, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroupDetails, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"Parameters" => {
obj.parameters.get_or_insert(vec![]).extend(
ParametersListDeserializer::deserialize("Parameters", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBClusterParameterGroupListDeserializer;
impl DBClusterParameterGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterParameterGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterParameterGroup" {
obj.push(DBClusterParameterGroupDeserializer::deserialize(
"DBClusterParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroupNameMessage {
pub db_cluster_parameter_group_name: Option<String>,
}
struct DBClusterParameterGroupNameMessageDeserializer;
impl DBClusterParameterGroupNameMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroupNameMessage, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroupNameMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroupName" => {
obj.db_cluster_parameter_group_name = Some(
StringDeserializer::deserialize("DBClusterParameterGroupName", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterParameterGroupsMessage {
pub db_cluster_parameter_groups: Option<Vec<DBClusterParameterGroup>>,
pub marker: Option<String>,
}
struct DBClusterParameterGroupsMessageDeserializer;
impl DBClusterParameterGroupsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterParameterGroupsMessage, XmlParseError> {
deserialize_elements::<_, DBClusterParameterGroupsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterParameterGroups" => {
obj.db_cluster_parameter_groups
.get_or_insert(vec![])
.extend(DBClusterParameterGroupListDeserializer::deserialize(
"DBClusterParameterGroups",
stack,
)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterRole {
pub feature_name: Option<String>,
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 {
"FeatureName" => {
obj.feature_name = Some(StringDeserializer::deserialize("FeatureName", stack)?);
}
"RoleArn" => {
obj.role_arn = Some(StringDeserializer::deserialize("RoleArn", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBClusterRolesDeserializer;
impl DBClusterRolesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterRole>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterRole" {
obj.push(DBClusterRoleDeserializer::deserialize(
"DBClusterRole",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshot {
pub allocated_storage: Option<i64>,
pub availability_zones: Option<Vec<String>>,
pub cluster_create_time: Option<String>,
pub db_cluster_identifier: Option<String>,
pub db_cluster_snapshot_arn: Option<String>,
pub db_cluster_snapshot_identifier: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub iam_database_authentication_enabled: Option<bool>,
pub kms_key_id: Option<String>,
pub license_model: Option<String>,
pub master_username: Option<String>,
pub percent_progress: Option<i64>,
pub port: Option<i64>,
pub snapshot_create_time: Option<String>,
pub snapshot_type: Option<String>,
pub source_db_cluster_snapshot_arn: Option<String>,
pub status: Option<String>,
pub storage_encrypted: Option<bool>,
pub vpc_id: Option<String>,
}
struct DBClusterSnapshotDeserializer;
impl DBClusterSnapshotDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshot, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshot, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllocatedStorage" => {
obj.allocated_storage =
Some(IntegerDeserializer::deserialize("AllocatedStorage", stack)?);
}
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
);
}
"ClusterCreateTime" => {
obj.cluster_create_time =
Some(TStampDeserializer::deserialize("ClusterCreateTime", stack)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"DBClusterSnapshotArn" => {
obj.db_cluster_snapshot_arn = Some(StringDeserializer::deserialize(
"DBClusterSnapshotArn",
stack,
)?);
}
"DBClusterSnapshotIdentifier" => {
obj.db_cluster_snapshot_identifier = Some(StringDeserializer::deserialize(
"DBClusterSnapshotIdentifier",
stack,
)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"PercentProgress" => {
obj.percent_progress =
Some(IntegerDeserializer::deserialize("PercentProgress", stack)?);
}
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
"SnapshotCreateTime" => {
obj.snapshot_create_time = Some(TStampDeserializer::deserialize(
"SnapshotCreateTime",
stack,
)?);
}
"SnapshotType" => {
obj.snapshot_type =
Some(StringDeserializer::deserialize("SnapshotType", stack)?);
}
"SourceDBClusterSnapshotArn" => {
obj.source_db_cluster_snapshot_arn = Some(StringDeserializer::deserialize(
"SourceDBClusterSnapshotArn",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StorageEncrypted" => {
obj.storage_encrypted =
Some(BooleanDeserializer::deserialize("StorageEncrypted", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshotAttribute {
pub attribute_name: Option<String>,
pub attribute_values: Option<Vec<String>>,
}
struct DBClusterSnapshotAttributeDeserializer;
impl DBClusterSnapshotAttributeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshotAttribute, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshotAttribute, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AttributeName" => {
obj.attribute_name =
Some(StringDeserializer::deserialize("AttributeName", stack)?);
}
"AttributeValues" => {
obj.attribute_values.get_or_insert(vec![]).extend(
AttributeValueListDeserializer::deserialize("AttributeValues", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBClusterSnapshotAttributeListDeserializer;
impl DBClusterSnapshotAttributeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterSnapshotAttribute>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterSnapshotAttribute" {
obj.push(DBClusterSnapshotAttributeDeserializer::deserialize(
"DBClusterSnapshotAttribute",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshotAttributesResult {
pub db_cluster_snapshot_attributes: Option<Vec<DBClusterSnapshotAttribute>>,
pub db_cluster_snapshot_identifier: Option<String>,
}
struct DBClusterSnapshotAttributesResultDeserializer;
impl DBClusterSnapshotAttributesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshotAttributesResult, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshotAttributesResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshotAttributes" => {
obj.db_cluster_snapshot_attributes
.get_or_insert(vec![])
.extend(DBClusterSnapshotAttributeListDeserializer::deserialize(
"DBClusterSnapshotAttributes",
stack,
)?);
}
"DBClusterSnapshotIdentifier" => {
obj.db_cluster_snapshot_identifier = Some(StringDeserializer::deserialize(
"DBClusterSnapshotIdentifier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBClusterSnapshotListDeserializer;
impl DBClusterSnapshotListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBClusterSnapshot>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBClusterSnapshot" {
obj.push(DBClusterSnapshotDeserializer::deserialize(
"DBClusterSnapshot",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBClusterSnapshotMessage {
pub db_cluster_snapshots: Option<Vec<DBClusterSnapshot>>,
pub marker: Option<String>,
}
struct DBClusterSnapshotMessageDeserializer;
impl DBClusterSnapshotMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBClusterSnapshotMessage, XmlParseError> {
deserialize_elements::<_, DBClusterSnapshotMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshots" => {
obj.db_cluster_snapshots.get_or_insert(vec![]).extend(
DBClusterSnapshotListDeserializer::deserialize(
"DBClusterSnapshots",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBEngineVersion {
pub db_engine_description: Option<String>,
pub db_engine_version_description: Option<String>,
pub db_parameter_group_family: Option<String>,
pub default_character_set: Option<CharacterSet>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub exportable_log_types: Option<Vec<String>>,
pub status: Option<String>,
pub supported_character_sets: Option<Vec<CharacterSet>>,
pub supported_engine_modes: Option<Vec<String>>,
pub supported_feature_names: Option<Vec<String>>,
pub supported_timezones: Option<Vec<Timezone>>,
pub supports_log_exports_to_cloudwatch_logs: Option<bool>,
pub supports_read_replica: Option<bool>,
pub valid_upgrade_target: Option<Vec<UpgradeTarget>>,
}
struct DBEngineVersionDeserializer;
impl DBEngineVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBEngineVersion, XmlParseError> {
deserialize_elements::<_, DBEngineVersion, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBEngineDescription" => {
obj.db_engine_description = Some(StringDeserializer::deserialize(
"DBEngineDescription",
stack,
)?);
}
"DBEngineVersionDescription" => {
obj.db_engine_version_description = Some(StringDeserializer::deserialize(
"DBEngineVersionDescription",
stack,
)?);
}
"DBParameterGroupFamily" => {
obj.db_parameter_group_family = Some(StringDeserializer::deserialize(
"DBParameterGroupFamily",
stack,
)?);
}
"DefaultCharacterSet" => {
obj.default_character_set = Some(CharacterSetDeserializer::deserialize(
"DefaultCharacterSet",
stack,
)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"ExportableLogTypes" => {
obj.exportable_log_types.get_or_insert(vec![]).extend(
LogTypeListDeserializer::deserialize("ExportableLogTypes", stack)?,
);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"SupportedCharacterSets" => {
obj.supported_character_sets.get_or_insert(vec![]).extend(
SupportedCharacterSetsListDeserializer::deserialize(
"SupportedCharacterSets",
stack,
)?,
);
}
"SupportedEngineModes" => {
obj.supported_engine_modes.get_or_insert(vec![]).extend(
EngineModeListDeserializer::deserialize("SupportedEngineModes", stack)?,
);
}
"SupportedFeatureNames" => {
obj.supported_feature_names.get_or_insert(vec![]).extend(
FeatureNameListDeserializer::deserialize("SupportedFeatureNames", stack)?,
);
}
"SupportedTimezones" => {
obj.supported_timezones.get_or_insert(vec![]).extend(
SupportedTimezonesListDeserializer::deserialize(
"SupportedTimezones",
stack,
)?,
);
}
"SupportsLogExportsToCloudwatchLogs" => {
obj.supports_log_exports_to_cloudwatch_logs =
Some(BooleanDeserializer::deserialize(
"SupportsLogExportsToCloudwatchLogs",
stack,
)?);
}
"SupportsReadReplica" => {
obj.supports_read_replica = Some(BooleanDeserializer::deserialize(
"SupportsReadReplica",
stack,
)?);
}
"ValidUpgradeTarget" => {
obj.valid_upgrade_target.get_or_insert(vec![]).extend(
ValidUpgradeTargetListDeserializer::deserialize(
"ValidUpgradeTarget",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBEngineVersionListDeserializer;
impl DBEngineVersionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBEngineVersion>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBEngineVersion" {
obj.push(DBEngineVersionDeserializer::deserialize(
"DBEngineVersion",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBEngineVersionMessage {
pub db_engine_versions: Option<Vec<DBEngineVersion>>,
pub marker: Option<String>,
}
struct DBEngineVersionMessageDeserializer;
impl DBEngineVersionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBEngineVersionMessage, XmlParseError> {
deserialize_elements::<_, DBEngineVersionMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBEngineVersions" => {
obj.db_engine_versions.get_or_insert(vec![]).extend(
DBEngineVersionListDeserializer::deserialize("DBEngineVersions", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBInstance {
pub allocated_storage: Option<i64>,
pub associated_roles: Option<Vec<DBInstanceRole>>,
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub backup_retention_period: Option<i64>,
pub ca_certificate_identifier: Option<String>,
pub character_set_name: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: Option<String>,
pub db_instance_arn: Option<String>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: Option<String>,
pub db_instance_status: Option<String>,
pub db_name: Option<String>,
pub db_parameter_groups: Option<Vec<DBParameterGroupStatus>>,
pub db_security_groups: Option<Vec<DBSecurityGroupMembership>>,
pub db_subnet_group: Option<DBSubnetGroup>,
pub db_instance_port: Option<i64>,
pub dbi_resource_id: Option<String>,
pub deletion_protection: Option<bool>,
pub domain_memberships: Option<Vec<DomainMembership>>,
pub enabled_cloudwatch_logs_exports: Option<Vec<String>>,
pub endpoint: Option<Endpoint>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub enhanced_monitoring_resource_arn: Option<String>,
pub iam_database_authentication_enabled: Option<bool>,
pub instance_create_time: Option<String>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub latest_restorable_time: Option<String>,
pub license_model: Option<String>,
pub listener_endpoint: Option<Endpoint>,
pub master_username: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub option_group_memberships: Option<Vec<OptionGroupMembership>>,
pub pending_modified_values: Option<PendingModifiedValues>,
pub performance_insights_enabled: Option<bool>,
pub performance_insights_kms_key_id: Option<String>,
pub performance_insights_retention_period: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub promotion_tier: Option<i64>,
pub publicly_accessible: Option<bool>,
pub read_replica_db_cluster_identifiers: Option<Vec<String>>,
pub read_replica_db_instance_identifiers: Option<Vec<String>>,
pub read_replica_source_db_instance_identifier: Option<String>,
pub secondary_availability_zone: Option<String>,
pub status_infos: Option<Vec<DBInstanceStatusInfo>>,
pub storage_encrypted: Option<bool>,
pub storage_type: Option<String>,
pub tde_credential_arn: Option<String>,
pub timezone: Option<String>,
pub vpc_security_groups: Option<Vec<VpcSecurityGroupMembership>>,
}
struct DBInstanceDeserializer;
impl DBInstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstance, XmlParseError> {
deserialize_elements::<_, DBInstance, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllocatedStorage" => {
obj.allocated_storage =
Some(IntegerDeserializer::deserialize("AllocatedStorage", stack)?);
}
"AssociatedRoles" => {
obj.associated_roles.get_or_insert(vec![]).extend(
DBInstanceRolesDeserializer::deserialize("AssociatedRoles", stack)?,
);
}
"AutoMinorVersionUpgrade" => {
obj.auto_minor_version_upgrade = Some(BooleanDeserializer::deserialize(
"AutoMinorVersionUpgrade",
stack,
)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"BackupRetentionPeriod" => {
obj.backup_retention_period = Some(IntegerDeserializer::deserialize(
"BackupRetentionPeriod",
stack,
)?);
}
"CACertificateIdentifier" => {
obj.ca_certificate_identifier = Some(StringDeserializer::deserialize(
"CACertificateIdentifier",
stack,
)?);
}
"CharacterSetName" => {
obj.character_set_name =
Some(StringDeserializer::deserialize("CharacterSetName", stack)?);
}
"CopyTagsToSnapshot" => {
obj.copy_tags_to_snapshot = Some(BooleanDeserializer::deserialize(
"CopyTagsToSnapshot",
stack,
)?);
}
"DBClusterIdentifier" => {
obj.db_cluster_identifier = Some(StringDeserializer::deserialize(
"DBClusterIdentifier",
stack,
)?);
}
"DBInstanceArn" => {
obj.db_instance_arn =
Some(StringDeserializer::deserialize("DBInstanceArn", stack)?);
}
"DBInstanceClass" => {
obj.db_instance_class =
Some(StringDeserializer::deserialize("DBInstanceClass", stack)?);
}
"DBInstanceIdentifier" => {
obj.db_instance_identifier = Some(StringDeserializer::deserialize(
"DBInstanceIdentifier",
stack,
)?);
}
"DBInstanceStatus" => {
obj.db_instance_status =
Some(StringDeserializer::deserialize("DBInstanceStatus", stack)?);
}
"DBName" => {
obj.db_name = Some(StringDeserializer::deserialize("DBName", stack)?);
}
"DBParameterGroups" => {
obj.db_parameter_groups.get_or_insert(vec![]).extend(
DBParameterGroupStatusListDeserializer::deserialize(
"DBParameterGroups",
stack,
)?,
);
}
"DBSecurityGroups" => {
obj.db_security_groups.get_or_insert(vec![]).extend(
DBSecurityGroupMembershipListDeserializer::deserialize(
"DBSecurityGroups",
stack,
)?,
);
}
"DBSubnetGroup" => {
obj.db_subnet_group = Some(DBSubnetGroupDeserializer::deserialize(
"DBSubnetGroup",
stack,
)?);
}
"DbInstancePort" => {
obj.db_instance_port =
Some(IntegerDeserializer::deserialize("DbInstancePort", stack)?);
}
"DbiResourceId" => {
obj.dbi_resource_id =
Some(StringDeserializer::deserialize("DbiResourceId", stack)?);
}
"DeletionProtection" => {
obj.deletion_protection = Some(BooleanDeserializer::deserialize(
"DeletionProtection",
stack,
)?);
}
"DomainMemberships" => {
obj.domain_memberships.get_or_insert(vec![]).extend(
DomainMembershipListDeserializer::deserialize("DomainMemberships", stack)?,
);
}
"EnabledCloudwatchLogsExports" => {
obj.enabled_cloudwatch_logs_exports
.get_or_insert(vec![])
.extend(LogTypeListDeserializer::deserialize(
"EnabledCloudwatchLogsExports",
stack,
)?);
}
"Endpoint" => {
obj.endpoint = Some(EndpointDeserializer::deserialize("Endpoint", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"EnhancedMonitoringResourceArn" => {
obj.enhanced_monitoring_resource_arn = Some(StringDeserializer::deserialize(
"EnhancedMonitoringResourceArn",
stack,
)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"InstanceCreateTime" => {
obj.instance_create_time = Some(TStampDeserializer::deserialize(
"InstanceCreateTime",
stack,
)?);
}
"Iops" => {
obj.iops = Some(IntegerOptionalDeserializer::deserialize("Iops", stack)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LatestRestorableTime" => {
obj.latest_restorable_time = Some(TStampDeserializer::deserialize(
"LatestRestorableTime",
stack,
)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"ListenerEndpoint" => {
obj.listener_endpoint = Some(EndpointDeserializer::deserialize(
"ListenerEndpoint",
stack,
)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"MonitoringInterval" => {
obj.monitoring_interval = Some(IntegerOptionalDeserializer::deserialize(
"MonitoringInterval",
stack,
)?);
}
"MonitoringRoleArn" => {
obj.monitoring_role_arn =
Some(StringDeserializer::deserialize("MonitoringRoleArn", stack)?);
}
"MultiAZ" => {
obj.multi_az = Some(BooleanDeserializer::deserialize("MultiAZ", stack)?);
}
"OptionGroupMemberships" => {
obj.option_group_memberships.get_or_insert(vec![]).extend(
OptionGroupMembershipListDeserializer::deserialize(
"OptionGroupMemberships",
stack,
)?,
);
}
"PendingModifiedValues" => {
obj.pending_modified_values =
Some(PendingModifiedValuesDeserializer::deserialize(
"PendingModifiedValues",
stack,
)?);
}
"PerformanceInsightsEnabled" => {
obj.performance_insights_enabled =
Some(BooleanOptionalDeserializer::deserialize(
"PerformanceInsightsEnabled",
stack,
)?);
}
"PerformanceInsightsKMSKeyId" => {
obj.performance_insights_kms_key_id = Some(StringDeserializer::deserialize(
"PerformanceInsightsKMSKeyId",
stack,
)?);
}
"PerformanceInsightsRetentionPeriod" => {
obj.performance_insights_retention_period =
Some(IntegerOptionalDeserializer::deserialize(
"PerformanceInsightsRetentionPeriod",
stack,
)?);
}
"PreferredBackupWindow" => {
obj.preferred_backup_window = Some(StringDeserializer::deserialize(
"PreferredBackupWindow",
stack,
)?);
}
"PreferredMaintenanceWindow" => {
obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
"PreferredMaintenanceWindow",
stack,
)?);
}
"ProcessorFeatures" => {
obj.processor_features.get_or_insert(vec![]).extend(
ProcessorFeatureListDeserializer::deserialize("ProcessorFeatures", stack)?,
);
}
"PromotionTier" => {
obj.promotion_tier = Some(IntegerOptionalDeserializer::deserialize(
"PromotionTier",
stack,
)?);
}
"PubliclyAccessible" => {
obj.publicly_accessible = Some(BooleanDeserializer::deserialize(
"PubliclyAccessible",
stack,
)?);
}
"ReadReplicaDBClusterIdentifiers" => {
obj.read_replica_db_cluster_identifiers
.get_or_insert(vec![])
.extend(ReadReplicaDBClusterIdentifierListDeserializer::deserialize(
"ReadReplicaDBClusterIdentifiers",
stack,
)?);
}
"ReadReplicaDBInstanceIdentifiers" => {
obj.read_replica_db_instance_identifiers
.get_or_insert(vec![])
.extend(
ReadReplicaDBInstanceIdentifierListDeserializer::deserialize(
"ReadReplicaDBInstanceIdentifiers",
stack,
)?,
);
}
"ReadReplicaSourceDBInstanceIdentifier" => {
obj.read_replica_source_db_instance_identifier =
Some(StringDeserializer::deserialize(
"ReadReplicaSourceDBInstanceIdentifier",
stack,
)?);
}
"SecondaryAvailabilityZone" => {
obj.secondary_availability_zone = Some(StringDeserializer::deserialize(
"SecondaryAvailabilityZone",
stack,
)?);
}
"StatusInfos" => {
obj.status_infos.get_or_insert(vec![]).extend(
DBInstanceStatusInfoListDeserializer::deserialize("StatusInfos", stack)?,
);
}
"StorageEncrypted" => {
obj.storage_encrypted =
Some(BooleanDeserializer::deserialize("StorageEncrypted", stack)?);
}
"StorageType" => {
obj.storage_type = Some(StringDeserializer::deserialize("StorageType", stack)?);
}
"TdeCredentialArn" => {
obj.tde_credential_arn =
Some(StringDeserializer::deserialize("TdeCredentialArn", stack)?);
}
"Timezone" => {
obj.timezone = Some(StringDeserializer::deserialize("Timezone", stack)?);
}
"VpcSecurityGroups" => {
obj.vpc_security_groups.get_or_insert(vec![]).extend(
VpcSecurityGroupMembershipListDeserializer::deserialize(
"VpcSecurityGroups",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBInstanceAutomatedBackup {
pub allocated_storage: Option<i64>,
pub availability_zone: Option<String>,
pub db_instance_arn: Option<String>,
pub db_instance_identifier: Option<String>,
pub dbi_resource_id: Option<String>,
pub encrypted: Option<bool>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub iam_database_authentication_enabled: Option<bool>,
pub instance_create_time: Option<String>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub license_model: Option<String>,
pub master_username: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub region: Option<String>,
pub restore_window: Option<RestoreWindow>,
pub status: Option<String>,
pub storage_type: Option<String>,
pub tde_credential_arn: Option<String>,
pub timezone: Option<String>,
pub vpc_id: Option<String>,
}
struct DBInstanceAutomatedBackupDeserializer;
impl DBInstanceAutomatedBackupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstanceAutomatedBackup, XmlParseError> {
deserialize_elements::<_, DBInstanceAutomatedBackup, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AllocatedStorage" => {
obj.allocated_storage =
Some(IntegerDeserializer::deserialize("AllocatedStorage", stack)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"DBInstanceArn" => {
obj.db_instance_arn =
Some(StringDeserializer::deserialize("DBInstanceArn", stack)?);
}
"DBInstanceIdentifier" => {
obj.db_instance_identifier = Some(StringDeserializer::deserialize(
"DBInstanceIdentifier",
stack,
)?);
}
"DbiResourceId" => {
obj.dbi_resource_id =
Some(StringDeserializer::deserialize("DbiResourceId", stack)?);
}
"Encrypted" => {
obj.encrypted = Some(BooleanDeserializer::deserialize("Encrypted", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"InstanceCreateTime" => {
obj.instance_create_time = Some(TStampDeserializer::deserialize(
"InstanceCreateTime",
stack,
)?);
}
"Iops" => {
obj.iops = Some(IntegerOptionalDeserializer::deserialize("Iops", stack)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"OptionGroupName" => {
obj.option_group_name =
Some(StringDeserializer::deserialize("OptionGroupName", stack)?);
}
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
"Region" => {
obj.region = Some(StringDeserializer::deserialize("Region", stack)?);
}
"RestoreWindow" => {
obj.restore_window = Some(RestoreWindowDeserializer::deserialize(
"RestoreWindow",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StorageType" => {
obj.storage_type =
Some(StringDeserializer::deserialize("StorageType", stack)?);
}
"TdeCredentialArn" => {
obj.tde_credential_arn =
Some(StringDeserializer::deserialize("TdeCredentialArn", stack)?);
}
"Timezone" => {
obj.timezone = Some(StringDeserializer::deserialize("Timezone", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBInstanceAutomatedBackupListDeserializer;
impl DBInstanceAutomatedBackupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBInstanceAutomatedBackup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBInstanceAutomatedBackup" {
obj.push(DBInstanceAutomatedBackupDeserializer::deserialize(
"DBInstanceAutomatedBackup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBInstanceAutomatedBackupMessage {
pub db_instance_automated_backups: Option<Vec<DBInstanceAutomatedBackup>>,
pub marker: Option<String>,
}
struct DBInstanceAutomatedBackupMessageDeserializer;
impl DBInstanceAutomatedBackupMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstanceAutomatedBackupMessage, XmlParseError> {
deserialize_elements::<_, DBInstanceAutomatedBackupMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBInstanceAutomatedBackups" => {
obj.db_instance_automated_backups
.get_or_insert(vec![])
.extend(DBInstanceAutomatedBackupListDeserializer::deserialize(
"DBInstanceAutomatedBackups",
stack,
)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", 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 DBInstanceRole {
pub feature_name: Option<String>,
pub role_arn: Option<String>,
pub status: Option<String>,
}
struct DBInstanceRoleDeserializer;
impl DBInstanceRoleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstanceRole, XmlParseError> {
deserialize_elements::<_, DBInstanceRole, _>(tag_name, stack, |name, stack, obj| {
match name {
"FeatureName" => {
obj.feature_name = Some(StringDeserializer::deserialize("FeatureName", stack)?);
}
"RoleArn" => {
obj.role_arn = Some(StringDeserializer::deserialize("RoleArn", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBInstanceRolesDeserializer;
impl DBInstanceRolesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBInstanceRole>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBInstanceRole" {
obj.push(DBInstanceRoleDeserializer::deserialize(
"DBInstanceRole",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBInstanceStatusInfo {
pub message: Option<String>,
pub normal: Option<bool>,
pub status: Option<String>,
pub status_type: Option<String>,
}
struct DBInstanceStatusInfoDeserializer;
impl DBInstanceStatusInfoDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBInstanceStatusInfo, XmlParseError> {
deserialize_elements::<_, DBInstanceStatusInfo, _>(tag_name, stack, |name, stack, obj| {
match name {
"Message" => {
obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
}
"Normal" => {
obj.normal = Some(BooleanDeserializer::deserialize("Normal", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StatusType" => {
obj.status_type = Some(StringDeserializer::deserialize("StatusType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBInstanceStatusInfoListDeserializer;
impl DBInstanceStatusInfoListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBInstanceStatusInfo>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBInstanceStatusInfo" {
obj.push(DBInstanceStatusInfoDeserializer::deserialize(
"DBInstanceStatusInfo",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroup {
pub db_parameter_group_arn: Option<String>,
pub db_parameter_group_family: Option<String>,
pub db_parameter_group_name: Option<String>,
pub description: Option<String>,
}
struct DBParameterGroupDeserializer;
impl DBParameterGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroup, XmlParseError> {
deserialize_elements::<_, DBParameterGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBParameterGroupArn" => {
obj.db_parameter_group_arn = Some(StringDeserializer::deserialize(
"DBParameterGroupArn",
stack,
)?);
}
"DBParameterGroupFamily" => {
obj.db_parameter_group_family = Some(StringDeserializer::deserialize(
"DBParameterGroupFamily",
stack,
)?);
}
"DBParameterGroupName" => {
obj.db_parameter_group_name = Some(StringDeserializer::deserialize(
"DBParameterGroupName",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupDetails {
pub marker: Option<String>,
pub parameters: Option<Vec<Parameter>>,
}
struct DBParameterGroupDetailsDeserializer;
impl DBParameterGroupDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupDetails, XmlParseError> {
deserialize_elements::<_, DBParameterGroupDetails, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"Parameters" => {
obj.parameters.get_or_insert(vec![]).extend(
ParametersListDeserializer::deserialize("Parameters", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBParameterGroupListDeserializer;
impl DBParameterGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBParameterGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBParameterGroup" {
obj.push(DBParameterGroupDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupNameMessage {
pub db_parameter_group_name: Option<String>,
}
struct DBParameterGroupNameMessageDeserializer;
impl DBParameterGroupNameMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupNameMessage, XmlParseError> {
deserialize_elements::<_, DBParameterGroupNameMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroupName" => {
obj.db_parameter_group_name = Some(StringDeserializer::deserialize(
"DBParameterGroupName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupStatus {
pub db_parameter_group_name: Option<String>,
pub parameter_apply_status: Option<String>,
}
struct DBParameterGroupStatusDeserializer;
impl DBParameterGroupStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupStatus, XmlParseError> {
deserialize_elements::<_, DBParameterGroupStatus, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBParameterGroupName" => {
obj.db_parameter_group_name = Some(StringDeserializer::deserialize(
"DBParameterGroupName",
stack,
)?);
}
"ParameterApplyStatus" => {
obj.parameter_apply_status = Some(StringDeserializer::deserialize(
"ParameterApplyStatus",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBParameterGroupStatusListDeserializer;
impl DBParameterGroupStatusListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBParameterGroupStatus>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBParameterGroup" {
obj.push(DBParameterGroupStatusDeserializer::deserialize(
"DBParameterGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBParameterGroupsMessage {
pub db_parameter_groups: Option<Vec<DBParameterGroup>>,
pub marker: Option<String>,
}
struct DBParameterGroupsMessageDeserializer;
impl DBParameterGroupsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBParameterGroupsMessage, XmlParseError> {
deserialize_elements::<_, DBParameterGroupsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBParameterGroups" => {
obj.db_parameter_groups.get_or_insert(vec![]).extend(
DBParameterGroupListDeserializer::deserialize(
"DBParameterGroups",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSecurityGroup {
pub db_security_group_arn: Option<String>,
pub db_security_group_description: Option<String>,
pub db_security_group_name: Option<String>,
pub ec2_security_groups: Option<Vec<EC2SecurityGroup>>,
pub ip_ranges: Option<Vec<IPRange>>,
pub owner_id: Option<String>,
pub vpc_id: Option<String>,
}
struct DBSecurityGroupDeserializer;
impl DBSecurityGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSecurityGroup, XmlParseError> {
deserialize_elements::<_, DBSecurityGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSecurityGroupArn" => {
obj.db_security_group_arn = Some(StringDeserializer::deserialize(
"DBSecurityGroupArn",
stack,
)?);
}
"DBSecurityGroupDescription" => {
obj.db_security_group_description = Some(StringDeserializer::deserialize(
"DBSecurityGroupDescription",
stack,
)?);
}
"DBSecurityGroupName" => {
obj.db_security_group_name = Some(StringDeserializer::deserialize(
"DBSecurityGroupName",
stack,
)?);
}
"EC2SecurityGroups" => {
obj.ec2_security_groups.get_or_insert(vec![]).extend(
EC2SecurityGroupListDeserializer::deserialize("EC2SecurityGroups", stack)?,
);
}
"IPRanges" => {
obj.ip_ranges
.get_or_insert(vec![])
.extend(IPRangeListDeserializer::deserialize("IPRanges", stack)?);
}
"OwnerId" => {
obj.owner_id = Some(StringDeserializer::deserialize("OwnerId", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSecurityGroupMembership {
pub db_security_group_name: Option<String>,
pub status: Option<String>,
}
struct DBSecurityGroupMembershipDeserializer;
impl DBSecurityGroupMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSecurityGroupMembership, XmlParseError> {
deserialize_elements::<_, DBSecurityGroupMembership, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSecurityGroupName" => {
obj.db_security_group_name = Some(StringDeserializer::deserialize(
"DBSecurityGroupName",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBSecurityGroupMembershipListDeserializer;
impl DBSecurityGroupMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBSecurityGroupMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBSecurityGroup" {
obj.push(DBSecurityGroupMembershipDeserializer::deserialize(
"DBSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSecurityGroupMessage {
pub db_security_groups: Option<Vec<DBSecurityGroup>>,
pub marker: Option<String>,
}
struct DBSecurityGroupMessageDeserializer;
impl DBSecurityGroupMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSecurityGroupMessage, XmlParseError> {
deserialize_elements::<_, DBSecurityGroupMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSecurityGroups" => {
obj.db_security_groups.get_or_insert(vec![]).extend(
DBSecurityGroupsDeserializer::deserialize("DBSecurityGroups", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DBSecurityGroupNameListSerializer;
impl DBSecurityGroupNameListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct DBSecurityGroupsDeserializer;
impl DBSecurityGroupsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBSecurityGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBSecurityGroup" {
obj.push(DBSecurityGroupDeserializer::deserialize(
"DBSecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSnapshot {
pub allocated_storage: Option<i64>,
pub availability_zone: Option<String>,
pub db_instance_identifier: Option<String>,
pub db_snapshot_arn: Option<String>,
pub db_snapshot_identifier: Option<String>,
pub dbi_resource_id: Option<String>,
pub encrypted: Option<bool>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub iam_database_authentication_enabled: Option<bool>,
pub instance_create_time: Option<String>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub license_model: Option<String>,
pub master_username: Option<String>,
pub option_group_name: Option<String>,
pub percent_progress: Option<i64>,
pub port: Option<i64>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub snapshot_create_time: Option<String>,
pub snapshot_type: Option<String>,
pub source_db_snapshot_identifier: Option<String>,
pub source_region: Option<String>,
pub status: Option<String>,
pub storage_type: Option<String>,
pub tde_credential_arn: Option<String>,
pub timezone: Option<String>,
pub vpc_id: Option<String>,
}
struct DBSnapshotDeserializer;
impl DBSnapshotDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSnapshot, XmlParseError> {
deserialize_elements::<_, DBSnapshot, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllocatedStorage" => {
obj.allocated_storage =
Some(IntegerDeserializer::deserialize("AllocatedStorage", stack)?);
}
"AvailabilityZone" => {
obj.availability_zone =
Some(StringDeserializer::deserialize("AvailabilityZone", stack)?);
}
"DBInstanceIdentifier" => {
obj.db_instance_identifier = Some(StringDeserializer::deserialize(
"DBInstanceIdentifier",
stack,
)?);
}
"DBSnapshotArn" => {
obj.db_snapshot_arn =
Some(StringDeserializer::deserialize("DBSnapshotArn", stack)?);
}
"DBSnapshotIdentifier" => {
obj.db_snapshot_identifier = Some(StringDeserializer::deserialize(
"DBSnapshotIdentifier",
stack,
)?);
}
"DbiResourceId" => {
obj.dbi_resource_id =
Some(StringDeserializer::deserialize("DbiResourceId", stack)?);
}
"Encrypted" => {
obj.encrypted = Some(BooleanDeserializer::deserialize("Encrypted", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"IAMDatabaseAuthenticationEnabled" => {
obj.iam_database_authentication_enabled =
Some(BooleanDeserializer::deserialize(
"IAMDatabaseAuthenticationEnabled",
stack,
)?);
}
"InstanceCreateTime" => {
obj.instance_create_time = Some(TStampDeserializer::deserialize(
"InstanceCreateTime",
stack,
)?);
}
"Iops" => {
obj.iops = Some(IntegerOptionalDeserializer::deserialize("Iops", stack)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MasterUsername" => {
obj.master_username =
Some(StringDeserializer::deserialize("MasterUsername", stack)?);
}
"OptionGroupName" => {
obj.option_group_name =
Some(StringDeserializer::deserialize("OptionGroupName", stack)?);
}
"PercentProgress" => {
obj.percent_progress =
Some(IntegerDeserializer::deserialize("PercentProgress", stack)?);
}
"Port" => {
obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
}
"ProcessorFeatures" => {
obj.processor_features.get_or_insert(vec![]).extend(
ProcessorFeatureListDeserializer::deserialize("ProcessorFeatures", stack)?,
);
}
"SnapshotCreateTime" => {
obj.snapshot_create_time = Some(TStampDeserializer::deserialize(
"SnapshotCreateTime",
stack,
)?);
}
"SnapshotType" => {
obj.snapshot_type =
Some(StringDeserializer::deserialize("SnapshotType", stack)?);
}
"SourceDBSnapshotIdentifier" => {
obj.source_db_snapshot_identifier = Some(StringDeserializer::deserialize(
"SourceDBSnapshotIdentifier",
stack,
)?);
}
"SourceRegion" => {
obj.source_region =
Some(StringDeserializer::deserialize("SourceRegion", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StorageType" => {
obj.storage_type = Some(StringDeserializer::deserialize("StorageType", stack)?);
}
"TdeCredentialArn" => {
obj.tde_credential_arn =
Some(StringDeserializer::deserialize("TdeCredentialArn", stack)?);
}
"Timezone" => {
obj.timezone = Some(StringDeserializer::deserialize("Timezone", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSnapshotAttribute {
pub attribute_name: Option<String>,
pub attribute_values: Option<Vec<String>>,
}
struct DBSnapshotAttributeDeserializer;
impl DBSnapshotAttributeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSnapshotAttribute, XmlParseError> {
deserialize_elements::<_, DBSnapshotAttribute, _>(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 DBSnapshotAttributeListDeserializer;
impl DBSnapshotAttributeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBSnapshotAttribute>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBSnapshotAttribute" {
obj.push(DBSnapshotAttributeDeserializer::deserialize(
"DBSnapshotAttribute",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSnapshotAttributesResult {
pub db_snapshot_attributes: Option<Vec<DBSnapshotAttribute>>,
pub db_snapshot_identifier: Option<String>,
}
struct DBSnapshotAttributesResultDeserializer;
impl DBSnapshotAttributesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSnapshotAttributesResult, XmlParseError> {
deserialize_elements::<_, DBSnapshotAttributesResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSnapshotAttributes" => {
obj.db_snapshot_attributes.get_or_insert(vec![]).extend(
DBSnapshotAttributeListDeserializer::deserialize(
"DBSnapshotAttributes",
stack,
)?,
);
}
"DBSnapshotIdentifier" => {
obj.db_snapshot_identifier = Some(StringDeserializer::deserialize(
"DBSnapshotIdentifier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DBSnapshotListDeserializer;
impl DBSnapshotListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DBSnapshot>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DBSnapshot" {
obj.push(DBSnapshotDeserializer::deserialize("DBSnapshot", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DBSnapshotMessage {
pub db_snapshots: Option<Vec<DBSnapshot>>,
pub marker: Option<String>,
}
struct DBSnapshotMessageDeserializer;
impl DBSnapshotMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DBSnapshotMessage, XmlParseError> {
deserialize_elements::<_, DBSnapshotMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSnapshots" => {
obj.db_snapshots.get_or_insert(vec![]).extend(
DBSnapshotListDeserializer::deserialize("DBSnapshots", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => 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 DeleteDBClusterEndpointMessage {
pub db_cluster_endpoint_identifier: String,
}
struct DeleteDBClusterEndpointMessageSerializer;
impl DeleteDBClusterEndpointMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBClusterEndpointMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterEndpointIdentifier"),
&obj.db_cluster_endpoint_identifier,
);
}
}
#[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 DeleteDBInstanceAutomatedBackupMessage {
pub dbi_resource_id: String,
}
struct DeleteDBInstanceAutomatedBackupMessageSerializer;
impl DeleteDBInstanceAutomatedBackupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBInstanceAutomatedBackupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DbiResourceId"),
&obj.dbi_resource_id,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBInstanceAutomatedBackupResult {
pub db_instance_automated_backup: Option<DBInstanceAutomatedBackup>,
}
struct DeleteDBInstanceAutomatedBackupResultDeserializer;
impl DeleteDBInstanceAutomatedBackupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteDBInstanceAutomatedBackupResult, XmlParseError> {
deserialize_elements::<_, DeleteDBInstanceAutomatedBackupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBInstanceAutomatedBackup" => {
obj.db_instance_automated_backup =
Some(DBInstanceAutomatedBackupDeserializer::deserialize(
"DBInstanceAutomatedBackup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBInstanceMessage {
pub db_instance_identifier: String,
pub delete_automated_backups: Option<bool>,
pub final_db_snapshot_identifier: Option<String>,
pub skip_final_snapshot: Option<bool>,
}
struct DeleteDBInstanceMessageSerializer;
impl DeleteDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.delete_automated_backups {
params.put(
&format!("{}{}", prefix, "DeleteAutomatedBackups"),
&field_value,
);
}
if let Some(ref field_value) = obj.final_db_snapshot_identifier {
params.put(
&format!("{}{}", prefix, "FinalDBSnapshotIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.skip_final_snapshot {
params.put(&format!("{}{}", prefix, "SkipFinalSnapshot"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct DeleteDBInstanceResultDeserializer;
impl DeleteDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteDBInstanceResult, XmlParseError> {
deserialize_elements::<_, DeleteDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBParameterGroupMessage {
pub db_parameter_group_name: String,
}
struct DeleteDBParameterGroupMessageSerializer;
impl DeleteDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBSecurityGroupMessage {
pub db_security_group_name: String,
}
struct DeleteDBSecurityGroupMessageSerializer;
impl DeleteDBSecurityGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBSecurityGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSecurityGroupName"),
&obj.db_security_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBSnapshotMessage {
pub db_snapshot_identifier: String,
}
struct DeleteDBSnapshotMessageSerializer;
impl DeleteDBSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteDBSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&obj.db_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteDBSnapshotResult {
pub db_snapshot: Option<DBSnapshot>,
}
struct DeleteDBSnapshotResultDeserializer;
impl DeleteDBSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteDBSnapshotResult, XmlParseError> {
deserialize_elements::<_, DeleteDBSnapshotResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSnapshot" => {
obj.db_snapshot =
Some(DBSnapshotDeserializer::deserialize("DBSnapshot", 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 DeleteEventSubscriptionMessage {
pub subscription_name: String,
}
struct DeleteEventSubscriptionMessageSerializer;
impl DeleteEventSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteEventSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteEventSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct DeleteEventSubscriptionResultDeserializer;
impl DeleteEventSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteEventSubscriptionResult, XmlParseError> {
deserialize_elements::<_, DeleteEventSubscriptionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscription" => {
obj.event_subscription = Some(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteGlobalClusterMessage {
pub global_cluster_identifier: String,
}
struct DeleteGlobalClusterMessageSerializer;
impl DeleteGlobalClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteGlobalClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "GlobalClusterIdentifier"),
&obj.global_cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteGlobalClusterResult {
pub global_cluster: Option<GlobalCluster>,
}
struct DeleteGlobalClusterResultDeserializer;
impl DeleteGlobalClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteGlobalClusterResult, XmlParseError> {
deserialize_elements::<_, DeleteGlobalClusterResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"GlobalCluster" => {
obj.global_cluster = Some(GlobalClusterDeserializer::deserialize(
"GlobalCluster",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteOptionGroupMessage {
pub option_group_name: String,
}
struct DeleteOptionGroupMessageSerializer;
impl DeleteOptionGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DeleteOptionGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "OptionGroupName"),
&obj.option_group_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeAccountAttributesMessage {}
struct DescribeAccountAttributesMessageSerializer;
impl DescribeAccountAttributesMessageSerializer {
fn serialize(_params: &mut Params, name: &str, _obj: &DescribeAccountAttributesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeCertificatesMessage {
pub certificate_identifier: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeCertificatesMessageSerializer;
impl DescribeCertificatesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeCertificatesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.certificate_identifier {
params.put(
&format!("{}{}", prefix, "CertificateIdentifier"),
&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 DescribeDBClusterBacktracksMessage {
pub backtrack_identifier: Option<String>,
pub db_cluster_identifier: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBClusterBacktracksMessageSerializer;
impl DescribeDBClusterBacktracksMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBClusterBacktracksMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.backtrack_identifier {
params.put(
&format!("{}{}", prefix, "BacktrackIdentifier"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
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 DescribeDBClusterEndpointsMessage {
pub db_cluster_endpoint_identifier: Option<String>,
pub db_cluster_identifier: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBClusterEndpointsMessageSerializer;
impl DescribeDBClusterEndpointsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBClusterEndpointsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_cluster_endpoint_identifier {
params.put(
&format!("{}{}", prefix, "DBClusterEndpointIdentifier"),
&field_value,
);
}
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 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 include_all: Option<bool>,
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.include_all {
params.put(&format!("{}{}", prefix, "IncludeAll"), &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 DescribeDBInstanceAutomatedBackupsMessage {
pub db_instance_identifier: Option<String>,
pub dbi_resource_id: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBInstanceAutomatedBackupsMessageSerializer;
impl DescribeDBInstanceAutomatedBackupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBInstanceAutomatedBackupsMessage) {
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.dbi_resource_id {
params.put(&format!("{}{}", prefix, "DbiResourceId"), &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 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 DescribeDBLogFilesDetails {
pub last_written: Option<i64>,
pub log_file_name: Option<String>,
pub size: Option<i64>,
}
struct DescribeDBLogFilesDetailsDeserializer;
impl DescribeDBLogFilesDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeDBLogFilesDetails, XmlParseError> {
deserialize_elements::<_, DescribeDBLogFilesDetails, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"LastWritten" => {
obj.last_written =
Some(LongDeserializer::deserialize("LastWritten", stack)?);
}
"LogFileName" => {
obj.log_file_name =
Some(StringDeserializer::deserialize("LogFileName", stack)?);
}
"Size" => {
obj.size = Some(LongDeserializer::deserialize("Size", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DescribeDBLogFilesListDeserializer;
impl DescribeDBLogFilesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DescribeDBLogFilesDetails>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DescribeDBLogFilesDetails" {
obj.push(DescribeDBLogFilesDetailsDeserializer::deserialize(
"DescribeDBLogFilesDetails",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBLogFilesMessage {
pub db_instance_identifier: String,
pub file_last_written: Option<i64>,
pub file_size: Option<i64>,
pub filename_contains: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBLogFilesMessageSerializer;
impl DescribeDBLogFilesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBLogFilesMessage) {
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.file_last_written {
params.put(&format!("{}{}", prefix, "FileLastWritten"), &field_value);
}
if let Some(ref field_value) = obj.file_size {
params.put(&format!("{}{}", prefix, "FileSize"), &field_value);
}
if let Some(ref field_value) = obj.filename_contains {
params.put(&format!("{}{}", prefix, "FilenameContains"), &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 DescribeDBLogFilesResponse {
pub describe_db_log_files: Option<Vec<DescribeDBLogFilesDetails>>,
pub marker: Option<String>,
}
struct DescribeDBLogFilesResponseDeserializer;
impl DescribeDBLogFilesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeDBLogFilesResponse, XmlParseError> {
deserialize_elements::<_, DescribeDBLogFilesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DescribeDBLogFiles" => {
obj.describe_db_log_files.get_or_insert(vec![]).extend(
DescribeDBLogFilesListDeserializer::deserialize(
"DescribeDBLogFiles",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBParameterGroupsMessage {
pub db_parameter_group_name: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBParameterGroupsMessageSerializer;
impl DescribeDBParameterGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBParameterGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBParametersMessage {
pub db_parameter_group_name: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub source: Option<String>,
}
struct DescribeDBParametersMessageSerializer;
impl DescribeDBParametersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBParametersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.source {
params.put(&format!("{}{}", prefix, "Source"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBSecurityGroupsMessage {
pub db_security_group_name: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBSecurityGroupsMessageSerializer;
impl DescribeDBSecurityGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBSecurityGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_security_group_name {
params.put(
&format!("{}{}", prefix, "DBSecurityGroupName"),
&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 DescribeDBSnapshotAttributesMessage {
pub db_snapshot_identifier: String,
}
struct DescribeDBSnapshotAttributesMessageSerializer;
impl DescribeDBSnapshotAttributesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBSnapshotAttributesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&obj.db_snapshot_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBSnapshotAttributesResult {
pub db_snapshot_attributes_result: Option<DBSnapshotAttributesResult>,
}
struct DescribeDBSnapshotAttributesResultDeserializer;
impl DescribeDBSnapshotAttributesResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeDBSnapshotAttributesResult, XmlParseError> {
deserialize_elements::<_, DescribeDBSnapshotAttributesResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSnapshotAttributesResult" => {
obj.db_snapshot_attributes_result =
Some(DBSnapshotAttributesResultDeserializer::deserialize(
"DBSnapshotAttributesResult",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeDBSnapshotsMessage {
pub db_instance_identifier: Option<String>,
pub db_snapshot_identifier: Option<String>,
pub dbi_resource_id: 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 DescribeDBSnapshotsMessageSerializer;
impl DescribeDBSnapshotsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBSnapshotsMessage) {
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.db_snapshot_identifier {
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.dbi_resource_id {
params.put(&format!("{}{}", prefix, "DbiResourceId"), &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 DescribeDBSubnetGroupsMessage {
pub db_subnet_group_name: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeDBSubnetGroupsMessageSerializer;
impl DescribeDBSubnetGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeDBSubnetGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEngineDefaultClusterParametersMessage {
pub db_parameter_group_family: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeEngineDefaultClusterParametersMessageSerializer;
impl DescribeEngineDefaultClusterParametersMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DescribeEngineDefaultClusterParametersMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEngineDefaultClusterParametersResult {
pub engine_defaults: Option<EngineDefaults>,
}
struct DescribeEngineDefaultClusterParametersResultDeserializer;
impl DescribeEngineDefaultClusterParametersResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEngineDefaultClusterParametersResult, XmlParseError> {
deserialize_elements::<_, DescribeEngineDefaultClusterParametersResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EngineDefaults" => {
obj.engine_defaults = Some(EngineDefaultsDeserializer::deserialize(
"EngineDefaults",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEngineDefaultParametersMessage {
pub db_parameter_group_family: String,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeEngineDefaultParametersMessageSerializer;
impl DescribeEngineDefaultParametersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEngineDefaultParametersMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupFamily"),
&obj.db_parameter_group_family,
);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEngineDefaultParametersResult {
pub engine_defaults: Option<EngineDefaults>,
}
struct DescribeEngineDefaultParametersResultDeserializer;
impl DescribeEngineDefaultParametersResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeEngineDefaultParametersResult, XmlParseError> {
deserialize_elements::<_, DescribeEngineDefaultParametersResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EngineDefaults" => {
obj.engine_defaults = Some(EngineDefaultsDeserializer::deserialize(
"EngineDefaults",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventCategoriesMessage {
pub filters: Option<Vec<Filter>>,
pub source_type: Option<String>,
}
struct DescribeEventCategoriesMessageSerializer;
impl DescribeEventCategoriesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEventCategoriesMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventSubscriptionsMessage {
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub subscription_name: Option<String>,
}
struct DescribeEventSubscriptionsMessageSerializer;
impl DescribeEventSubscriptionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEventSubscriptionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.subscription_name {
params.put(&format!("{}{}", prefix, "SubscriptionName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeEventsMessage {
pub duration: Option<i64>,
pub end_time: Option<String>,
pub event_categories: Option<Vec<String>>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub source_identifier: Option<String>,
pub source_type: Option<String>,
pub start_time: Option<String>,
}
struct DescribeEventsMessageSerializer;
impl DescribeEventsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeEventsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.duration {
params.put(&format!("{}{}", prefix, "Duration"), &field_value);
}
if let Some(ref field_value) = obj.end_time {
params.put(&format!("{}{}", prefix, "EndTime"), &field_value);
}
if let Some(ref field_value) = obj.event_categories {
EventCategoriesListSerializer::serialize(
params,
&format!("{}{}", prefix, "EventCategory"),
field_value,
);
}
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.max_records {
params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
}
if let Some(ref field_value) = obj.source_identifier {
params.put(&format!("{}{}", prefix, "SourceIdentifier"), &field_value);
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
if let Some(ref field_value) = obj.start_time {
params.put(&format!("{}{}", prefix, "StartTime"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeGlobalClustersMessage {
pub filters: Option<Vec<Filter>>,
pub global_cluster_identifier: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeGlobalClustersMessageSerializer;
impl DescribeGlobalClustersMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeGlobalClustersMessage) {
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.global_cluster_identifier {
params.put(
&format!("{}{}", prefix, "GlobalClusterIdentifier"),
&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 DescribeOptionGroupOptionsMessage {
pub engine_name: String,
pub filters: Option<Vec<Filter>>,
pub major_engine_version: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
}
struct DescribeOptionGroupOptionsMessageSerializer;
impl DescribeOptionGroupOptionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeOptionGroupOptionsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "EngineName"), &obj.engine_name);
if let Some(ref field_value) = obj.filters {
FilterListSerializer::serialize(
params,
&format!("{}{}", prefix, "Filter"),
field_value,
);
}
if let Some(ref field_value) = obj.major_engine_version {
params.put(&format!("{}{}", prefix, "MajorEngineVersion"), &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 DescribeOptionGroupsMessage {
pub engine_name: Option<String>,
pub filters: Option<Vec<Filter>>,
pub major_engine_version: Option<String>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub option_group_name: Option<String>,
}
struct DescribeOptionGroupsMessageSerializer;
impl DescribeOptionGroupsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeOptionGroupsMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.engine_name {
params.put(&format!("{}{}", prefix, "EngineName"), &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.major_engine_version {
params.put(&format!("{}{}", prefix, "MajorEngineVersion"), &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.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &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 DescribeReservedDBInstancesMessage {
pub db_instance_class: Option<String>,
pub duration: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub multi_az: Option<bool>,
pub offering_type: Option<String>,
pub product_description: Option<String>,
pub reserved_db_instance_id: Option<String>,
pub reserved_db_instances_offering_id: Option<String>,
}
struct DescribeReservedDBInstancesMessageSerializer;
impl DescribeReservedDBInstancesMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeReservedDBInstancesMessage) {
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);
}
if let Some(ref field_value) = obj.duration {
params.put(&format!("{}{}", prefix, "Duration"), &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.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.offering_type {
params.put(&format!("{}{}", prefix, "OfferingType"), &field_value);
}
if let Some(ref field_value) = obj.product_description {
params.put(&format!("{}{}", prefix, "ProductDescription"), &field_value);
}
if let Some(ref field_value) = obj.reserved_db_instance_id {
params.put(
&format!("{}{}", prefix, "ReservedDBInstanceId"),
&field_value,
);
}
if let Some(ref field_value) = obj.reserved_db_instances_offering_id {
params.put(
&format!("{}{}", prefix, "ReservedDBInstancesOfferingId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeReservedDBInstancesOfferingsMessage {
pub db_instance_class: Option<String>,
pub duration: Option<String>,
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub multi_az: Option<bool>,
pub offering_type: Option<String>,
pub product_description: Option<String>,
pub reserved_db_instances_offering_id: Option<String>,
}
struct DescribeReservedDBInstancesOfferingsMessageSerializer;
impl DescribeReservedDBInstancesOfferingsMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DescribeReservedDBInstancesOfferingsMessage,
) {
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);
}
if let Some(ref field_value) = obj.duration {
params.put(&format!("{}{}", prefix, "Duration"), &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.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.offering_type {
params.put(&format!("{}{}", prefix, "OfferingType"), &field_value);
}
if let Some(ref field_value) = obj.product_description {
params.put(&format!("{}{}", prefix, "ProductDescription"), &field_value);
}
if let Some(ref field_value) = obj.reserved_db_instances_offering_id {
params.put(
&format!("{}{}", prefix, "ReservedDBInstancesOfferingId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeSourceRegionsMessage {
pub filters: Option<Vec<Filter>>,
pub marker: Option<String>,
pub max_records: Option<i64>,
pub region_name: Option<String>,
}
struct DescribeSourceRegionsMessageSerializer;
impl DescribeSourceRegionsMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DescribeSourceRegionsMessage) {
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.region_name {
params.put(&format!("{}{}", prefix, "RegionName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeValidDBInstanceModificationsMessage {
pub db_instance_identifier: String,
}
struct DescribeValidDBInstanceModificationsMessageSerializer;
impl DescribeValidDBInstanceModificationsMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &DescribeValidDBInstanceModificationsMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DescribeValidDBInstanceModificationsResult {
pub valid_db_instance_modifications_message: Option<ValidDBInstanceModificationsMessage>,
}
struct DescribeValidDBInstanceModificationsResultDeserializer;
impl DescribeValidDBInstanceModificationsResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DescribeValidDBInstanceModificationsResult, XmlParseError> {
deserialize_elements::<_, DescribeValidDBInstanceModificationsResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ValidDBInstanceModificationsMessage" => {
obj.valid_db_instance_modifications_message = Some(
ValidDBInstanceModificationsMessageDeserializer::deserialize(
"ValidDBInstanceModificationsMessage",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DomainMembership {
pub domain: Option<String>,
pub fqdn: Option<String>,
pub iam_role_name: Option<String>,
pub status: Option<String>,
}
struct DomainMembershipDeserializer;
impl DomainMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DomainMembership, XmlParseError> {
deserialize_elements::<_, DomainMembership, _>(tag_name, stack, |name, stack, obj| {
match name {
"Domain" => {
obj.domain = Some(StringDeserializer::deserialize("Domain", stack)?);
}
"FQDN" => {
obj.fqdn = Some(StringDeserializer::deserialize("FQDN", stack)?);
}
"IAMRoleName" => {
obj.iam_role_name =
Some(StringDeserializer::deserialize("IAMRoleName", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DomainMembershipListDeserializer;
impl DomainMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DomainMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DomainMembership" {
obj.push(DomainMembershipDeserializer::deserialize(
"DomainMembership",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct DoubleDeserializer;
impl DoubleDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DoubleOptionalDeserializer;
impl DoubleOptionalDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DoubleRange {
pub from: Option<f64>,
pub to: Option<f64>,
}
struct DoubleRangeDeserializer;
impl DoubleRangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DoubleRange, XmlParseError> {
deserialize_elements::<_, DoubleRange, _>(tag_name, stack, |name, stack, obj| {
match name {
"From" => {
obj.from = Some(DoubleDeserializer::deserialize("From", stack)?);
}
"To" => {
obj.to = Some(DoubleDeserializer::deserialize("To", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DoubleRangeListDeserializer;
impl DoubleRangeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DoubleRange>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DoubleRange" {
obj.push(DoubleRangeDeserializer::deserialize("DoubleRange", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DownloadDBLogFilePortionDetails {
pub additional_data_pending: Option<bool>,
pub log_file_data: Option<String>,
pub marker: Option<String>,
}
struct DownloadDBLogFilePortionDetailsDeserializer;
impl DownloadDBLogFilePortionDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DownloadDBLogFilePortionDetails, XmlParseError> {
deserialize_elements::<_, DownloadDBLogFilePortionDetails, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AdditionalDataPending" => {
obj.additional_data_pending = Some(BooleanDeserializer::deserialize(
"AdditionalDataPending",
stack,
)?);
}
"LogFileData" => {
obj.log_file_data =
Some(StringDeserializer::deserialize("LogFileData", stack)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DownloadDBLogFilePortionMessage {
pub db_instance_identifier: String,
pub log_file_name: String,
pub marker: Option<String>,
pub number_of_lines: Option<i64>,
}
struct DownloadDBLogFilePortionMessageSerializer;
impl DownloadDBLogFilePortionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &DownloadDBLogFilePortionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
params.put(&format!("{}{}", prefix, "LogFileName"), &obj.log_file_name);
if let Some(ref field_value) = obj.marker {
params.put(&format!("{}{}", prefix, "Marker"), &field_value);
}
if let Some(ref field_value) = obj.number_of_lines {
params.put(&format!("{}{}", prefix, "NumberOfLines"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EC2SecurityGroup {
pub ec2_security_group_id: Option<String>,
pub ec2_security_group_name: Option<String>,
pub ec2_security_group_owner_id: Option<String>,
pub status: Option<String>,
}
struct EC2SecurityGroupDeserializer;
impl EC2SecurityGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EC2SecurityGroup, XmlParseError> {
deserialize_elements::<_, EC2SecurityGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"EC2SecurityGroupId" => {
obj.ec2_security_group_id = Some(StringDeserializer::deserialize(
"EC2SecurityGroupId",
stack,
)?);
}
"EC2SecurityGroupName" => {
obj.ec2_security_group_name = Some(StringDeserializer::deserialize(
"EC2SecurityGroupName",
stack,
)?);
}
"EC2SecurityGroupOwnerId" => {
obj.ec2_security_group_owner_id = Some(StringDeserializer::deserialize(
"EC2SecurityGroupOwnerId",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EC2SecurityGroupListDeserializer;
impl EC2SecurityGroupListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EC2SecurityGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EC2SecurityGroup" {
obj.push(EC2SecurityGroupDeserializer::deserialize(
"EC2SecurityGroup",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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(())
})
}
}
struct EngineModeListDeserializer;
impl EngineModeListDeserializer {
#[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 EngineModeListSerializer;
impl EngineModeListSerializer {
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 Event {
pub date: Option<String>,
pub event_categories: Option<Vec<String>>,
pub message: Option<String>,
pub source_arn: Option<String>,
pub source_identifier: Option<String>,
pub source_type: Option<String>,
}
struct EventDeserializer;
impl EventDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Event, XmlParseError> {
deserialize_elements::<_, Event, _>(tag_name, stack, |name, stack, obj| {
match name {
"Date" => {
obj.date = Some(TStampDeserializer::deserialize("Date", stack)?);
}
"EventCategories" => {
obj.event_categories.get_or_insert(vec![]).extend(
EventCategoriesListDeserializer::deserialize("EventCategories", stack)?,
);
}
"Message" => {
obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
}
"SourceArn" => {
obj.source_arn = Some(StringDeserializer::deserialize("SourceArn", stack)?);
}
"SourceIdentifier" => {
obj.source_identifier =
Some(StringDeserializer::deserialize("SourceIdentifier", stack)?);
}
"SourceType" => {
obj.source_type =
Some(SourceTypeDeserializer::deserialize("SourceType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventCategoriesListDeserializer;
impl EventCategoriesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EventCategory" {
obj.push(StringDeserializer::deserialize("EventCategory", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct EventCategoriesListSerializer;
impl EventCategoriesListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventCategoriesMap {
pub event_categories: Option<Vec<String>>,
pub source_type: Option<String>,
}
struct EventCategoriesMapDeserializer;
impl EventCategoriesMapDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventCategoriesMap, XmlParseError> {
deserialize_elements::<_, EventCategoriesMap, _>(tag_name, stack, |name, stack, obj| {
match name {
"EventCategories" => {
obj.event_categories.get_or_insert(vec![]).extend(
EventCategoriesListDeserializer::deserialize("EventCategories", stack)?,
);
}
"SourceType" => {
obj.source_type = Some(StringDeserializer::deserialize("SourceType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventCategoriesMapListDeserializer;
impl EventCategoriesMapListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventCategoriesMap>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EventCategoriesMap" {
obj.push(EventCategoriesMapDeserializer::deserialize(
"EventCategoriesMap",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventCategoriesMessage {
pub event_categories_map_list: Option<Vec<EventCategoriesMap>>,
}
struct EventCategoriesMessageDeserializer;
impl EventCategoriesMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventCategoriesMessage, XmlParseError> {
deserialize_elements::<_, EventCategoriesMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"EventCategoriesMapList" => {
obj.event_categories_map_list.get_or_insert(vec![]).extend(
EventCategoriesMapListDeserializer::deserialize(
"EventCategoriesMapList",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventListDeserializer;
impl EventListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Event>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Event" {
obj.push(EventDeserializer::deserialize("Event", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventSubscription {
pub cust_subscription_id: Option<String>,
pub customer_aws_id: Option<String>,
pub enabled: Option<bool>,
pub event_categories_list: Option<Vec<String>>,
pub event_subscription_arn: Option<String>,
pub sns_topic_arn: Option<String>,
pub source_ids_list: Option<Vec<String>>,
pub source_type: Option<String>,
pub status: Option<String>,
pub subscription_creation_time: Option<String>,
}
struct EventSubscriptionDeserializer;
impl EventSubscriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventSubscription, XmlParseError> {
deserialize_elements::<_, EventSubscription, _>(tag_name, stack, |name, stack, obj| {
match name {
"CustSubscriptionId" => {
obj.cust_subscription_id = Some(StringDeserializer::deserialize(
"CustSubscriptionId",
stack,
)?);
}
"CustomerAwsId" => {
obj.customer_aws_id =
Some(StringDeserializer::deserialize("CustomerAwsId", stack)?);
}
"Enabled" => {
obj.enabled = Some(BooleanDeserializer::deserialize("Enabled", stack)?);
}
"EventCategoriesList" => {
obj.event_categories_list.get_or_insert(vec![]).extend(
EventCategoriesListDeserializer::deserialize("EventCategoriesList", stack)?,
);
}
"EventSubscriptionArn" => {
obj.event_subscription_arn = Some(StringDeserializer::deserialize(
"EventSubscriptionArn",
stack,
)?);
}
"SnsTopicArn" => {
obj.sns_topic_arn =
Some(StringDeserializer::deserialize("SnsTopicArn", stack)?);
}
"SourceIdsList" => {
obj.source_ids_list.get_or_insert(vec![]).extend(
SourceIdsListDeserializer::deserialize("SourceIdsList", stack)?,
);
}
"SourceType" => {
obj.source_type = Some(StringDeserializer::deserialize("SourceType", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"SubscriptionCreationTime" => {
obj.subscription_creation_time = Some(StringDeserializer::deserialize(
"SubscriptionCreationTime",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct EventSubscriptionsListDeserializer;
impl EventSubscriptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<EventSubscription>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "EventSubscription" {
obj.push(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventSubscriptionsMessage {
pub event_subscriptions_list: Option<Vec<EventSubscription>>,
pub marker: Option<String>,
}
struct EventSubscriptionsMessageDeserializer;
impl EventSubscriptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventSubscriptionsMessage, XmlParseError> {
deserialize_elements::<_, EventSubscriptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscriptionsList" => {
obj.event_subscriptions_list.get_or_insert(vec![]).extend(
EventSubscriptionsListDeserializer::deserialize(
"EventSubscriptionsList",
stack,
)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct EventsMessage {
pub events: Option<Vec<Event>>,
pub marker: Option<String>,
}
struct EventsMessageDeserializer;
impl EventsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<EventsMessage, XmlParseError> {
deserialize_elements::<_, EventsMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Events" => {
obj.events
.get_or_insert(vec![])
.extend(EventListDeserializer::deserialize("Events", stack)?);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct FailoverDBClusterMessage {
pub db_cluster_identifier: 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(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
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(())
},
)
}
}
struct FeatureNameListDeserializer;
impl FeatureNameListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StringDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GlobalCluster {
pub database_name: Option<String>,
pub deletion_protection: Option<bool>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub global_cluster_arn: Option<String>,
pub global_cluster_identifier: Option<String>,
pub global_cluster_members: Option<Vec<GlobalClusterMember>>,
pub global_cluster_resource_id: Option<String>,
pub status: Option<String>,
pub storage_encrypted: Option<bool>,
}
struct GlobalClusterDeserializer;
impl GlobalClusterDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GlobalCluster, XmlParseError> {
deserialize_elements::<_, GlobalCluster, _>(tag_name, stack, |name, stack, obj| {
match name {
"DatabaseName" => {
obj.database_name =
Some(StringDeserializer::deserialize("DatabaseName", stack)?);
}
"DeletionProtection" => {
obj.deletion_protection = Some(BooleanOptionalDeserializer::deserialize(
"DeletionProtection",
stack,
)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"GlobalClusterArn" => {
obj.global_cluster_arn =
Some(StringDeserializer::deserialize("GlobalClusterArn", stack)?);
}
"GlobalClusterIdentifier" => {
obj.global_cluster_identifier = Some(StringDeserializer::deserialize(
"GlobalClusterIdentifier",
stack,
)?);
}
"GlobalClusterMembers" => {
obj.global_cluster_members.get_or_insert(vec![]).extend(
GlobalClusterMemberListDeserializer::deserialize(
"GlobalClusterMembers",
stack,
)?,
);
}
"GlobalClusterResourceId" => {
obj.global_cluster_resource_id = Some(StringDeserializer::deserialize(
"GlobalClusterResourceId",
stack,
)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"StorageEncrypted" => {
obj.storage_encrypted = Some(BooleanOptionalDeserializer::deserialize(
"StorageEncrypted",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct GlobalClusterListDeserializer;
impl GlobalClusterListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<GlobalCluster>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "GlobalClusterMember" {
obj.push(GlobalClusterDeserializer::deserialize(
"GlobalClusterMember",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GlobalClusterMember {
pub db_cluster_arn: Option<String>,
pub is_writer: Option<bool>,
pub readers: Option<Vec<String>>,
}
struct GlobalClusterMemberDeserializer;
impl GlobalClusterMemberDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GlobalClusterMember, XmlParseError> {
deserialize_elements::<_, GlobalClusterMember, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBClusterArn" => {
obj.db_cluster_arn =
Some(StringDeserializer::deserialize("DBClusterArn", stack)?);
}
"IsWriter" => {
obj.is_writer = Some(BooleanDeserializer::deserialize("IsWriter", stack)?);
}
"Readers" => {
obj.readers
.get_or_insert(vec![])
.extend(ReadersArnListDeserializer::deserialize("Readers", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct GlobalClusterMemberListDeserializer;
impl GlobalClusterMemberListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<GlobalClusterMember>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "GlobalClusterMember" {
obj.push(GlobalClusterMemberDeserializer::deserialize(
"GlobalClusterMember",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GlobalClustersMessage {
pub global_clusters: Option<Vec<GlobalCluster>>,
pub marker: Option<String>,
}
struct GlobalClustersMessageDeserializer;
impl GlobalClustersMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GlobalClustersMessage, XmlParseError> {
deserialize_elements::<_, GlobalClustersMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"GlobalClusters" => {
obj.global_clusters.get_or_insert(vec![]).extend(
GlobalClusterListDeserializer::deserialize("GlobalClusters", stack)?,
);
}
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct IPRange {
pub cidrip: Option<String>,
pub status: Option<String>,
}
struct IPRangeDeserializer;
impl IPRangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<IPRange, XmlParseError> {
deserialize_elements::<_, IPRange, _>(tag_name, stack, |name, stack, obj| {
match name {
"CIDRIP" => {
obj.cidrip = Some(StringDeserializer::deserialize("CIDRIP", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct IPRangeListDeserializer;
impl IPRangeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<IPRange>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "IPRange" {
obj.push(IPRangeDeserializer::deserialize("IPRange", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct 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);
}
}
}
struct LongDeserializer;
impl LongDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct LongOptionalDeserializer;
impl LongOptionalDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct MinimumEngineVersionPerAllowedValue {
pub allowed_value: Option<String>,
pub minimum_engine_version: Option<String>,
}
struct MinimumEngineVersionPerAllowedValueDeserializer;
impl MinimumEngineVersionPerAllowedValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<MinimumEngineVersionPerAllowedValue, XmlParseError> {
deserialize_elements::<_, MinimumEngineVersionPerAllowedValue, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AllowedValue" => {
obj.allowed_value =
Some(StringDeserializer::deserialize("AllowedValue", stack)?);
}
"MinimumEngineVersion" => {
obj.minimum_engine_version = Some(StringDeserializer::deserialize(
"MinimumEngineVersion",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct MinimumEngineVersionPerAllowedValueListDeserializer;
impl MinimumEngineVersionPerAllowedValueListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<MinimumEngineVersionPerAllowedValue>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "MinimumEngineVersionPerAllowedValue" {
obj.push(
MinimumEngineVersionPerAllowedValueDeserializer::deserialize(
"MinimumEngineVersionPerAllowedValue",
stack,
)?,
);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyCurrentDBClusterCapacityMessage {
pub capacity: Option<i64>,
pub db_cluster_identifier: String,
pub seconds_before_timeout: Option<i64>,
pub timeout_action: Option<String>,
}
struct ModifyCurrentDBClusterCapacityMessageSerializer;
impl ModifyCurrentDBClusterCapacityMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyCurrentDBClusterCapacityMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.capacity {
params.put(&format!("{}{}", prefix, "Capacity"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.seconds_before_timeout {
params.put(
&format!("{}{}", prefix, "SecondsBeforeTimeout"),
&field_value,
);
}
if let Some(ref field_value) = obj.timeout_action {
params.put(&format!("{}{}", prefix, "TimeoutAction"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterEndpointMessage {
pub db_cluster_endpoint_identifier: String,
pub endpoint_type: Option<String>,
pub excluded_members: Option<Vec<String>>,
pub static_members: Option<Vec<String>>,
}
struct ModifyDBClusterEndpointMessageSerializer;
impl ModifyDBClusterEndpointMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBClusterEndpointMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterEndpointIdentifier"),
&obj.db_cluster_endpoint_identifier,
);
if let Some(ref field_value) = obj.endpoint_type {
params.put(&format!("{}{}", prefix, "EndpointType"), &field_value);
}
if let Some(ref field_value) = obj.excluded_members {
StringListSerializer::serialize(
params,
&format!("{}{}", prefix, "ExcludedMembers"),
field_value,
);
}
if let Some(ref field_value) = obj.static_members {
StringListSerializer::serialize(
params,
&format!("{}{}", prefix, "StaticMembers"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterMessage {
pub apply_immediately: Option<bool>,
pub backtrack_window: Option<i64>,
pub backup_retention_period: Option<i64>,
pub cloudwatch_logs_export_configuration: Option<CloudwatchLogsExportConfiguration>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub enable_http_endpoint: Option<bool>,
pub enable_iam_database_authentication: Option<bool>,
pub engine_version: Option<String>,
pub master_user_password: Option<String>,
pub new_db_cluster_identifier: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub scaling_configuration: Option<ScalingConfiguration>,
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.backtrack_window {
params.put(&format!("{}{}", prefix, "BacktrackWindow"), &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,
);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &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.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.enable_http_endpoint {
params.put(&format!("{}{}", prefix, "EnableHttpEndpoint"), &field_value);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.master_user_password {
params.put(&format!("{}{}", prefix, "MasterUserPassword"), &field_value);
}
if let Some(ref field_value) = obj.new_db_cluster_identifier {
params.put(
&format!("{}{}", prefix, "NewDBClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.preferred_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.preferred_maintenance_window {
params.put(
&format!("{}{}", prefix, "PreferredMaintenanceWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.scaling_configuration {
ScalingConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "ScalingConfiguration"),
field_value,
);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterParameterGroupMessage {
pub db_cluster_parameter_group_name: String,
pub parameters: Vec<Parameter>,
}
struct ModifyDBClusterParameterGroupMessageSerializer;
impl ModifyDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_parameter_group_name,
);
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
&obj.parameters,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct ModifyDBClusterResultDeserializer;
impl ModifyDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBClusterResult, XmlParseError> {
deserialize_elements::<_, ModifyDBClusterResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster = Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterSnapshotAttributeMessage {
pub attribute_name: String,
pub db_cluster_snapshot_identifier: String,
pub values_to_add: Option<Vec<String>>,
pub values_to_remove: Option<Vec<String>>,
}
struct ModifyDBClusterSnapshotAttributeMessageSerializer;
impl ModifyDBClusterSnapshotAttributeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBClusterSnapshotAttributeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AttributeName"),
&obj.attribute_name,
);
params.put(
&format!("{}{}", prefix, "DBClusterSnapshotIdentifier"),
&obj.db_cluster_snapshot_identifier,
);
if let Some(ref field_value) = obj.values_to_add {
AttributeValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "AttributeValue"),
field_value,
);
}
if let Some(ref field_value) = obj.values_to_remove {
AttributeValueListSerializer::serialize(
params,
&format!("{}{}", prefix, "AttributeValue"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBClusterSnapshotAttributeResult {
pub db_cluster_snapshot_attributes_result: Option<DBClusterSnapshotAttributesResult>,
}
struct ModifyDBClusterSnapshotAttributeResultDeserializer;
impl ModifyDBClusterSnapshotAttributeResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBClusterSnapshotAttributeResult, XmlParseError> {
deserialize_elements::<_, ModifyDBClusterSnapshotAttributeResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBClusterSnapshotAttributesResult" => {
obj.db_cluster_snapshot_attributes_result =
Some(DBClusterSnapshotAttributesResultDeserializer::deserialize(
"DBClusterSnapshotAttributesResult",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBInstanceMessage {
pub allocated_storage: Option<i64>,
pub allow_major_version_upgrade: Option<bool>,
pub apply_immediately: Option<bool>,
pub auto_minor_version_upgrade: Option<bool>,
pub backup_retention_period: Option<i64>,
pub ca_certificate_identifier: Option<String>,
pub cloudwatch_logs_export_configuration: Option<CloudwatchLogsExportConfiguration>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: String,
pub db_parameter_group_name: Option<String>,
pub db_port_number: Option<i64>,
pub db_security_groups: Option<Vec<String>>,
pub db_subnet_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub domain: Option<String>,
pub domain_iam_role_name: Option<String>,
pub enable_iam_database_authentication: Option<bool>,
pub enable_performance_insights: Option<bool>,
pub engine_version: Option<String>,
pub iops: Option<i64>,
pub license_model: Option<String>,
pub master_user_password: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub new_db_instance_identifier: Option<String>,
pub option_group_name: Option<String>,
pub performance_insights_kms_key_id: Option<String>,
pub performance_insights_retention_period: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub promotion_tier: Option<i64>,
pub publicly_accessible: Option<bool>,
pub storage_type: Option<String>,
pub tde_credential_arn: Option<String>,
pub tde_credential_password: Option<String>,
pub use_default_processor_features: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct ModifyDBInstanceMessageSerializer;
impl ModifyDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allocated_storage {
params.put(&format!("{}{}", prefix, "AllocatedStorage"), &field_value);
}
if let Some(ref field_value) = obj.allow_major_version_upgrade {
params.put(
&format!("{}{}", prefix, "AllowMajorVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.apply_immediately {
params.put(&format!("{}{}", prefix, "ApplyImmediately"), &field_value);
}
if let Some(ref field_value) = obj.auto_minor_version_upgrade {
params.put(
&format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.ca_certificate_identifier {
params.put(
&format!("{}{}", prefix, "CACertificateIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.cloudwatch_logs_export_configuration {
CloudwatchLogsExportConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "CloudwatchLogsExportConfiguration"),
field_value,
);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
if let Some(ref field_value) = obj.db_instance_class {
params.put(&format!("{}{}", prefix, "DBInstanceClass"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_port_number {
params.put(&format!("{}{}", prefix, "DBPortNumber"), &field_value);
}
if let Some(ref field_value) = obj.db_security_groups {
DBSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "DBSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.domain {
params.put(&format!("{}{}", prefix, "Domain"), &field_value);
}
if let Some(ref field_value) = obj.domain_iam_role_name {
params.put(&format!("{}{}", prefix, "DomainIAMRoleName"), &field_value);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.enable_performance_insights {
params.put(
&format!("{}{}", prefix, "EnablePerformanceInsights"),
&field_value,
);
}
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &field_value);
}
if let Some(ref field_value) = obj.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &field_value);
}
if let Some(ref field_value) = obj.master_user_password {
params.put(&format!("{}{}", prefix, "MasterUserPassword"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_interval {
params.put(&format!("{}{}", prefix, "MonitoringInterval"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_role_arn {
params.put(&format!("{}{}", prefix, "MonitoringRoleArn"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.new_db_instance_identifier {
params.put(
&format!("{}{}", prefix, "NewDBInstanceIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.performance_insights_kms_key_id {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsKMSKeyId"),
&field_value,
);
}
if let Some(ref field_value) = obj.performance_insights_retention_period {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsRetentionPeriod"),
&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.processor_features {
ProcessorFeatureListSerializer::serialize(
params,
&format!("{}{}", prefix, "ProcessorFeature"),
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.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_arn {
params.put(&format!("{}{}", prefix, "TdeCredentialArn"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_password {
params.put(
&format!("{}{}", prefix, "TdeCredentialPassword"),
&field_value,
);
}
if let Some(ref field_value) = obj.use_default_processor_features {
params.put(
&format!("{}{}", prefix, "UseDefaultProcessorFeatures"),
&field_value,
);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct ModifyDBInstanceResultDeserializer;
impl ModifyDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBInstanceResult, XmlParseError> {
deserialize_elements::<_, ModifyDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBParameterGroupMessage {
pub db_parameter_group_name: String,
pub parameters: Vec<Parameter>,
}
struct ModifyDBParameterGroupMessageSerializer;
impl ModifyDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
&obj.parameters,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBSnapshotAttributeMessage {
pub attribute_name: String,
pub db_snapshot_identifier: String,
pub values_to_add: Option<Vec<String>>,
pub values_to_remove: Option<Vec<String>>,
}
struct ModifyDBSnapshotAttributeMessageSerializer;
impl ModifyDBSnapshotAttributeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBSnapshotAttributeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "AttributeName"),
&obj.attribute_name,
);
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&obj.db_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 ModifyDBSnapshotAttributeResult {
pub db_snapshot_attributes_result: Option<DBSnapshotAttributesResult>,
}
struct ModifyDBSnapshotAttributeResultDeserializer;
impl ModifyDBSnapshotAttributeResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBSnapshotAttributeResult, XmlParseError> {
deserialize_elements::<_, ModifyDBSnapshotAttributeResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSnapshotAttributesResult" => {
obj.db_snapshot_attributes_result =
Some(DBSnapshotAttributesResultDeserializer::deserialize(
"DBSnapshotAttributesResult",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBSnapshotMessage {
pub db_snapshot_identifier: String,
pub engine_version: Option<String>,
pub option_group_name: Option<String>,
}
struct ModifyDBSnapshotMessageSerializer;
impl ModifyDBSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyDBSnapshotMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&obj.db_snapshot_identifier,
);
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyDBSnapshotResult {
pub db_snapshot: Option<DBSnapshot>,
}
struct ModifyDBSnapshotResultDeserializer;
impl ModifyDBSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyDBSnapshotResult, XmlParseError> {
deserialize_elements::<_, ModifyDBSnapshotResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSnapshot" => {
obj.db_snapshot =
Some(DBSnapshotDeserializer::deserialize("DBSnapshot", 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 ModifyEventSubscriptionMessage {
pub enabled: Option<bool>,
pub event_categories: Option<Vec<String>>,
pub sns_topic_arn: Option<String>,
pub source_type: Option<String>,
pub subscription_name: String,
}
struct ModifyEventSubscriptionMessageSerializer;
impl ModifyEventSubscriptionMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyEventSubscriptionMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.enabled {
params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
}
if let Some(ref field_value) = obj.event_categories {
EventCategoriesListSerializer::serialize(
params,
&format!("{}{}", prefix, "EventCategory"),
field_value,
);
}
if let Some(ref field_value) = obj.sns_topic_arn {
params.put(&format!("{}{}", prefix, "SnsTopicArn"), &field_value);
}
if let Some(ref field_value) = obj.source_type {
params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyEventSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct ModifyEventSubscriptionResultDeserializer;
impl ModifyEventSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyEventSubscriptionResult, XmlParseError> {
deserialize_elements::<_, ModifyEventSubscriptionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscription" => {
obj.event_subscription = Some(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyGlobalClusterMessage {
pub deletion_protection: Option<bool>,
pub global_cluster_identifier: Option<String>,
pub new_global_cluster_identifier: Option<String>,
}
struct ModifyGlobalClusterMessageSerializer;
impl ModifyGlobalClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyGlobalClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.global_cluster_identifier {
params.put(
&format!("{}{}", prefix, "GlobalClusterIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.new_global_cluster_identifier {
params.put(
&format!("{}{}", prefix, "NewGlobalClusterIdentifier"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyGlobalClusterResult {
pub global_cluster: Option<GlobalCluster>,
}
struct ModifyGlobalClusterResultDeserializer;
impl ModifyGlobalClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyGlobalClusterResult, XmlParseError> {
deserialize_elements::<_, ModifyGlobalClusterResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"GlobalCluster" => {
obj.global_cluster = Some(GlobalClusterDeserializer::deserialize(
"GlobalCluster",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyOptionGroupMessage {
pub apply_immediately: Option<bool>,
pub option_group_name: String,
pub options_to_include: Option<Vec<OptionConfiguration>>,
pub options_to_remove: Option<Vec<String>>,
}
struct ModifyOptionGroupMessageSerializer;
impl ModifyOptionGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ModifyOptionGroupMessage) {
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);
}
params.put(
&format!("{}{}", prefix, "OptionGroupName"),
&obj.option_group_name,
);
if let Some(ref field_value) = obj.options_to_include {
OptionConfigurationListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionConfiguration"),
field_value,
);
}
if let Some(ref field_value) = obj.options_to_remove {
OptionNamesListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionsToRemove"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ModifyOptionGroupResult {
pub option_group: Option<OptionGroup>,
}
struct ModifyOptionGroupResultDeserializer;
impl ModifyOptionGroupResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ModifyOptionGroupResult, XmlParseError> {
deserialize_elements::<_, ModifyOptionGroupResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"OptionGroup" => {
obj.option_group =
Some(OptionGroupDeserializer::deserialize("OptionGroup", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RDSOption {
pub db_security_group_memberships: Option<Vec<DBSecurityGroupMembership>>,
pub option_description: Option<String>,
pub option_name: Option<String>,
pub option_settings: Option<Vec<OptionSetting>>,
pub option_version: Option<String>,
pub permanent: Option<bool>,
pub persistent: Option<bool>,
pub port: Option<i64>,
pub vpc_security_group_memberships: Option<Vec<VpcSecurityGroupMembership>>,
}
struct RDSOptionDeserializer;
impl RDSOptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RDSOption, XmlParseError> {
deserialize_elements::<_, RDSOption, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBSecurityGroupMemberships" => {
obj.db_security_group_memberships
.get_or_insert(vec![])
.extend(DBSecurityGroupMembershipListDeserializer::deserialize(
"DBSecurityGroupMemberships",
stack,
)?);
}
"OptionDescription" => {
obj.option_description =
Some(StringDeserializer::deserialize("OptionDescription", stack)?);
}
"OptionName" => {
obj.option_name = Some(StringDeserializer::deserialize("OptionName", stack)?);
}
"OptionSettings" => {
obj.option_settings.get_or_insert(vec![]).extend(
OptionSettingConfigurationListDeserializer::deserialize(
"OptionSettings",
stack,
)?,
);
}
"OptionVersion" => {
obj.option_version =
Some(StringDeserializer::deserialize("OptionVersion", stack)?);
}
"Permanent" => {
obj.permanent = Some(BooleanDeserializer::deserialize("Permanent", stack)?);
}
"Persistent" => {
obj.persistent = Some(BooleanDeserializer::deserialize("Persistent", stack)?);
}
"Port" => {
obj.port = Some(IntegerOptionalDeserializer::deserialize("Port", stack)?);
}
"VpcSecurityGroupMemberships" => {
obj.vpc_security_group_memberships
.get_or_insert(vec![])
.extend(VpcSecurityGroupMembershipListDeserializer::deserialize(
"VpcSecurityGroupMemberships",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionConfiguration {
pub db_security_group_memberships: Option<Vec<String>>,
pub option_name: String,
pub option_settings: Option<Vec<OptionSetting>>,
pub option_version: Option<String>,
pub port: Option<i64>,
pub vpc_security_group_memberships: Option<Vec<String>>,
}
struct OptionConfigurationSerializer;
impl OptionConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &OptionConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_security_group_memberships {
DBSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "DBSecurityGroupName"),
field_value,
);
}
params.put(&format!("{}{}", prefix, "OptionName"), &obj.option_name);
if let Some(ref field_value) = obj.option_settings {
OptionSettingsListSerializer::serialize(
params,
&format!("{}{}", prefix, "OptionSetting"),
field_value,
);
}
if let Some(ref field_value) = obj.option_version {
params.put(&format!("{}{}", prefix, "OptionVersion"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.vpc_security_group_memberships {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
struct OptionConfigurationListSerializer;
impl OptionConfigurationListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<OptionConfiguration>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
OptionConfigurationSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionGroup {
pub allows_vpc_and_non_vpc_instance_memberships: Option<bool>,
pub engine_name: Option<String>,
pub major_engine_version: Option<String>,
pub option_group_arn: Option<String>,
pub option_group_description: Option<String>,
pub option_group_name: Option<String>,
pub options: Option<Vec<RDSOption>>,
pub vpc_id: Option<String>,
}
struct OptionGroupDeserializer;
impl OptionGroupDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionGroup, XmlParseError> {
deserialize_elements::<_, OptionGroup, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllowsVpcAndNonVpcInstanceMemberships" => {
obj.allows_vpc_and_non_vpc_instance_memberships =
Some(BooleanDeserializer::deserialize(
"AllowsVpcAndNonVpcInstanceMemberships",
stack,
)?);
}
"EngineName" => {
obj.engine_name = Some(StringDeserializer::deserialize("EngineName", stack)?);
}
"MajorEngineVersion" => {
obj.major_engine_version = Some(StringDeserializer::deserialize(
"MajorEngineVersion",
stack,
)?);
}
"OptionGroupArn" => {
obj.option_group_arn =
Some(StringDeserializer::deserialize("OptionGroupArn", stack)?);
}
"OptionGroupDescription" => {
obj.option_group_description = Some(StringDeserializer::deserialize(
"OptionGroupDescription",
stack,
)?);
}
"OptionGroupName" => {
obj.option_group_name =
Some(StringDeserializer::deserialize("OptionGroupName", stack)?);
}
"Options" => {
obj.options
.get_or_insert(vec![])
.extend(OptionsListDeserializer::deserialize("Options", stack)?);
}
"VpcId" => {
obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionGroupMembership {
pub option_group_name: Option<String>,
pub status: Option<String>,
}
struct OptionGroupMembershipDeserializer;
impl OptionGroupMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionGroupMembership, XmlParseError> {
deserialize_elements::<_, OptionGroupMembership, _>(tag_name, stack, |name, stack, obj| {
match name {
"OptionGroupName" => {
obj.option_group_name =
Some(StringDeserializer::deserialize("OptionGroupName", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct OptionGroupMembershipListDeserializer;
impl OptionGroupMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OptionGroupMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OptionGroupMembership" {
obj.push(OptionGroupMembershipDeserializer::deserialize(
"OptionGroupMembership",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionGroupOption {
pub default_port: Option<i64>,
pub description: Option<String>,
pub engine_name: Option<String>,
pub major_engine_version: Option<String>,
pub minimum_required_minor_engine_version: Option<String>,
pub name: Option<String>,
pub option_group_option_settings: Option<Vec<OptionGroupOptionSetting>>,
pub option_group_option_versions: Option<Vec<OptionVersion>>,
pub options_conflicts_with: Option<Vec<String>>,
pub options_depended_on: Option<Vec<String>>,
pub permanent: Option<bool>,
pub persistent: Option<bool>,
pub port_required: Option<bool>,
pub requires_auto_minor_engine_version_upgrade: Option<bool>,
pub supports_option_version_downgrade: Option<bool>,
pub vpc_only: Option<bool>,
}
struct OptionGroupOptionDeserializer;
impl OptionGroupOptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionGroupOption, XmlParseError> {
deserialize_elements::<_, OptionGroupOption, _>(tag_name, stack, |name, stack, obj| {
match name {
"DefaultPort" => {
obj.default_port = Some(IntegerOptionalDeserializer::deserialize(
"DefaultPort",
stack,
)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"EngineName" => {
obj.engine_name = Some(StringDeserializer::deserialize("EngineName", stack)?);
}
"MajorEngineVersion" => {
obj.major_engine_version = Some(StringDeserializer::deserialize(
"MajorEngineVersion",
stack,
)?);
}
"MinimumRequiredMinorEngineVersion" => {
obj.minimum_required_minor_engine_version =
Some(StringDeserializer::deserialize(
"MinimumRequiredMinorEngineVersion",
stack,
)?);
}
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"OptionGroupOptionSettings" => {
obj.option_group_option_settings
.get_or_insert(vec![])
.extend(OptionGroupOptionSettingsListDeserializer::deserialize(
"OptionGroupOptionSettings",
stack,
)?);
}
"OptionGroupOptionVersions" => {
obj.option_group_option_versions
.get_or_insert(vec![])
.extend(OptionGroupOptionVersionsListDeserializer::deserialize(
"OptionGroupOptionVersions",
stack,
)?);
}
"OptionsConflictsWith" => {
obj.options_conflicts_with.get_or_insert(vec![]).extend(
OptionsConflictsWithDeserializer::deserialize(
"OptionsConflictsWith",
stack,
)?,
);
}
"OptionsDependedOn" => {
obj.options_depended_on.get_or_insert(vec![]).extend(
OptionsDependedOnDeserializer::deserialize("OptionsDependedOn", stack)?,
);
}
"Permanent" => {
obj.permanent = Some(BooleanDeserializer::deserialize("Permanent", stack)?);
}
"Persistent" => {
obj.persistent = Some(BooleanDeserializer::deserialize("Persistent", stack)?);
}
"PortRequired" => {
obj.port_required =
Some(BooleanDeserializer::deserialize("PortRequired", stack)?);
}
"RequiresAutoMinorEngineVersionUpgrade" => {
obj.requires_auto_minor_engine_version_upgrade =
Some(BooleanDeserializer::deserialize(
"RequiresAutoMinorEngineVersionUpgrade",
stack,
)?);
}
"SupportsOptionVersionDowngrade" => {
obj.supports_option_version_downgrade =
Some(BooleanOptionalDeserializer::deserialize(
"SupportsOptionVersionDowngrade",
stack,
)?);
}
"VpcOnly" => {
obj.vpc_only = Some(BooleanDeserializer::deserialize("VpcOnly", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionGroupOptionSetting {
pub allowed_values: Option<String>,
pub apply_type: Option<String>,
pub default_value: Option<String>,
pub is_modifiable: Option<bool>,
pub is_required: Option<bool>,
pub minimum_engine_version_per_allowed_value: Option<Vec<MinimumEngineVersionPerAllowedValue>>,
pub setting_description: Option<String>,
pub setting_name: Option<String>,
}
struct OptionGroupOptionSettingDeserializer;
impl OptionGroupOptionSettingDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionGroupOptionSetting, XmlParseError> {
deserialize_elements::<_, OptionGroupOptionSetting, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AllowedValues" => {
obj.allowed_values =
Some(StringDeserializer::deserialize("AllowedValues", stack)?);
}
"ApplyType" => {
obj.apply_type = Some(StringDeserializer::deserialize("ApplyType", stack)?);
}
"DefaultValue" => {
obj.default_value =
Some(StringDeserializer::deserialize("DefaultValue", stack)?);
}
"IsModifiable" => {
obj.is_modifiable =
Some(BooleanDeserializer::deserialize("IsModifiable", stack)?);
}
"IsRequired" => {
obj.is_required =
Some(BooleanDeserializer::deserialize("IsRequired", stack)?);
}
"MinimumEngineVersionPerAllowedValue" => {
obj.minimum_engine_version_per_allowed_value
.get_or_insert(vec![])
.extend(
MinimumEngineVersionPerAllowedValueListDeserializer::deserialize(
"MinimumEngineVersionPerAllowedValue",
stack,
)?,
);
}
"SettingDescription" => {
obj.setting_description = Some(StringDeserializer::deserialize(
"SettingDescription",
stack,
)?);
}
"SettingName" => {
obj.setting_name =
Some(StringDeserializer::deserialize("SettingName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct OptionGroupOptionSettingsListDeserializer;
impl OptionGroupOptionSettingsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OptionGroupOptionSetting>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OptionGroupOptionSetting" {
obj.push(OptionGroupOptionSettingDeserializer::deserialize(
"OptionGroupOptionSetting",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct OptionGroupOptionVersionsListDeserializer;
impl OptionGroupOptionVersionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OptionVersion>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OptionVersion" {
obj.push(OptionVersionDeserializer::deserialize(
"OptionVersion",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct OptionGroupOptionsListDeserializer;
impl OptionGroupOptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OptionGroupOption>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OptionGroupOption" {
obj.push(OptionGroupOptionDeserializer::deserialize(
"OptionGroupOption",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionGroupOptionsMessage {
pub marker: Option<String>,
pub option_group_options: Option<Vec<OptionGroupOption>>,
}
struct OptionGroupOptionsMessageDeserializer;
impl OptionGroupOptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionGroupOptionsMessage, XmlParseError> {
deserialize_elements::<_, OptionGroupOptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"OptionGroupOptions" => {
obj.option_group_options.get_or_insert(vec![]).extend(
OptionGroupOptionsListDeserializer::deserialize(
"OptionGroupOptions",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionGroups {
pub marker: Option<String>,
pub option_groups_list: Option<Vec<OptionGroup>>,
}
struct OptionGroupsDeserializer;
impl OptionGroupsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionGroups, XmlParseError> {
deserialize_elements::<_, OptionGroups, _>(tag_name, stack, |name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"OptionGroupsList" => {
obj.option_groups_list.get_or_insert(vec![]).extend(
OptionGroupsListDeserializer::deserialize("OptionGroupsList", stack)?,
);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct OptionGroupsListDeserializer;
impl OptionGroupsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OptionGroup>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OptionGroup" {
obj.push(OptionGroupDeserializer::deserialize("OptionGroup", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct OptionNamesListSerializer;
impl OptionNamesListSerializer {
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 OptionSetting {
pub allowed_values: Option<String>,
pub apply_type: Option<String>,
pub data_type: Option<String>,
pub default_value: Option<String>,
pub description: Option<String>,
pub is_collection: Option<bool>,
pub is_modifiable: Option<bool>,
pub name: Option<String>,
pub value: Option<String>,
}
struct OptionSettingDeserializer;
impl OptionSettingDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionSetting, XmlParseError> {
deserialize_elements::<_, OptionSetting, _>(tag_name, stack, |name, stack, obj| {
match name {
"AllowedValues" => {
obj.allowed_values =
Some(StringDeserializer::deserialize("AllowedValues", stack)?);
}
"ApplyType" => {
obj.apply_type = Some(StringDeserializer::deserialize("ApplyType", stack)?);
}
"DataType" => {
obj.data_type = Some(StringDeserializer::deserialize("DataType", stack)?);
}
"DefaultValue" => {
obj.default_value =
Some(StringDeserializer::deserialize("DefaultValue", stack)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"IsCollection" => {
obj.is_collection =
Some(BooleanDeserializer::deserialize("IsCollection", stack)?);
}
"IsModifiable" => {
obj.is_modifiable =
Some(BooleanDeserializer::deserialize("IsModifiable", stack)?);
}
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"Value" => {
obj.value = Some(StringDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct OptionSettingSerializer;
impl OptionSettingSerializer {
fn serialize(params: &mut Params, name: &str, obj: &OptionSetting) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allowed_values {
params.put(&format!("{}{}", prefix, "AllowedValues"), &field_value);
}
if let Some(ref field_value) = obj.apply_type {
params.put(&format!("{}{}", prefix, "ApplyType"), &field_value);
}
if let Some(ref field_value) = obj.data_type {
params.put(&format!("{}{}", prefix, "DataType"), &field_value);
}
if let Some(ref field_value) = obj.default_value {
params.put(&format!("{}{}", prefix, "DefaultValue"), &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_collection {
params.put(&format!("{}{}", prefix, "IsCollection"), &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.name {
params.put(&format!("{}{}", prefix, "Name"), &field_value);
}
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
struct OptionSettingConfigurationListDeserializer;
impl OptionSettingConfigurationListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OptionSetting>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OptionSetting" {
obj.push(OptionSettingDeserializer::deserialize(
"OptionSetting",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct OptionSettingsListSerializer;
impl OptionSettingsListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<OptionSetting>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
OptionSettingSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OptionVersion {
pub is_default: Option<bool>,
pub version: Option<String>,
}
struct OptionVersionDeserializer;
impl OptionVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OptionVersion, XmlParseError> {
deserialize_elements::<_, OptionVersion, _>(tag_name, stack, |name, stack, obj| {
match name {
"IsDefault" => {
obj.is_default = Some(BooleanDeserializer::deserialize("IsDefault", stack)?);
}
"Version" => {
obj.version = Some(StringDeserializer::deserialize("Version", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct OptionsConflictsWithDeserializer;
impl OptionsConflictsWithDeserializer {
#[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 == "OptionConflictName" {
obj.push(StringDeserializer::deserialize(
"OptionConflictName",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct OptionsDependedOnDeserializer;
impl OptionsDependedOnDeserializer {
#[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 == "OptionName" {
obj.push(StringDeserializer::deserialize("OptionName", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct OptionsListDeserializer;
impl OptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RDSOption>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Option" {
obj.push(RDSOptionDeserializer::deserialize("Option", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OrderableDBInstanceOption {
pub availability_zones: Option<Vec<AvailabilityZone>>,
pub available_processor_features: Option<Vec<AvailableProcessorFeature>>,
pub db_instance_class: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub license_model: Option<String>,
pub max_iops_per_db_instance: Option<i64>,
pub max_iops_per_gib: Option<f64>,
pub max_storage_size: Option<i64>,
pub min_iops_per_db_instance: Option<i64>,
pub min_iops_per_gib: Option<f64>,
pub min_storage_size: Option<i64>,
pub multi_az_capable: Option<bool>,
pub read_replica_capable: Option<bool>,
pub storage_type: Option<String>,
pub supported_engine_modes: Option<Vec<String>>,
pub supports_enhanced_monitoring: Option<bool>,
pub supports_iam_database_authentication: Option<bool>,
pub supports_iops: Option<bool>,
pub supports_performance_insights: Option<bool>,
pub supports_storage_encryption: Option<bool>,
pub vpc: Option<bool>,
}
struct OrderableDBInstanceOptionDeserializer;
impl OrderableDBInstanceOptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OrderableDBInstanceOption, XmlParseError> {
deserialize_elements::<_, OrderableDBInstanceOption, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AvailabilityZones" => {
obj.availability_zones.get_or_insert(vec![]).extend(
AvailabilityZoneListDeserializer::deserialize(
"AvailabilityZones",
stack,
)?,
);
}
"AvailableProcessorFeatures" => {
obj.available_processor_features
.get_or_insert(vec![])
.extend(AvailableProcessorFeatureListDeserializer::deserialize(
"AvailableProcessorFeatures",
stack,
)?);
}
"DBInstanceClass" => {
obj.db_instance_class =
Some(StringDeserializer::deserialize("DBInstanceClass", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"LicenseModel" => {
obj.license_model =
Some(StringDeserializer::deserialize("LicenseModel", stack)?);
}
"MaxIopsPerDbInstance" => {
obj.max_iops_per_db_instance =
Some(IntegerOptionalDeserializer::deserialize(
"MaxIopsPerDbInstance",
stack,
)?);
}
"MaxIopsPerGib" => {
obj.max_iops_per_gib = Some(DoubleOptionalDeserializer::deserialize(
"MaxIopsPerGib",
stack,
)?);
}
"MaxStorageSize" => {
obj.max_storage_size = Some(IntegerOptionalDeserializer::deserialize(
"MaxStorageSize",
stack,
)?);
}
"MinIopsPerDbInstance" => {
obj.min_iops_per_db_instance =
Some(IntegerOptionalDeserializer::deserialize(
"MinIopsPerDbInstance",
stack,
)?);
}
"MinIopsPerGib" => {
obj.min_iops_per_gib = Some(DoubleOptionalDeserializer::deserialize(
"MinIopsPerGib",
stack,
)?);
}
"MinStorageSize" => {
obj.min_storage_size = Some(IntegerOptionalDeserializer::deserialize(
"MinStorageSize",
stack,
)?);
}
"MultiAZCapable" => {
obj.multi_az_capable =
Some(BooleanDeserializer::deserialize("MultiAZCapable", stack)?);
}
"ReadReplicaCapable" => {
obj.read_replica_capable = Some(BooleanDeserializer::deserialize(
"ReadReplicaCapable",
stack,
)?);
}
"StorageType" => {
obj.storage_type =
Some(StringDeserializer::deserialize("StorageType", stack)?);
}
"SupportedEngineModes" => {
obj.supported_engine_modes.get_or_insert(vec![]).extend(
EngineModeListDeserializer::deserialize("SupportedEngineModes", stack)?,
);
}
"SupportsEnhancedMonitoring" => {
obj.supports_enhanced_monitoring = Some(BooleanDeserializer::deserialize(
"SupportsEnhancedMonitoring",
stack,
)?);
}
"SupportsIAMDatabaseAuthentication" => {
obj.supports_iam_database_authentication =
Some(BooleanDeserializer::deserialize(
"SupportsIAMDatabaseAuthentication",
stack,
)?);
}
"SupportsIops" => {
obj.supports_iops =
Some(BooleanDeserializer::deserialize("SupportsIops", stack)?);
}
"SupportsPerformanceInsights" => {
obj.supports_performance_insights = Some(BooleanDeserializer::deserialize(
"SupportsPerformanceInsights",
stack,
)?);
}
"SupportsStorageEncryption" => {
obj.supports_storage_encryption = Some(BooleanDeserializer::deserialize(
"SupportsStorageEncryption",
stack,
)?);
}
"Vpc" => {
obj.vpc = Some(BooleanDeserializer::deserialize("Vpc", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct OrderableDBInstanceOptionsListDeserializer;
impl OrderableDBInstanceOptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<OrderableDBInstanceOption>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "OrderableDBInstanceOption" {
obj.push(OrderableDBInstanceOptionDeserializer::deserialize(
"OrderableDBInstanceOption",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct OrderableDBInstanceOptionsMessage {
pub marker: Option<String>,
pub orderable_db_instance_options: Option<Vec<OrderableDBInstanceOption>>,
}
struct OrderableDBInstanceOptionsMessageDeserializer;
impl OrderableDBInstanceOptionsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<OrderableDBInstanceOptionsMessage, XmlParseError> {
deserialize_elements::<_, OrderableDBInstanceOptionsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"OrderableDBInstanceOptions" => {
obj.orderable_db_instance_options
.get_or_insert(vec![])
.extend(OrderableDBInstanceOptionsListDeserializer::deserialize(
"OrderableDBInstanceOptions",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Parameter {
pub allowed_values: Option<String>,
pub apply_method: Option<String>,
pub apply_type: Option<String>,
pub data_type: Option<String>,
pub description: Option<String>,
pub is_modifiable: Option<bool>,
pub minimum_engine_version: Option<String>,
pub parameter_name: Option<String>,
pub parameter_value: Option<String>,
pub source: Option<String>,
pub supported_engine_modes: Option<Vec<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)?);
}
"SupportedEngineModes" => {
obj.supported_engine_modes.get_or_insert(vec![]).extend(
EngineModeListDeserializer::deserialize("SupportedEngineModes", 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);
}
if let Some(ref field_value) = obj.supported_engine_modes {
EngineModeListSerializer::serialize(
params,
&format!("{}{}", prefix, "SupportedEngineModes"),
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 processor_features: Option<Vec<ProcessorFeature>>,
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)?);
}
"ProcessorFeatures" => {
obj.processor_features.get_or_insert(vec![]).extend(
ProcessorFeatureListDeserializer::deserialize("ProcessorFeatures", stack)?,
);
}
"StorageType" => {
obj.storage_type = Some(StringDeserializer::deserialize("StorageType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ProcessorFeature {
pub name: Option<String>,
pub value: Option<String>,
}
struct ProcessorFeatureDeserializer;
impl ProcessorFeatureDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ProcessorFeature, XmlParseError> {
deserialize_elements::<_, ProcessorFeature, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
}
"Value" => {
obj.value = Some(StringDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ProcessorFeatureSerializer;
impl ProcessorFeatureSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ProcessorFeature) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.name {
params.put(&format!("{}{}", prefix, "Name"), &field_value);
}
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
struct ProcessorFeatureListDeserializer;
impl ProcessorFeatureListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ProcessorFeature>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ProcessorFeature" {
obj.push(ProcessorFeatureDeserializer::deserialize(
"ProcessorFeature",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ProcessorFeatureListSerializer;
impl ProcessorFeatureListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<ProcessorFeature>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
ProcessorFeatureSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PromoteReadReplicaDBClusterMessage {
pub db_cluster_identifier: String,
}
struct PromoteReadReplicaDBClusterMessageSerializer;
impl PromoteReadReplicaDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PromoteReadReplicaDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PromoteReadReplicaDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct PromoteReadReplicaDBClusterResultDeserializer;
impl PromoteReadReplicaDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PromoteReadReplicaDBClusterResult, XmlParseError> {
deserialize_elements::<_, PromoteReadReplicaDBClusterResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster =
Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PromoteReadReplicaMessage {
pub backup_retention_period: Option<i64>,
pub db_instance_identifier: String,
pub preferred_backup_window: Option<String>,
}
struct PromoteReadReplicaMessageSerializer;
impl PromoteReadReplicaMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &PromoteReadReplicaMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.preferred_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PromoteReadReplicaResult {
pub db_instance: Option<DBInstance>,
}
struct PromoteReadReplicaResultDeserializer;
impl PromoteReadReplicaResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PromoteReadReplicaResult, XmlParseError> {
deserialize_elements::<_, PromoteReadReplicaResult, _>(
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 PurchaseReservedDBInstancesOfferingMessage {
pub db_instance_count: Option<i64>,
pub reserved_db_instance_id: Option<String>,
pub reserved_db_instances_offering_id: String,
pub tags: Option<Vec<Tag>>,
}
struct PurchaseReservedDBInstancesOfferingMessageSerializer;
impl PurchaseReservedDBInstancesOfferingMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &PurchaseReservedDBInstancesOfferingMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.db_instance_count {
params.put(&format!("{}{}", prefix, "DBInstanceCount"), &field_value);
}
if let Some(ref field_value) = obj.reserved_db_instance_id {
params.put(
&format!("{}{}", prefix, "ReservedDBInstanceId"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "ReservedDBInstancesOfferingId"),
&obj.reserved_db_instances_offering_id,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct PurchaseReservedDBInstancesOfferingResult {
pub reserved_db_instance: Option<ReservedDBInstance>,
}
struct PurchaseReservedDBInstancesOfferingResultDeserializer;
impl PurchaseReservedDBInstancesOfferingResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<PurchaseReservedDBInstancesOfferingResult, XmlParseError> {
deserialize_elements::<_, PurchaseReservedDBInstancesOfferingResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ReservedDBInstance" => {
obj.reserved_db_instance =
Some(ReservedDBInstanceDeserializer::deserialize(
"ReservedDBInstance",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Range {
pub from: Option<i64>,
pub step: Option<i64>,
pub to: Option<i64>,
}
struct RangeDeserializer;
impl RangeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Range, XmlParseError> {
deserialize_elements::<_, Range, _>(tag_name, stack, |name, stack, obj| {
match name {
"From" => {
obj.from = Some(IntegerDeserializer::deserialize("From", stack)?);
}
"Step" => {
obj.step = Some(IntegerOptionalDeserializer::deserialize("Step", stack)?);
}
"To" => {
obj.to = Some(IntegerDeserializer::deserialize("To", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RangeListDeserializer;
impl RangeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Range>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Range" {
obj.push(RangeDeserializer::deserialize("Range", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReadReplicaDBClusterIdentifierListDeserializer;
impl ReadReplicaDBClusterIdentifierListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ReadReplicaDBClusterIdentifier" {
obj.push(StringDeserializer::deserialize(
"ReadReplicaDBClusterIdentifier",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReadReplicaDBInstanceIdentifierListDeserializer;
impl ReadReplicaDBInstanceIdentifierListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ReadReplicaDBInstanceIdentifier" {
obj.push(StringDeserializer::deserialize(
"ReadReplicaDBInstanceIdentifier",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReadReplicaIdentifierListDeserializer;
impl ReadReplicaIdentifierListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ReadReplicaIdentifier" {
obj.push(StringDeserializer::deserialize(
"ReadReplicaIdentifier",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ReadersArnListDeserializer;
impl ReadersArnListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(StringDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct 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 RecurringCharge {
pub recurring_charge_amount: Option<f64>,
pub recurring_charge_frequency: Option<String>,
}
struct RecurringChargeDeserializer;
impl RecurringChargeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RecurringCharge, XmlParseError> {
deserialize_elements::<_, RecurringCharge, _>(tag_name, stack, |name, stack, obj| {
match name {
"RecurringChargeAmount" => {
obj.recurring_charge_amount = Some(DoubleDeserializer::deserialize(
"RecurringChargeAmount",
stack,
)?);
}
"RecurringChargeFrequency" => {
obj.recurring_charge_frequency = Some(StringDeserializer::deserialize(
"RecurringChargeFrequency",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct RecurringChargeListDeserializer;
impl RecurringChargeListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<RecurringCharge>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "RecurringCharge" {
obj.push(RecurringChargeDeserializer::deserialize(
"RecurringCharge",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveFromGlobalClusterMessage {
pub db_cluster_identifier: Option<String>,
pub global_cluster_identifier: Option<String>,
}
struct RemoveFromGlobalClusterMessageSerializer;
impl RemoveFromGlobalClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveFromGlobalClusterMessage) {
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.global_cluster_identifier {
params.put(
&format!("{}{}", prefix, "GlobalClusterIdentifier"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveFromGlobalClusterResult {
pub global_cluster: Option<GlobalCluster>,
}
struct RemoveFromGlobalClusterResultDeserializer;
impl RemoveFromGlobalClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RemoveFromGlobalClusterResult, XmlParseError> {
deserialize_elements::<_, RemoveFromGlobalClusterResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"GlobalCluster" => {
obj.global_cluster = Some(GlobalClusterDeserializer::deserialize(
"GlobalCluster",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveRoleFromDBClusterMessage {
pub db_cluster_identifier: String,
pub feature_name: Option<String>,
pub role_arn: String,
}
struct RemoveRoleFromDBClusterMessageSerializer;
impl RemoveRoleFromDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveRoleFromDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.feature_name {
params.put(&format!("{}{}", prefix, "FeatureName"), &field_value);
}
params.put(&format!("{}{}", prefix, "RoleArn"), &obj.role_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveRoleFromDBInstanceMessage {
pub db_instance_identifier: String,
pub feature_name: String,
pub role_arn: String,
}
struct RemoveRoleFromDBInstanceMessageSerializer;
impl RemoveRoleFromDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveRoleFromDBInstanceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
params.put(&format!("{}{}", prefix, "FeatureName"), &obj.feature_name);
params.put(&format!("{}{}", prefix, "RoleArn"), &obj.role_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveSourceIdentifierFromSubscriptionMessage {
pub source_identifier: String,
pub subscription_name: String,
}
struct RemoveSourceIdentifierFromSubscriptionMessageSerializer;
impl RemoveSourceIdentifierFromSubscriptionMessageSerializer {
fn serialize(
params: &mut Params,
name: &str,
obj: &RemoveSourceIdentifierFromSubscriptionMessage,
) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "SourceIdentifier"),
&obj.source_identifier,
);
params.put(
&format!("{}{}", prefix, "SubscriptionName"),
&obj.subscription_name,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveSourceIdentifierFromSubscriptionResult {
pub event_subscription: Option<EventSubscription>,
}
struct RemoveSourceIdentifierFromSubscriptionResultDeserializer;
impl RemoveSourceIdentifierFromSubscriptionResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RemoveSourceIdentifierFromSubscriptionResult, XmlParseError> {
deserialize_elements::<_, RemoveSourceIdentifierFromSubscriptionResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"EventSubscription" => {
obj.event_subscription = Some(EventSubscriptionDeserializer::deserialize(
"EventSubscription",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RemoveTagsFromResourceMessage {
pub resource_name: String,
pub tag_keys: Vec<String>,
}
struct RemoveTagsFromResourceMessageSerializer;
impl RemoveTagsFromResourceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RemoveTagsFromResourceMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
KeyListSerializer::serialize(params, &format!("{}{}", prefix, "TagKeys"), &obj.tag_keys);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReservedDBInstance {
pub currency_code: Option<String>,
pub db_instance_class: Option<String>,
pub db_instance_count: Option<i64>,
pub duration: Option<i64>,
pub fixed_price: Option<f64>,
pub multi_az: Option<bool>,
pub offering_type: Option<String>,
pub product_description: Option<String>,
pub recurring_charges: Option<Vec<RecurringCharge>>,
pub reserved_db_instance_arn: Option<String>,
pub reserved_db_instance_id: Option<String>,
pub reserved_db_instances_offering_id: Option<String>,
pub start_time: Option<String>,
pub state: Option<String>,
pub usage_price: Option<f64>,
}
struct ReservedDBInstanceDeserializer;
impl ReservedDBInstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedDBInstance, XmlParseError> {
deserialize_elements::<_, ReservedDBInstance, _>(tag_name, stack, |name, stack, obj| {
match name {
"CurrencyCode" => {
obj.currency_code =
Some(StringDeserializer::deserialize("CurrencyCode", stack)?);
}
"DBInstanceClass" => {
obj.db_instance_class =
Some(StringDeserializer::deserialize("DBInstanceClass", stack)?);
}
"DBInstanceCount" => {
obj.db_instance_count =
Some(IntegerDeserializer::deserialize("DBInstanceCount", stack)?);
}
"Duration" => {
obj.duration = Some(IntegerDeserializer::deserialize("Duration", stack)?);
}
"FixedPrice" => {
obj.fixed_price = Some(DoubleDeserializer::deserialize("FixedPrice", stack)?);
}
"MultiAZ" => {
obj.multi_az = Some(BooleanDeserializer::deserialize("MultiAZ", stack)?);
}
"OfferingType" => {
obj.offering_type =
Some(StringDeserializer::deserialize("OfferingType", stack)?);
}
"ProductDescription" => {
obj.product_description = Some(StringDeserializer::deserialize(
"ProductDescription",
stack,
)?);
}
"RecurringCharges" => {
obj.recurring_charges.get_or_insert(vec![]).extend(
RecurringChargeListDeserializer::deserialize("RecurringCharges", stack)?,
);
}
"ReservedDBInstanceArn" => {
obj.reserved_db_instance_arn = Some(StringDeserializer::deserialize(
"ReservedDBInstanceArn",
stack,
)?);
}
"ReservedDBInstanceId" => {
obj.reserved_db_instance_id = Some(StringDeserializer::deserialize(
"ReservedDBInstanceId",
stack,
)?);
}
"ReservedDBInstancesOfferingId" => {
obj.reserved_db_instances_offering_id = Some(StringDeserializer::deserialize(
"ReservedDBInstancesOfferingId",
stack,
)?);
}
"StartTime" => {
obj.start_time = Some(TStampDeserializer::deserialize("StartTime", stack)?);
}
"State" => {
obj.state = Some(StringDeserializer::deserialize("State", stack)?);
}
"UsagePrice" => {
obj.usage_price = Some(DoubleDeserializer::deserialize("UsagePrice", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ReservedDBInstanceListDeserializer;
impl ReservedDBInstanceListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReservedDBInstance>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ReservedDBInstance" {
obj.push(ReservedDBInstanceDeserializer::deserialize(
"ReservedDBInstance",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReservedDBInstanceMessage {
pub marker: Option<String>,
pub reserved_db_instances: Option<Vec<ReservedDBInstance>>,
}
struct ReservedDBInstanceMessageDeserializer;
impl ReservedDBInstanceMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedDBInstanceMessage, XmlParseError> {
deserialize_elements::<_, ReservedDBInstanceMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ReservedDBInstances" => {
obj.reserved_db_instances.get_or_insert(vec![]).extend(
ReservedDBInstanceListDeserializer::deserialize(
"ReservedDBInstances",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReservedDBInstancesOffering {
pub currency_code: Option<String>,
pub db_instance_class: Option<String>,
pub duration: Option<i64>,
pub fixed_price: Option<f64>,
pub multi_az: Option<bool>,
pub offering_type: Option<String>,
pub product_description: Option<String>,
pub recurring_charges: Option<Vec<RecurringCharge>>,
pub reserved_db_instances_offering_id: Option<String>,
pub usage_price: Option<f64>,
}
struct ReservedDBInstancesOfferingDeserializer;
impl ReservedDBInstancesOfferingDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedDBInstancesOffering, XmlParseError> {
deserialize_elements::<_, ReservedDBInstancesOffering, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CurrencyCode" => {
obj.currency_code =
Some(StringDeserializer::deserialize("CurrencyCode", stack)?);
}
"DBInstanceClass" => {
obj.db_instance_class =
Some(StringDeserializer::deserialize("DBInstanceClass", stack)?);
}
"Duration" => {
obj.duration = Some(IntegerDeserializer::deserialize("Duration", stack)?);
}
"FixedPrice" => {
obj.fixed_price =
Some(DoubleDeserializer::deserialize("FixedPrice", stack)?);
}
"MultiAZ" => {
obj.multi_az = Some(BooleanDeserializer::deserialize("MultiAZ", stack)?);
}
"OfferingType" => {
obj.offering_type =
Some(StringDeserializer::deserialize("OfferingType", stack)?);
}
"ProductDescription" => {
obj.product_description = Some(StringDeserializer::deserialize(
"ProductDescription",
stack,
)?);
}
"RecurringCharges" => {
obj.recurring_charges.get_or_insert(vec![]).extend(
RecurringChargeListDeserializer::deserialize(
"RecurringCharges",
stack,
)?,
);
}
"ReservedDBInstancesOfferingId" => {
obj.reserved_db_instances_offering_id =
Some(StringDeserializer::deserialize(
"ReservedDBInstancesOfferingId",
stack,
)?);
}
"UsagePrice" => {
obj.usage_price =
Some(DoubleDeserializer::deserialize("UsagePrice", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ReservedDBInstancesOfferingListDeserializer;
impl ReservedDBInstancesOfferingListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ReservedDBInstancesOffering>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ReservedDBInstancesOffering" {
obj.push(ReservedDBInstancesOfferingDeserializer::deserialize(
"ReservedDBInstancesOffering",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReservedDBInstancesOfferingMessage {
pub marker: Option<String>,
pub reserved_db_instances_offerings: Option<Vec<ReservedDBInstancesOffering>>,
}
struct ReservedDBInstancesOfferingMessageDeserializer;
impl ReservedDBInstancesOfferingMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReservedDBInstancesOfferingMessage, XmlParseError> {
deserialize_elements::<_, ReservedDBInstancesOfferingMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"ReservedDBInstancesOfferings" => {
obj.reserved_db_instances_offerings
.get_or_insert(vec![])
.extend(ReservedDBInstancesOfferingListDeserializer::deserialize(
"ReservedDBInstancesOfferings",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResetDBClusterParameterGroupMessage {
pub db_cluster_parameter_group_name: String,
pub parameters: Option<Vec<Parameter>>,
pub reset_all_parameters: Option<bool>,
}
struct ResetDBClusterParameterGroupMessageSerializer;
impl ResetDBClusterParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResetDBClusterParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&obj.db_cluster_parameter_group_name,
);
if let Some(ref field_value) = obj.parameters {
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
field_value,
);
}
if let Some(ref field_value) = obj.reset_all_parameters {
params.put(&format!("{}{}", prefix, "ResetAllParameters"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResetDBParameterGroupMessage {
pub db_parameter_group_name: String,
pub parameters: Option<Vec<Parameter>>,
pub reset_all_parameters: Option<bool>,
}
struct ResetDBParameterGroupMessageSerializer;
impl ResetDBParameterGroupMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ResetDBParameterGroupMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&obj.db_parameter_group_name,
);
if let Some(ref field_value) = obj.parameters {
ParametersListSerializer::serialize(
params,
&format!("{}{}", prefix, "Parameter"),
field_value,
);
}
if let Some(ref field_value) = obj.reset_all_parameters {
params.put(&format!("{}{}", prefix, "ResetAllParameters"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourcePendingMaintenanceActions {
pub pending_maintenance_action_details: Option<Vec<PendingMaintenanceAction>>,
pub resource_identifier: Option<String>,
}
struct ResourcePendingMaintenanceActionsDeserializer;
impl ResourcePendingMaintenanceActionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourcePendingMaintenanceActions, XmlParseError> {
deserialize_elements::<_, ResourcePendingMaintenanceActions, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"PendingMaintenanceActionDetails" => {
obj.pending_maintenance_action_details
.get_or_insert(vec![])
.extend(PendingMaintenanceActionDetailsDeserializer::deserialize(
"PendingMaintenanceActionDetails",
stack,
)?);
}
"ResourceIdentifier" => {
obj.resource_identifier = Some(StringDeserializer::deserialize(
"ResourceIdentifier",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreDBClusterFromS3Message {
pub availability_zones: Option<Vec<String>>,
pub backtrack_window: Option<i64>,
pub backup_retention_period: Option<i64>,
pub character_set_name: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub database_name: Option<String>,
pub deletion_protection: Option<bool>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub engine: String,
pub engine_version: Option<String>,
pub kms_key_id: Option<String>,
pub master_user_password: String,
pub master_username: String,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub s3_bucket_name: String,
pub s3_ingestion_role_arn: String,
pub s3_prefix: Option<String>,
pub source_engine: String,
pub source_engine_version: String,
pub storage_encrypted: Option<bool>,
pub tags: Option<Vec<Tag>>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreDBClusterFromS3MessageSerializer;
impl RestoreDBClusterFromS3MessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreDBClusterFromS3Message) {
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.backtrack_window {
params.put(&format!("{}{}", prefix, "BacktrackWindow"), &field_value);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.character_set_name {
params.put(&format!("{}{}", prefix, "CharacterSetName"), &field_value);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.database_name {
params.put(&format!("{}{}", prefix, "DatabaseName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
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);
}
params.put(
&format!("{}{}", prefix, "MasterUserPassword"),
&obj.master_user_password,
);
params.put(
&format!("{}{}", prefix, "MasterUsername"),
&obj.master_username,
);
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.preferred_backup_window {
params.put(
&format!("{}{}", prefix, "PreferredBackupWindow"),
&field_value,
);
}
if let Some(ref field_value) = obj.preferred_maintenance_window {
params.put(
&format!("{}{}", prefix, "PreferredMaintenanceWindow"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "S3BucketName"),
&obj.s3_bucket_name,
);
params.put(
&format!("{}{}", prefix, "S3IngestionRoleArn"),
&obj.s3_ingestion_role_arn,
);
if let Some(ref field_value) = obj.s3_prefix {
params.put(&format!("{}{}", prefix, "S3Prefix"), &field_value);
}
params.put(&format!("{}{}", prefix, "SourceEngine"), &obj.source_engine);
params.put(
&format!("{}{}", prefix, "SourceEngineVersion"),
&obj.source_engine_version,
);
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 RestoreDBClusterFromS3Result {
pub db_cluster: Option<DBCluster>,
}
struct RestoreDBClusterFromS3ResultDeserializer;
impl RestoreDBClusterFromS3ResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreDBClusterFromS3Result, XmlParseError> {
deserialize_elements::<_, RestoreDBClusterFromS3Result, _>(
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 RestoreDBClusterFromSnapshotMessage {
pub availability_zones: Option<Vec<String>>,
pub backtrack_window: Option<i64>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub database_name: Option<String>,
pub deletion_protection: Option<bool>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub engine: String,
pub engine_mode: Option<String>,
pub engine_version: Option<String>,
pub kms_key_id: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub scaling_configuration: Option<ScalingConfiguration>,
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,
);
}
if let Some(ref field_value) = obj.backtrack_window {
params.put(&format!("{}{}", prefix, "BacktrackWindow"), &field_value);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
if let Some(ref field_value) = obj.db_cluster_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBClusterParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.database_name {
params.put(&format!("{}{}", prefix, "DatabaseName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_mode {
params.put(&format!("{}{}", prefix, "EngineMode"), &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.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.scaling_configuration {
ScalingConfigurationSerializer::serialize(
params,
&format!("{}{}", prefix, "ScalingConfiguration"),
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 backtrack_window: Option<i64>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_cluster_identifier: String,
pub db_cluster_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub kms_key_id: Option<String>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub restore_to_time: Option<String>,
pub restore_type: Option<String>,
pub source_db_cluster_identifier: String,
pub tags: Option<Vec<Tag>>,
pub use_latest_restorable_time: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreDBClusterToPointInTimeMessageSerializer;
impl RestoreDBClusterToPointInTimeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreDBClusterToPointInTimeMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.backtrack_window {
params.put(&format!("{}{}", prefix, "BacktrackWindow"), &field_value);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &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.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.restore_to_time {
params.put(&format!("{}{}", prefix, "RestoreToTime"), &field_value);
}
if let Some(ref field_value) = obj.restore_type {
params.put(&format!("{}{}", prefix, "RestoreType"), &field_value);
}
params.put(
&format!("{}{}", prefix, "SourceDBClusterIdentifier"),
&obj.source_db_cluster_identifier,
);
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.use_latest_restorable_time {
params.put(
&format!("{}{}", prefix, "UseLatestRestorableTime"),
&field_value,
);
}
if let Some(ref field_value) = obj.vpc_security_group_ids {
VpcSecurityGroupIdListSerializer::serialize(
params,
&format!("{}{}", prefix, "VpcSecurityGroupId"),
field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreDBClusterToPointInTimeResult {
pub db_cluster: Option<DBCluster>,
}
struct RestoreDBClusterToPointInTimeResultDeserializer;
impl RestoreDBClusterToPointInTimeResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreDBClusterToPointInTimeResult, XmlParseError> {
deserialize_elements::<_, RestoreDBClusterToPointInTimeResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBCluster" => {
obj.db_cluster =
Some(DBClusterDeserializer::deserialize("DBCluster", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RestoreDBInstanceFromDBSnapshotMessage {
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_instance_class: Option<String>,
pub db_instance_identifier: String,
pub db_name: Option<String>,
pub db_parameter_group_name: Option<String>,
pub db_snapshot_identifier: String,
pub db_subnet_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub domain: Option<String>,
pub domain_iam_role_name: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub engine: Option<String>,
pub iops: Option<i64>,
pub license_model: Option<String>,
pub multi_az: Option<bool>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub publicly_accessible: Option<bool>,
pub storage_type: Option<String>,
pub tags: Option<Vec<Tag>>,
pub tde_credential_arn: Option<String>,
pub tde_credential_password: Option<String>,
pub use_default_processor_features: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreDBInstanceFromDBSnapshotMessageSerializer;
impl RestoreDBInstanceFromDBSnapshotMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreDBInstanceFromDBSnapshotMessage) {
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);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
if let Some(ref field_value) = obj.db_instance_class {
params.put(&format!("{}{}", prefix, "DBInstanceClass"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.db_name {
params.put(&format!("{}{}", prefix, "DBName"), &field_value);
}
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&obj.db_snapshot_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.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.domain {
params.put(&format!("{}{}", prefix, "Domain"), &field_value);
}
if let Some(ref field_value) = obj.domain_iam_role_name {
params.put(&format!("{}{}", prefix, "DomainIAMRoleName"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.engine {
params.put(&format!("{}{}", prefix, "Engine"), &field_value);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &field_value);
}
if let Some(ref field_value) = obj.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.processor_features {
ProcessorFeatureListSerializer::serialize(
params,
&format!("{}{}", prefix, "ProcessorFeature"),
field_value,
);
}
if let Some(ref field_value) = obj.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.tde_credential_arn {
params.put(&format!("{}{}", prefix, "TdeCredentialArn"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_password {
params.put(
&format!("{}{}", prefix, "TdeCredentialPassword"),
&field_value,
);
}
if let Some(ref field_value) = obj.use_default_processor_features {
params.put(
&format!("{}{}", prefix, "UseDefaultProcessorFeatures"),
&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 RestoreDBInstanceFromDBSnapshotResult {
pub db_instance: Option<DBInstance>,
}
struct RestoreDBInstanceFromDBSnapshotResultDeserializer;
impl RestoreDBInstanceFromDBSnapshotResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreDBInstanceFromDBSnapshotResult, XmlParseError> {
deserialize_elements::<_, RestoreDBInstanceFromDBSnapshotResult, _>(
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 RestoreDBInstanceFromS3Message {
pub allocated_storage: Option<i64>,
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub backup_retention_period: Option<i64>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_instance_class: String,
pub db_instance_identifier: String,
pub db_name: Option<String>,
pub db_parameter_group_name: Option<String>,
pub db_security_groups: Option<Vec<String>>,
pub db_subnet_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub enable_performance_insights: Option<bool>,
pub engine: String,
pub engine_version: Option<String>,
pub iops: Option<i64>,
pub kms_key_id: Option<String>,
pub license_model: Option<String>,
pub master_user_password: Option<String>,
pub master_username: Option<String>,
pub monitoring_interval: Option<i64>,
pub monitoring_role_arn: Option<String>,
pub multi_az: Option<bool>,
pub option_group_name: Option<String>,
pub performance_insights_kms_key_id: Option<String>,
pub performance_insights_retention_period: Option<i64>,
pub port: Option<i64>,
pub preferred_backup_window: Option<String>,
pub preferred_maintenance_window: Option<String>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub publicly_accessible: Option<bool>,
pub s3_bucket_name: String,
pub s3_ingestion_role_arn: String,
pub s3_prefix: Option<String>,
pub source_engine: String,
pub source_engine_version: String,
pub storage_encrypted: Option<bool>,
pub storage_type: Option<String>,
pub tags: Option<Vec<Tag>>,
pub use_default_processor_features: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreDBInstanceFromS3MessageSerializer;
impl RestoreDBInstanceFromS3MessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreDBInstanceFromS3Message) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.allocated_storage {
params.put(&format!("{}{}", prefix, "AllocatedStorage"), &field_value);
}
if let Some(ref field_value) = obj.auto_minor_version_upgrade {
params.put(
&format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
&field_value,
);
}
if let Some(ref field_value) = obj.availability_zone {
params.put(&format!("{}{}", prefix, "AvailabilityZone"), &field_value);
}
if let Some(ref field_value) = obj.backup_retention_period {
params.put(
&format!("{}{}", prefix, "BackupRetentionPeriod"),
&field_value,
);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBInstanceClass"),
&obj.db_instance_class,
);
params.put(
&format!("{}{}", prefix, "DBInstanceIdentifier"),
&obj.db_instance_identifier,
);
if let Some(ref field_value) = obj.db_name {
params.put(&format!("{}{}", prefix, "DBName"), &field_value);
}
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_security_groups {
DBSecurityGroupNameListSerializer::serialize(
params,
&format!("{}{}", prefix, "DBSecurityGroupName"),
field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.enable_performance_insights {
params.put(
&format!("{}{}", prefix, "EnablePerformanceInsights"),
&field_value,
);
}
params.put(&format!("{}{}", prefix, "Engine"), &obj.engine);
if let Some(ref field_value) = obj.engine_version {
params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &field_value);
}
if let Some(ref field_value) = obj.kms_key_id {
params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
}
if let Some(ref field_value) = obj.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &field_value);
}
if let Some(ref field_value) = obj.master_user_password {
params.put(&format!("{}{}", prefix, "MasterUserPassword"), &field_value);
}
if let Some(ref field_value) = obj.master_username {
params.put(&format!("{}{}", prefix, "MasterUsername"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_interval {
params.put(&format!("{}{}", prefix, "MonitoringInterval"), &field_value);
}
if let Some(ref field_value) = obj.monitoring_role_arn {
params.put(&format!("{}{}", prefix, "MonitoringRoleArn"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.performance_insights_kms_key_id {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsKMSKeyId"),
&field_value,
);
}
if let Some(ref field_value) = obj.performance_insights_retention_period {
params.put(
&format!("{}{}", prefix, "PerformanceInsightsRetentionPeriod"),
&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.processor_features {
ProcessorFeatureListSerializer::serialize(
params,
&format!("{}{}", prefix, "ProcessorFeature"),
field_value,
);
}
if let Some(ref field_value) = obj.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
params.put(
&format!("{}{}", prefix, "S3BucketName"),
&obj.s3_bucket_name,
);
params.put(
&format!("{}{}", prefix, "S3IngestionRoleArn"),
&obj.s3_ingestion_role_arn,
);
if let Some(ref field_value) = obj.s3_prefix {
params.put(&format!("{}{}", prefix, "S3Prefix"), &field_value);
}
params.put(&format!("{}{}", prefix, "SourceEngine"), &obj.source_engine);
params.put(
&format!("{}{}", prefix, "SourceEngineVersion"),
&obj.source_engine_version,
);
if let Some(ref field_value) = obj.storage_encrypted {
params.put(&format!("{}{}", prefix, "StorageEncrypted"), &field_value);
}
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
if let Some(ref field_value) = obj.use_default_processor_features {
params.put(
&format!("{}{}", prefix, "UseDefaultProcessorFeatures"),
&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 RestoreDBInstanceFromS3Result {
pub db_instance: Option<DBInstance>,
}
struct RestoreDBInstanceFromS3ResultDeserializer;
impl RestoreDBInstanceFromS3ResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreDBInstanceFromS3Result, XmlParseError> {
deserialize_elements::<_, RestoreDBInstanceFromS3Result, _>(
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 RestoreDBInstanceToPointInTimeMessage {
pub auto_minor_version_upgrade: Option<bool>,
pub availability_zone: Option<String>,
pub copy_tags_to_snapshot: Option<bool>,
pub db_instance_class: Option<String>,
pub db_name: Option<String>,
pub db_parameter_group_name: Option<String>,
pub db_subnet_group_name: Option<String>,
pub deletion_protection: Option<bool>,
pub domain: Option<String>,
pub domain_iam_role_name: Option<String>,
pub enable_cloudwatch_logs_exports: Option<Vec<String>>,
pub enable_iam_database_authentication: Option<bool>,
pub engine: Option<String>,
pub iops: Option<i64>,
pub license_model: Option<String>,
pub multi_az: Option<bool>,
pub option_group_name: Option<String>,
pub port: Option<i64>,
pub processor_features: Option<Vec<ProcessorFeature>>,
pub publicly_accessible: Option<bool>,
pub restore_time: Option<String>,
pub source_db_instance_identifier: Option<String>,
pub source_dbi_resource_id: Option<String>,
pub storage_type: Option<String>,
pub tags: Option<Vec<Tag>>,
pub target_db_instance_identifier: String,
pub tde_credential_arn: Option<String>,
pub tde_credential_password: Option<String>,
pub use_default_processor_features: Option<bool>,
pub use_latest_restorable_time: Option<bool>,
pub vpc_security_group_ids: Option<Vec<String>>,
}
struct RestoreDBInstanceToPointInTimeMessageSerializer;
impl RestoreDBInstanceToPointInTimeMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RestoreDBInstanceToPointInTimeMessage) {
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);
}
if let Some(ref field_value) = obj.copy_tags_to_snapshot {
params.put(&format!("{}{}", prefix, "CopyTagsToSnapshot"), &field_value);
}
if let Some(ref field_value) = obj.db_instance_class {
params.put(&format!("{}{}", prefix, "DBInstanceClass"), &field_value);
}
if let Some(ref field_value) = obj.db_name {
params.put(&format!("{}{}", prefix, "DBName"), &field_value);
}
if let Some(ref field_value) = obj.db_parameter_group_name {
params.put(
&format!("{}{}", prefix, "DBParameterGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.db_subnet_group_name {
params.put(&format!("{}{}", prefix, "DBSubnetGroupName"), &field_value);
}
if let Some(ref field_value) = obj.deletion_protection {
params.put(&format!("{}{}", prefix, "DeletionProtection"), &field_value);
}
if let Some(ref field_value) = obj.domain {
params.put(&format!("{}{}", prefix, "Domain"), &field_value);
}
if let Some(ref field_value) = obj.domain_iam_role_name {
params.put(&format!("{}{}", prefix, "DomainIAMRoleName"), &field_value);
}
if let Some(ref field_value) = obj.enable_cloudwatch_logs_exports {
LogTypeListSerializer::serialize(
params,
&format!("{}{}", prefix, "EnableCloudwatchLogsExports"),
field_value,
);
}
if let Some(ref field_value) = obj.enable_iam_database_authentication {
params.put(
&format!("{}{}", prefix, "EnableIAMDatabaseAuthentication"),
&field_value,
);
}
if let Some(ref field_value) = obj.engine {
params.put(&format!("{}{}", prefix, "Engine"), &field_value);
}
if let Some(ref field_value) = obj.iops {
params.put(&format!("{}{}", prefix, "Iops"), &field_value);
}
if let Some(ref field_value) = obj.license_model {
params.put(&format!("{}{}", prefix, "LicenseModel"), &field_value);
}
if let Some(ref field_value) = obj.multi_az {
params.put(&format!("{}{}", prefix, "MultiAZ"), &field_value);
}
if let Some(ref field_value) = obj.option_group_name {
params.put(&format!("{}{}", prefix, "OptionGroupName"), &field_value);
}
if let Some(ref field_value) = obj.port {
params.put(&format!("{}{}", prefix, "Port"), &field_value);
}
if let Some(ref field_value) = obj.processor_features {
ProcessorFeatureListSerializer::serialize(
params,
&format!("{}{}", prefix, "ProcessorFeature"),
field_value,
);
}
if let Some(ref field_value) = obj.publicly_accessible {
params.put(&format!("{}{}", prefix, "PubliclyAccessible"), &field_value);
}
if let Some(ref field_value) = obj.restore_time {
params.put(&format!("{}{}", prefix, "RestoreTime"), &field_value);
}
if let Some(ref field_value) = obj.source_db_instance_identifier {
params.put(
&format!("{}{}", prefix, "SourceDBInstanceIdentifier"),
&field_value,
);
}
if let Some(ref field_value) = obj.source_dbi_resource_id {
params.put(
&format!("{}{}", prefix, "SourceDbiResourceId"),
&field_value,
);
}
if let Some(ref field_value) = obj.storage_type {
params.put(&format!("{}{}", prefix, "StorageType"), &field_value);
}
if let Some(ref field_value) = obj.tags {
TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
}
params.put(
&format!("{}{}", prefix, "TargetDBInstanceIdentifier"),
&obj.target_db_instance_identifier,
);
if let Some(ref field_value) = obj.tde_credential_arn {
params.put(&format!("{}{}", prefix, "TdeCredentialArn"), &field_value);
}
if let Some(ref field_value) = obj.tde_credential_password {
params.put(
&format!("{}{}", prefix, "TdeCredentialPassword"),
&field_value,
);
}
if let Some(ref field_value) = obj.use_default_processor_features {
params.put(
&format!("{}{}", prefix, "UseDefaultProcessorFeatures"),
&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 RestoreDBInstanceToPointInTimeResult {
pub db_instance: Option<DBInstance>,
}
struct RestoreDBInstanceToPointInTimeResultDeserializer;
impl RestoreDBInstanceToPointInTimeResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreDBInstanceToPointInTimeResult, XmlParseError> {
deserialize_elements::<_, RestoreDBInstanceToPointInTimeResult, _>(
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 RestoreWindow {
pub earliest_time: Option<String>,
pub latest_time: Option<String>,
}
struct RestoreWindowDeserializer;
impl RestoreWindowDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RestoreWindow, XmlParseError> {
deserialize_elements::<_, RestoreWindow, _>(tag_name, stack, |name, stack, obj| {
match name {
"EarliestTime" => {
obj.earliest_time =
Some(TStampDeserializer::deserialize("EarliestTime", stack)?);
}
"LatestTime" => {
obj.latest_time = Some(TStampDeserializer::deserialize("LatestTime", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RevokeDBSecurityGroupIngressMessage {
pub cidrip: Option<String>,
pub db_security_group_name: String,
pub ec2_security_group_id: Option<String>,
pub ec2_security_group_name: Option<String>,
pub ec2_security_group_owner_id: Option<String>,
}
struct RevokeDBSecurityGroupIngressMessageSerializer;
impl RevokeDBSecurityGroupIngressMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &RevokeDBSecurityGroupIngressMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.cidrip {
params.put(&format!("{}{}", prefix, "CIDRIP"), &field_value);
}
params.put(
&format!("{}{}", prefix, "DBSecurityGroupName"),
&obj.db_security_group_name,
);
if let Some(ref field_value) = obj.ec2_security_group_id {
params.put(&format!("{}{}", prefix, "EC2SecurityGroupId"), &field_value);
}
if let Some(ref field_value) = obj.ec2_security_group_name {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupName"),
&field_value,
);
}
if let Some(ref field_value) = obj.ec2_security_group_owner_id {
params.put(
&format!("{}{}", prefix, "EC2SecurityGroupOwnerId"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct RevokeDBSecurityGroupIngressResult {
pub db_security_group: Option<DBSecurityGroup>,
}
struct RevokeDBSecurityGroupIngressResultDeserializer;
impl RevokeDBSecurityGroupIngressResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<RevokeDBSecurityGroupIngressResult, XmlParseError> {
deserialize_elements::<_, RevokeDBSecurityGroupIngressResult, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DBSecurityGroup" => {
obj.db_security_group = Some(DBSecurityGroupDeserializer::deserialize(
"DBSecurityGroup",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ScalingConfiguration {
pub auto_pause: Option<bool>,
pub max_capacity: Option<i64>,
pub min_capacity: Option<i64>,
pub seconds_until_auto_pause: Option<i64>,
pub timeout_action: Option<String>,
}
struct ScalingConfigurationSerializer;
impl ScalingConfigurationSerializer {
fn serialize(params: &mut Params, name: &str, obj: &ScalingConfiguration) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.auto_pause {
params.put(&format!("{}{}", prefix, "AutoPause"), &field_value);
}
if let Some(ref field_value) = obj.max_capacity {
params.put(&format!("{}{}", prefix, "MaxCapacity"), &field_value);
}
if let Some(ref field_value) = obj.min_capacity {
params.put(&format!("{}{}", prefix, "MinCapacity"), &field_value);
}
if let Some(ref field_value) = obj.seconds_until_auto_pause {
params.put(
&format!("{}{}", prefix, "SecondsUntilAutoPause"),
&field_value,
);
}
if let Some(ref field_value) = obj.timeout_action {
params.put(&format!("{}{}", prefix, "TimeoutAction"), &field_value);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ScalingConfigurationInfo {
pub auto_pause: Option<bool>,
pub max_capacity: Option<i64>,
pub min_capacity: Option<i64>,
pub seconds_until_auto_pause: Option<i64>,
pub timeout_action: Option<String>,
}
struct ScalingConfigurationInfoDeserializer;
impl ScalingConfigurationInfoDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ScalingConfigurationInfo, XmlParseError> {
deserialize_elements::<_, ScalingConfigurationInfo, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"AutoPause" => {
obj.auto_pause = Some(BooleanOptionalDeserializer::deserialize(
"AutoPause",
stack,
)?);
}
"MaxCapacity" => {
obj.max_capacity = Some(IntegerOptionalDeserializer::deserialize(
"MaxCapacity",
stack,
)?);
}
"MinCapacity" => {
obj.min_capacity = Some(IntegerOptionalDeserializer::deserialize(
"MinCapacity",
stack,
)?);
}
"SecondsUntilAutoPause" => {
obj.seconds_until_auto_pause =
Some(IntegerOptionalDeserializer::deserialize(
"SecondsUntilAutoPause",
stack,
)?);
}
"TimeoutAction" => {
obj.timeout_action =
Some(StringDeserializer::deserialize("TimeoutAction", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct SourceIdsListDeserializer;
impl SourceIdsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SourceId" {
obj.push(StringDeserializer::deserialize("SourceId", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SourceIdsListSerializer;
impl SourceIdsListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SourceRegion {
pub endpoint: Option<String>,
pub region_name: Option<String>,
pub status: Option<String>,
}
struct SourceRegionDeserializer;
impl SourceRegionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SourceRegion, XmlParseError> {
deserialize_elements::<_, SourceRegion, _>(tag_name, stack, |name, stack, obj| {
match name {
"Endpoint" => {
obj.endpoint = Some(StringDeserializer::deserialize("Endpoint", stack)?);
}
"RegionName" => {
obj.region_name = Some(StringDeserializer::deserialize("RegionName", stack)?);
}
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SourceRegionListDeserializer;
impl SourceRegionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<SourceRegion>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "SourceRegion" {
obj.push(SourceRegionDeserializer::deserialize(
"SourceRegion",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SourceRegionMessage {
pub marker: Option<String>,
pub source_regions: Option<Vec<SourceRegion>>,
}
struct SourceRegionMessageDeserializer;
impl SourceRegionMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<SourceRegionMessage, XmlParseError> {
deserialize_elements::<_, SourceRegionMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"Marker" => {
obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
}
"SourceRegions" => {
obj.source_regions.get_or_insert(vec![]).extend(
SourceRegionListDeserializer::deserialize("SourceRegions", 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)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StartActivityStreamRequest {
pub apply_immediately: Option<bool>,
pub kms_key_id: String,
pub mode: String,
pub resource_arn: String,
}
struct StartActivityStreamRequestSerializer;
impl StartActivityStreamRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StartActivityStreamRequest) {
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);
}
params.put(&format!("{}{}", prefix, "KmsKeyId"), &obj.kms_key_id);
params.put(&format!("{}{}", prefix, "Mode"), &obj.mode);
params.put(&format!("{}{}", prefix, "ResourceArn"), &obj.resource_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StartActivityStreamResponse {
pub apply_immediately: Option<bool>,
pub kinesis_stream_name: Option<String>,
pub kms_key_id: Option<String>,
pub mode: Option<String>,
pub status: Option<String>,
}
struct StartActivityStreamResponseDeserializer;
impl StartActivityStreamResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StartActivityStreamResponse, XmlParseError> {
deserialize_elements::<_, StartActivityStreamResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ApplyImmediately" => {
obj.apply_immediately =
Some(BooleanDeserializer::deserialize("ApplyImmediately", stack)?);
}
"KinesisStreamName" => {
obj.kinesis_stream_name =
Some(StringDeserializer::deserialize("KinesisStreamName", stack)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"Mode" => {
obj.mode =
Some(ActivityStreamModeDeserializer::deserialize("Mode", stack)?);
}
"Status" => {
obj.status = Some(ActivityStreamStatusDeserializer::deserialize(
"Status", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StartDBClusterMessage {
pub db_cluster_identifier: String,
}
struct StartDBClusterMessageSerializer;
impl StartDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StartDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StartDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct StartDBClusterResultDeserializer;
impl StartDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StartDBClusterResult, XmlParseError> {
deserialize_elements::<_, StartDBClusterResult, _>(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 StartDBInstanceMessage {
pub db_instance_identifier: String,
}
struct StartDBInstanceMessageSerializer;
impl StartDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StartDBInstanceMessage) {
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 StartDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct StartDBInstanceResultDeserializer;
impl StartDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StartDBInstanceResult, XmlParseError> {
deserialize_elements::<_, StartDBInstanceResult, _>(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 StopActivityStreamRequest {
pub apply_immediately: Option<bool>,
pub resource_arn: String,
}
struct StopActivityStreamRequestSerializer;
impl StopActivityStreamRequestSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StopActivityStreamRequest) {
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);
}
params.put(&format!("{}{}", prefix, "ResourceArn"), &obj.resource_arn);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StopActivityStreamResponse {
pub kinesis_stream_name: Option<String>,
pub kms_key_id: Option<String>,
pub status: Option<String>,
}
struct StopActivityStreamResponseDeserializer;
impl StopActivityStreamResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StopActivityStreamResponse, XmlParseError> {
deserialize_elements::<_, StopActivityStreamResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"KinesisStreamName" => {
obj.kinesis_stream_name =
Some(StringDeserializer::deserialize("KinesisStreamName", stack)?);
}
"KmsKeyId" => {
obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
}
"Status" => {
obj.status = Some(ActivityStreamStatusDeserializer::deserialize(
"Status", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StopDBClusterMessage {
pub db_cluster_identifier: String,
}
struct StopDBClusterMessageSerializer;
impl StopDBClusterMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StopDBClusterMessage) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
params.put(
&format!("{}{}", prefix, "DBClusterIdentifier"),
&obj.db_cluster_identifier,
);
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StopDBClusterResult {
pub db_cluster: Option<DBCluster>,
}
struct StopDBClusterResultDeserializer;
impl StopDBClusterResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StopDBClusterResult, XmlParseError> {
deserialize_elements::<_, StopDBClusterResult, _>(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 StopDBInstanceMessage {
pub db_instance_identifier: String,
pub db_snapshot_identifier: Option<String>,
}
struct StopDBInstanceMessageSerializer;
impl StopDBInstanceMessageSerializer {
fn serialize(params: &mut Params, name: &str, obj: &StopDBInstanceMessage) {
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.db_snapshot_identifier {
params.put(
&format!("{}{}", prefix, "DBSnapshotIdentifier"),
&field_value,
);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StopDBInstanceResult {
pub db_instance: Option<DBInstance>,
}
struct StopDBInstanceResultDeserializer;
impl StopDBInstanceResultDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StopDBInstanceResult, XmlParseError> {
deserialize_elements::<_, StopDBInstanceResult, _>(tag_name, stack, |name, stack, obj| {
match name {
"DBInstance" => {
obj.db_instance =
Some(DBInstanceDeserializer::deserialize("DBInstance", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct StringDeserializer;
impl StringDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct StringListDeserializer;
impl StringListDeserializer {
#[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 StringListSerializer;
impl StringListSerializer {
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 Subnet {
pub subnet_availability_zone: Option<AvailabilityZone>,
pub subnet_identifier: Option<String>,
pub subnet_status: Option<String>,
}
struct SubnetDeserializer;
impl SubnetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Subnet, XmlParseError> {
deserialize_elements::<_, Subnet, _>(tag_name, stack, |name, stack, obj| {
match name {
"SubnetAvailabilityZone" => {
obj.subnet_availability_zone = Some(AvailabilityZoneDeserializer::deserialize(
"SubnetAvailabilityZone",
stack,
)?);
}
"SubnetIdentifier" => {
obj.subnet_identifier =
Some(StringDeserializer::deserialize("SubnetIdentifier", stack)?);
}
"SubnetStatus" => {
obj.subnet_status =
Some(StringDeserializer::deserialize("SubnetStatus", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct SubnetIdentifierListSerializer;
impl SubnetIdentifierListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
struct SubnetListDeserializer;
impl SubnetListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Subnet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Subnet" {
obj.push(SubnetDeserializer::deserialize("Subnet", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SupportedCharacterSetsListDeserializer;
impl SupportedCharacterSetsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<CharacterSet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "CharacterSet" {
obj.push(CharacterSetDeserializer::deserialize(
"CharacterSet",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct SupportedTimezonesListDeserializer;
impl SupportedTimezonesListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Timezone>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Timezone" {
obj.push(TimezoneDeserializer::deserialize("Timezone", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TStampDeserializer;
impl TStampDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Tag {
pub key: Option<String>,
pub value: Option<String>,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = Some(StringDeserializer::deserialize("Key", stack)?);
}
"Value" => {
obj.value = Some(StringDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TagSerializer;
impl TagSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Tag) {
let mut prefix = name.to_string();
if prefix != "" {
prefix.push_str(".");
}
if let Some(ref field_value) = obj.key {
params.put(&format!("{}{}", prefix, "Key"), &field_value);
}
if let Some(ref field_value) = obj.value {
params.put(&format!("{}{}", prefix, "Value"), &field_value);
}
}
}
struct TagListDeserializer;
impl TagListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Tag>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Tag" {
obj.push(TagDeserializer::deserialize("Tag", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TagListSerializer;
impl TagListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
TagSerializer::serialize(params, &key, obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TagListMessage {
pub tag_list: Option<Vec<Tag>>,
}
struct TagListMessageDeserializer;
impl TagListMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TagListMessage, XmlParseError> {
deserialize_elements::<_, TagListMessage, _>(tag_name, stack, |name, stack, obj| {
match name {
"TagList" => {
obj.tag_list
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("TagList", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Timezone {
pub timezone_name: Option<String>,
}
struct TimezoneDeserializer;
impl TimezoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Timezone, XmlParseError> {
deserialize_elements::<_, Timezone, _>(tag_name, stack, |name, stack, obj| {
match name {
"TimezoneName" => {
obj.timezone_name =
Some(StringDeserializer::deserialize("TimezoneName", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpgradeTarget {
pub auto_upgrade: Option<bool>,
pub description: Option<String>,
pub engine: Option<String>,
pub engine_version: Option<String>,
pub is_major_version_upgrade: Option<bool>,
}
struct UpgradeTargetDeserializer;
impl UpgradeTargetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpgradeTarget, XmlParseError> {
deserialize_elements::<_, UpgradeTarget, _>(tag_name, stack, |name, stack, obj| {
match name {
"AutoUpgrade" => {
obj.auto_upgrade =
Some(BooleanDeserializer::deserialize("AutoUpgrade", stack)?);
}
"Description" => {
obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
}
"Engine" => {
obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
}
"EngineVersion" => {
obj.engine_version =
Some(StringDeserializer::deserialize("EngineVersion", stack)?);
}
"IsMajorVersionUpgrade" => {
obj.is_major_version_upgrade = Some(BooleanDeserializer::deserialize(
"IsMajorVersionUpgrade",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ValidDBInstanceModificationsMessage {
pub storage: Option<Vec<ValidStorageOptions>>,
pub valid_processor_features: Option<Vec<AvailableProcessorFeature>>,
}
struct ValidDBInstanceModificationsMessageDeserializer;
impl ValidDBInstanceModificationsMessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ValidDBInstanceModificationsMessage, XmlParseError> {
deserialize_elements::<_, ValidDBInstanceModificationsMessage, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Storage" => {
obj.storage.get_or_insert(vec![]).extend(
ValidStorageOptionsListDeserializer::deserialize("Storage", stack)?,
);
}
"ValidProcessorFeatures" => {
obj.valid_processor_features.get_or_insert(vec![]).extend(
AvailableProcessorFeatureListDeserializer::deserialize(
"ValidProcessorFeatures",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ValidStorageOptions {
pub iops_to_storage_ratio: Option<Vec<DoubleRange>>,
pub provisioned_iops: Option<Vec<Range>>,
pub storage_size: Option<Vec<Range>>,
pub storage_type: Option<String>,
}
struct ValidStorageOptionsDeserializer;
impl ValidStorageOptionsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ValidStorageOptions, XmlParseError> {
deserialize_elements::<_, ValidStorageOptions, _>(tag_name, stack, |name, stack, obj| {
match name {
"IopsToStorageRatio" => {
obj.iops_to_storage_ratio.get_or_insert(vec![]).extend(
DoubleRangeListDeserializer::deserialize("IopsToStorageRatio", stack)?,
);
}
"ProvisionedIops" => {
obj.provisioned_iops.get_or_insert(vec![]).extend(
RangeListDeserializer::deserialize("ProvisionedIops", stack)?,
);
}
"StorageSize" => {
obj.storage_size
.get_or_insert(vec![])
.extend(RangeListDeserializer::deserialize("StorageSize", stack)?);
}
"StorageType" => {
obj.storage_type = Some(StringDeserializer::deserialize("StorageType", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ValidStorageOptionsListDeserializer;
impl ValidStorageOptionsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ValidStorageOptions>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ValidStorageOptions" {
obj.push(ValidStorageOptionsDeserializer::deserialize(
"ValidStorageOptions",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ValidUpgradeTargetListDeserializer;
impl ValidUpgradeTargetListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<UpgradeTarget>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "UpgradeTarget" {
obj.push(UpgradeTargetDeserializer::deserialize(
"UpgradeTarget",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct VpcSecurityGroupIdListSerializer;
impl VpcSecurityGroupIdListSerializer {
fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
for (index, obj) in obj.iter().enumerate() {
let key = format!("{}.member.{}", name, index + 1);
params.put(&key, &obj);
}
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VpcSecurityGroupMembership {
pub status: Option<String>,
pub vpc_security_group_id: Option<String>,
}
struct VpcSecurityGroupMembershipDeserializer;
impl VpcSecurityGroupMembershipDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<VpcSecurityGroupMembership, XmlParseError> {
deserialize_elements::<_, VpcSecurityGroupMembership, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Status" => {
obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
}
"VpcSecurityGroupId" => {
obj.vpc_security_group_id = Some(StringDeserializer::deserialize(
"VpcSecurityGroupId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct VpcSecurityGroupMembershipListDeserializer;
impl VpcSecurityGroupMembershipListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<VpcSecurityGroupMembership>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "VpcSecurityGroupMembership" {
obj.push(VpcSecurityGroupMembershipDeserializer::deserialize(
"VpcSecurityGroupMembership",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Debug, PartialEq)]
pub enum AddRoleToDBClusterError {
DBClusterNotFoundFault(String),
DBClusterRoleAlreadyExistsFault(String),
DBClusterRoleQuotaExceededFault(String),
InvalidDBClusterStateFault(String),
}
impl AddRoleToDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddRoleToDBClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
AddRoleToDBClusterError::DBClusterNotFoundFault(parsed_error.message),
)
}
"DBClusterRoleAlreadyExists" => {
return RusotoError::Service(
AddRoleToDBClusterError::DBClusterRoleAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterRoleQuotaExceeded" => {
return RusotoError::Service(
AddRoleToDBClusterError::DBClusterRoleQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
AddRoleToDBClusterError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for AddRoleToDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddRoleToDBClusterError {
fn description(&self) -> &str {
match *self {
AddRoleToDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
AddRoleToDBClusterError::DBClusterRoleAlreadyExistsFault(ref cause) => cause,
AddRoleToDBClusterError::DBClusterRoleQuotaExceededFault(ref cause) => cause,
AddRoleToDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddRoleToDBInstanceError {
DBInstanceNotFoundFault(String),
DBInstanceRoleAlreadyExistsFault(String),
DBInstanceRoleQuotaExceededFault(String),
InvalidDBInstanceStateFault(String),
}
impl AddRoleToDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddRoleToDBInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
AddRoleToDBInstanceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBInstanceRoleAlreadyExists" => {
return RusotoError::Service(
AddRoleToDBInstanceError::DBInstanceRoleAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBInstanceRoleQuotaExceeded" => {
return RusotoError::Service(
AddRoleToDBInstanceError::DBInstanceRoleQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
AddRoleToDBInstanceError::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 AddRoleToDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddRoleToDBInstanceError {
fn description(&self) -> &str {
match *self {
AddRoleToDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
AddRoleToDBInstanceError::DBInstanceRoleAlreadyExistsFault(ref cause) => cause,
AddRoleToDBInstanceError::DBInstanceRoleQuotaExceededFault(ref cause) => cause,
AddRoleToDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddSourceIdentifierToSubscriptionError {
SourceNotFoundFault(String),
SubscriptionNotFoundFault(String),
}
impl AddSourceIdentifierToSubscriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AddSourceIdentifierToSubscriptionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"SourceNotFound" => {
return RusotoError::Service(
AddSourceIdentifierToSubscriptionError::SourceNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
AddSourceIdentifierToSubscriptionError::SubscriptionNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for AddSourceIdentifierToSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddSourceIdentifierToSubscriptionError {
fn description(&self) -> &str {
match *self {
AddSourceIdentifierToSubscriptionError::SourceNotFoundFault(ref cause) => cause,
AddSourceIdentifierToSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddTagsToResourceError {
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
DBSnapshotNotFoundFault(String),
}
impl AddTagsToResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToResourceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
AddTagsToResourceError::DBClusterNotFoundFault(parsed_error.message),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
AddTagsToResourceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
AddTagsToResourceError::DBSnapshotNotFoundFault(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for AddTagsToResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddTagsToResourceError {
fn description(&self) -> &str {
match *self {
AddTagsToResourceError::DBClusterNotFoundFault(ref cause) => cause,
AddTagsToResourceError::DBInstanceNotFoundFault(ref cause) => cause,
AddTagsToResourceError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ApplyPendingMaintenanceActionError {
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
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[..] {
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
ApplyPendingMaintenanceActionError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
ApplyPendingMaintenanceActionError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"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::InvalidDBClusterStateFault(ref cause) => cause,
ApplyPendingMaintenanceActionError::InvalidDBInstanceStateFault(ref cause) => cause,
ApplyPendingMaintenanceActionError::ResourceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AuthorizeDBSecurityGroupIngressError {
AuthorizationAlreadyExistsFault(String),
AuthorizationQuotaExceededFault(String),
DBSecurityGroupNotFoundFault(String),
InvalidDBSecurityGroupStateFault(String),
}
impl AuthorizeDBSecurityGroupIngressError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AuthorizeDBSecurityGroupIngressError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AuthorizationAlreadyExists" => {
return RusotoError::Service(
AuthorizeDBSecurityGroupIngressError::AuthorizationAlreadyExistsFault(
parsed_error.message,
),
)
}
"AuthorizationQuotaExceeded" => {
return RusotoError::Service(
AuthorizeDBSecurityGroupIngressError::AuthorizationQuotaExceededFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
AuthorizeDBSecurityGroupIngressError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBSecurityGroupState" => {
return RusotoError::Service(
AuthorizeDBSecurityGroupIngressError::InvalidDBSecurityGroupStateFault(
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 AuthorizeDBSecurityGroupIngressError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AuthorizeDBSecurityGroupIngressError {
fn description(&self) -> &str {
match *self {
AuthorizeDBSecurityGroupIngressError::AuthorizationAlreadyExistsFault(ref cause) => {
cause
}
AuthorizeDBSecurityGroupIngressError::AuthorizationQuotaExceededFault(ref cause) => {
cause
}
AuthorizeDBSecurityGroupIngressError::DBSecurityGroupNotFoundFault(ref cause) => cause,
AuthorizeDBSecurityGroupIngressError::InvalidDBSecurityGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum BacktrackDBClusterError {
DBClusterNotFoundFault(String),
InvalidDBClusterStateFault(String),
}
impl BacktrackDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BacktrackDBClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
BacktrackDBClusterError::DBClusterNotFoundFault(parsed_error.message),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
BacktrackDBClusterError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for BacktrackDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BacktrackDBClusterError {
fn description(&self) -> &str {
match *self {
BacktrackDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
BacktrackDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyDBClusterParameterGroupError {
DBParameterGroupAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBParameterGroupQuotaExceededFault(String),
}
impl CopyDBClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CopyDBClusterParameterGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupAlreadyExists" => {
return RusotoError::Service(
CopyDBClusterParameterGroupError::DBParameterGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
CopyDBClusterParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBParameterGroupQuotaExceeded" => {
return RusotoError::Service(
CopyDBClusterParameterGroupError::DBParameterGroupQuotaExceededFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CopyDBClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyDBClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
CopyDBClusterParameterGroupError::DBParameterGroupAlreadyExistsFault(ref cause) => {
cause
}
CopyDBClusterParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
CopyDBClusterParameterGroupError::DBParameterGroupQuotaExceededFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyDBClusterSnapshotError {
DBClusterSnapshotAlreadyExistsFault(String),
DBClusterSnapshotNotFoundFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBClusterStateFault(String),
KMSKeyNotAccessibleFault(String),
SnapshotQuotaExceededFault(String),
}
impl CopyDBClusterSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyDBClusterSnapshotError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterSnapshotAlreadyExistsFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::DBClusterSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
CopyDBClusterSnapshotError::SnapshotQuotaExceededFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CopyDBClusterSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyDBClusterSnapshotError {
fn description(&self) -> &str {
match *self {
CopyDBClusterSnapshotError::DBClusterSnapshotAlreadyExistsFault(ref cause) => cause,
CopyDBClusterSnapshotError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
CopyDBClusterSnapshotError::InvalidDBClusterSnapshotStateFault(ref cause) => cause,
CopyDBClusterSnapshotError::InvalidDBClusterStateFault(ref cause) => cause,
CopyDBClusterSnapshotError::KMSKeyNotAccessibleFault(ref cause) => cause,
CopyDBClusterSnapshotError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyDBParameterGroupError {
DBParameterGroupAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBParameterGroupQuotaExceededFault(String),
}
impl CopyDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyDBParameterGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupAlreadyExists" => {
return RusotoError::Service(
CopyDBParameterGroupError::DBParameterGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
CopyDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBParameterGroupQuotaExceeded" => {
return RusotoError::Service(
CopyDBParameterGroupError::DBParameterGroupQuotaExceededFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CopyDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyDBParameterGroupError {
fn description(&self) -> &str {
match *self {
CopyDBParameterGroupError::DBParameterGroupAlreadyExistsFault(ref cause) => cause,
CopyDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
CopyDBParameterGroupError::DBParameterGroupQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyDBSnapshotError {
DBSnapshotAlreadyExistsFault(String),
DBSnapshotNotFoundFault(String),
InvalidDBSnapshotStateFault(String),
KMSKeyNotAccessibleFault(String),
SnapshotQuotaExceededFault(String),
}
impl CopyDBSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyDBSnapshotError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSnapshotAlreadyExists" => {
return RusotoError::Service(
CopyDBSnapshotError::DBSnapshotAlreadyExistsFault(parsed_error.message),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(CopyDBSnapshotError::DBSnapshotNotFoundFault(
parsed_error.message,
))
}
"InvalidDBSnapshotState" => {
return RusotoError::Service(
CopyDBSnapshotError::InvalidDBSnapshotStateFault(parsed_error.message),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(CopyDBSnapshotError::KMSKeyNotAccessibleFault(
parsed_error.message,
))
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
CopyDBSnapshotError::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 CopyDBSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyDBSnapshotError {
fn description(&self) -> &str {
match *self {
CopyDBSnapshotError::DBSnapshotAlreadyExistsFault(ref cause) => cause,
CopyDBSnapshotError::DBSnapshotNotFoundFault(ref cause) => cause,
CopyDBSnapshotError::InvalidDBSnapshotStateFault(ref cause) => cause,
CopyDBSnapshotError::KMSKeyNotAccessibleFault(ref cause) => cause,
CopyDBSnapshotError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyOptionGroupError {
OptionGroupAlreadyExistsFault(String),
OptionGroupNotFoundFault(String),
OptionGroupQuotaExceededFault(String),
}
impl CopyOptionGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyOptionGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"OptionGroupAlreadyExistsFault" => {
return RusotoError::Service(
CopyOptionGroupError::OptionGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
CopyOptionGroupError::OptionGroupNotFoundFault(parsed_error.message),
)
}
"OptionGroupQuotaExceededFault" => {
return RusotoError::Service(
CopyOptionGroupError::OptionGroupQuotaExceededFault(
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 CopyOptionGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyOptionGroupError {
fn description(&self) -> &str {
match *self {
CopyOptionGroupError::OptionGroupAlreadyExistsFault(ref cause) => cause,
CopyOptionGroupError::OptionGroupNotFoundFault(ref cause) => cause,
CopyOptionGroupError::OptionGroupQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBClusterError {
DBClusterAlreadyExistsFault(String),
DBClusterNotFoundFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBClusterQuotaExceededFault(String),
DBInstanceNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
GlobalClusterNotFoundFault(String),
InsufficientStorageClusterCapacityFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
InvalidDBSubnetGroupStateFault(String),
InvalidGlobalClusterStateFault(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),
)
}
"GlobalClusterNotFoundFault" => {
return RusotoError::Service(
CreateDBClusterError::GlobalClusterNotFoundFault(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,
),
)
}
"InvalidGlobalClusterStateFault" => {
return RusotoError::Service(
CreateDBClusterError::InvalidGlobalClusterStateFault(
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::GlobalClusterNotFoundFault(ref cause) => cause,
CreateDBClusterError::InsufficientStorageClusterCapacityFault(ref cause) => cause,
CreateDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
CreateDBClusterError::InvalidDBInstanceStateFault(ref cause) => cause,
CreateDBClusterError::InvalidDBSubnetGroupStateFault(ref cause) => cause,
CreateDBClusterError::InvalidGlobalClusterStateFault(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 CreateDBClusterEndpointError {
DBClusterEndpointAlreadyExistsFault(String),
DBClusterEndpointQuotaExceededFault(String),
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
}
impl CreateDBClusterEndpointError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBClusterEndpointError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterEndpointAlreadyExistsFault" => {
return RusotoError::Service(
CreateDBClusterEndpointError::DBClusterEndpointAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterEndpointQuotaExceededFault" => {
return RusotoError::Service(
CreateDBClusterEndpointError::DBClusterEndpointQuotaExceededFault(
parsed_error.message,
),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(
CreateDBClusterEndpointError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
CreateDBClusterEndpointError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CreateDBClusterEndpointError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
CreateDBClusterEndpointError::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 CreateDBClusterEndpointError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBClusterEndpointError {
fn description(&self) -> &str {
match *self {
CreateDBClusterEndpointError::DBClusterEndpointAlreadyExistsFault(ref cause) => cause,
CreateDBClusterEndpointError::DBClusterEndpointQuotaExceededFault(ref cause) => cause,
CreateDBClusterEndpointError::DBClusterNotFoundFault(ref cause) => cause,
CreateDBClusterEndpointError::DBInstanceNotFoundFault(ref cause) => cause,
CreateDBClusterEndpointError::InvalidDBClusterStateFault(ref cause) => cause,
CreateDBClusterEndpointError::InvalidDBInstanceStateFault(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),
BackupPolicyNotFoundFault(String),
DBClusterNotFoundFault(String),
DBInstanceAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
DomainNotFoundFault(String),
InstanceQuotaExceededFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBClusterStateFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl CreateDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AuthorizationNotFound" => {
return RusotoError::Service(
CreateDBInstanceError::AuthorizationNotFoundFault(parsed_error.message),
)
}
"BackupPolicyNotFoundFault" => {
return RusotoError::Service(
CreateDBInstanceError::BackupPolicyNotFoundFault(parsed_error.message),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(CreateDBInstanceError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
CreateDBInstanceError::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
CreateDBInstanceError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
CreateDBInstanceError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
CreateDBInstanceError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
CreateDBInstanceError::DBSubnetGroupNotFoundFault(parsed_error.message),
)
}
"DomainNotFoundFault" => {
return RusotoError::Service(CreateDBInstanceError::DomainNotFoundFault(
parsed_error.message,
))
}
"InstanceQuotaExceeded" => {
return RusotoError::Service(
CreateDBInstanceError::InstanceQuotaExceededFault(parsed_error.message),
)
}
"InsufficientDBInstanceCapacity" => {
return RusotoError::Service(
CreateDBInstanceError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CreateDBInstanceError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidSubnet" => {
return RusotoError::Service(CreateDBInstanceError::InvalidSubnet(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
CreateDBInstanceError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
CreateDBInstanceError::KMSKeyNotAccessibleFault(parsed_error.message),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
CreateDBInstanceError::OptionGroupNotFoundFault(parsed_error.message),
)
}
"ProvisionedIopsNotAvailableInAZFault" => {
return RusotoError::Service(
CreateDBInstanceError::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
CreateDBInstanceError::StorageQuotaExceededFault(parsed_error.message),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
CreateDBInstanceError::StorageTypeNotSupportedFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBInstanceError {
fn description(&self) -> &str {
match *self {
CreateDBInstanceError::AuthorizationNotFoundFault(ref cause) => cause,
CreateDBInstanceError::BackupPolicyNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBClusterNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBInstanceAlreadyExistsFault(ref cause) => cause,
CreateDBInstanceError::DBParameterGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBSecurityGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
CreateDBInstanceError::DBSubnetGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::DomainNotFoundFault(ref cause) => cause,
CreateDBInstanceError::InstanceQuotaExceededFault(ref cause) => cause,
CreateDBInstanceError::InsufficientDBInstanceCapacityFault(ref cause) => cause,
CreateDBInstanceError::InvalidDBClusterStateFault(ref cause) => cause,
CreateDBInstanceError::InvalidSubnet(ref cause) => cause,
CreateDBInstanceError::InvalidVPCNetworkStateFault(ref cause) => cause,
CreateDBInstanceError::KMSKeyNotAccessibleFault(ref cause) => cause,
CreateDBInstanceError::OptionGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceError::ProvisionedIopsNotAvailableInAZFault(ref cause) => cause,
CreateDBInstanceError::StorageQuotaExceededFault(ref cause) => cause,
CreateDBInstanceError::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBInstanceReadReplicaError {
DBInstanceAlreadyExistsFault(String),
DBInstanceNotFoundFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotAllowedFault(String),
DBSubnetGroupNotFoundFault(String),
InstanceQuotaExceededFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBInstanceStateFault(String),
InvalidDBSubnetGroupFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl CreateDBInstanceReadReplicaError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateDBInstanceReadReplicaError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotAllowedFault" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::DBSubnetGroupNotAllowedFault(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InstanceQuotaExceeded" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::InstanceQuotaExceededFault(
parsed_error.message,
),
)
}
"InsufficientDBInstanceCapacity" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"InvalidDBSubnetGroupFault" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::InvalidDBSubnetGroupFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::InvalidSubnet(parsed_error.message),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"ProvisionedIopsNotAvailableInAZFault" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::StorageQuotaExceededFault(
parsed_error.message,
),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
CreateDBInstanceReadReplicaError::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 CreateDBInstanceReadReplicaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBInstanceReadReplicaError {
fn description(&self) -> &str {
match *self {
CreateDBInstanceReadReplicaError::DBInstanceAlreadyExistsFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::DBInstanceNotFoundFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::DBParameterGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::DBSecurityGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => {
cause
}
CreateDBInstanceReadReplicaError::DBSubnetGroupNotAllowedFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::DBSubnetGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::InstanceQuotaExceededFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::InsufficientDBInstanceCapacityFault(ref cause) => {
cause
}
CreateDBInstanceReadReplicaError::InvalidDBInstanceStateFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::InvalidDBSubnetGroupFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::InvalidSubnet(ref cause) => cause,
CreateDBInstanceReadReplicaError::InvalidVPCNetworkStateFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::KMSKeyNotAccessibleFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::OptionGroupNotFoundFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::ProvisionedIopsNotAvailableInAZFault(ref cause) => {
cause
}
CreateDBInstanceReadReplicaError::StorageQuotaExceededFault(ref cause) => cause,
CreateDBInstanceReadReplicaError::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBParameterGroupError {
DBParameterGroupAlreadyExistsFault(String),
DBParameterGroupQuotaExceededFault(String),
}
impl CreateDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBParameterGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupAlreadyExists" => {
return RusotoError::Service(
CreateDBParameterGroupError::DBParameterGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupQuotaExceeded" => {
return RusotoError::Service(
CreateDBParameterGroupError::DBParameterGroupQuotaExceededFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBParameterGroupError {
fn description(&self) -> &str {
match *self {
CreateDBParameterGroupError::DBParameterGroupAlreadyExistsFault(ref cause) => cause,
CreateDBParameterGroupError::DBParameterGroupQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBSecurityGroupError {
DBSecurityGroupAlreadyExistsFault(String),
DBSecurityGroupNotSupportedFault(String),
DBSecurityGroupQuotaExceededFault(String),
}
impl CreateDBSecurityGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBSecurityGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSecurityGroupAlreadyExists" => {
return RusotoError::Service(
CreateDBSecurityGroupError::DBSecurityGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotSupported" => {
return RusotoError::Service(
CreateDBSecurityGroupError::DBSecurityGroupNotSupportedFault(
parsed_error.message,
),
)
}
"QuotaExceeded.DBSecurityGroup" => {
return RusotoError::Service(
CreateDBSecurityGroupError::DBSecurityGroupQuotaExceededFault(
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 CreateDBSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBSecurityGroupError {
fn description(&self) -> &str {
match *self {
CreateDBSecurityGroupError::DBSecurityGroupAlreadyExistsFault(ref cause) => cause,
CreateDBSecurityGroupError::DBSecurityGroupNotSupportedFault(ref cause) => cause,
CreateDBSecurityGroupError::DBSecurityGroupQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBSnapshotError {
DBInstanceNotFoundFault(String),
DBSnapshotAlreadyExistsFault(String),
InvalidDBInstanceStateFault(String),
SnapshotQuotaExceededFault(String),
}
impl CreateDBSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBSnapshotError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
CreateDBSnapshotError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBSnapshotAlreadyExists" => {
return RusotoError::Service(
CreateDBSnapshotError::DBSnapshotAlreadyExistsFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
CreateDBSnapshotError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
CreateDBSnapshotError::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 CreateDBSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBSnapshotError {
fn description(&self) -> &str {
match *self {
CreateDBSnapshotError::DBInstanceNotFoundFault(ref cause) => cause,
CreateDBSnapshotError::DBSnapshotAlreadyExistsFault(ref cause) => cause,
CreateDBSnapshotError::InvalidDBInstanceStateFault(ref cause) => cause,
CreateDBSnapshotError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDBSubnetGroupError {
DBSubnetGroupAlreadyExistsFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupQuotaExceededFault(String),
DBSubnetQuotaExceededFault(String),
InvalidSubnet(String),
}
impl CreateDBSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDBSubnetGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSubnetGroupAlreadyExists" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupQuotaExceeded" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetGroupQuotaExceededFault(
parsed_error.message,
),
)
}
"DBSubnetQuotaExceededFault" => {
return RusotoError::Service(
CreateDBSubnetGroupError::DBSubnetQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(CreateDBSubnetGroupError::InvalidSubnet(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateDBSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDBSubnetGroupError {
fn description(&self) -> &str {
match *self {
CreateDBSubnetGroupError::DBSubnetGroupAlreadyExistsFault(ref cause) => cause,
CreateDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
CreateDBSubnetGroupError::DBSubnetGroupQuotaExceededFault(ref cause) => cause,
CreateDBSubnetGroupError::DBSubnetQuotaExceededFault(ref cause) => cause,
CreateDBSubnetGroupError::InvalidSubnet(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateEventSubscriptionError {
EventSubscriptionQuotaExceededFault(String),
SNSInvalidTopicFault(String),
SNSNoAuthorizationFault(String),
SNSTopicArnNotFoundFault(String),
SourceNotFoundFault(String),
SubscriptionAlreadyExistFault(String),
SubscriptionCategoryNotFoundFault(String),
}
impl CreateEventSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateEventSubscriptionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"EventSubscriptionQuotaExceeded" => {
return RusotoError::Service(
CreateEventSubscriptionError::EventSubscriptionQuotaExceededFault(
parsed_error.message,
),
)
}
"SNSInvalidTopic" => {
return RusotoError::Service(
CreateEventSubscriptionError::SNSInvalidTopicFault(
parsed_error.message,
),
)
}
"SNSNoAuthorization" => {
return RusotoError::Service(
CreateEventSubscriptionError::SNSNoAuthorizationFault(
parsed_error.message,
),
)
}
"SNSTopicArnNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SNSTopicArnNotFoundFault(
parsed_error.message,
),
)
}
"SourceNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SourceNotFoundFault(parsed_error.message),
)
}
"SubscriptionAlreadyExist" => {
return RusotoError::Service(
CreateEventSubscriptionError::SubscriptionAlreadyExistFault(
parsed_error.message,
),
)
}
"SubscriptionCategoryNotFound" => {
return RusotoError::Service(
CreateEventSubscriptionError::SubscriptionCategoryNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateEventSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateEventSubscriptionError {
fn description(&self) -> &str {
match *self {
CreateEventSubscriptionError::EventSubscriptionQuotaExceededFault(ref cause) => cause,
CreateEventSubscriptionError::SNSInvalidTopicFault(ref cause) => cause,
CreateEventSubscriptionError::SNSNoAuthorizationFault(ref cause) => cause,
CreateEventSubscriptionError::SNSTopicArnNotFoundFault(ref cause) => cause,
CreateEventSubscriptionError::SourceNotFoundFault(ref cause) => cause,
CreateEventSubscriptionError::SubscriptionAlreadyExistFault(ref cause) => cause,
CreateEventSubscriptionError::SubscriptionCategoryNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateGlobalClusterError {
DBClusterNotFoundFault(String),
GlobalClusterAlreadyExistsFault(String),
GlobalClusterQuotaExceededFault(String),
InvalidDBClusterStateFault(String),
}
impl CreateGlobalClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGlobalClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
CreateGlobalClusterError::DBClusterNotFoundFault(parsed_error.message),
)
}
"GlobalClusterAlreadyExistsFault" => {
return RusotoError::Service(
CreateGlobalClusterError::GlobalClusterAlreadyExistsFault(
parsed_error.message,
),
)
}
"GlobalClusterQuotaExceededFault" => {
return RusotoError::Service(
CreateGlobalClusterError::GlobalClusterQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
CreateGlobalClusterError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateGlobalClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateGlobalClusterError {
fn description(&self) -> &str {
match *self {
CreateGlobalClusterError::DBClusterNotFoundFault(ref cause) => cause,
CreateGlobalClusterError::GlobalClusterAlreadyExistsFault(ref cause) => cause,
CreateGlobalClusterError::GlobalClusterQuotaExceededFault(ref cause) => cause,
CreateGlobalClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateOptionGroupError {
OptionGroupAlreadyExistsFault(String),
OptionGroupQuotaExceededFault(String),
}
impl CreateOptionGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateOptionGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"OptionGroupAlreadyExistsFault" => {
return RusotoError::Service(
CreateOptionGroupError::OptionGroupAlreadyExistsFault(
parsed_error.message,
),
)
}
"OptionGroupQuotaExceededFault" => {
return RusotoError::Service(
CreateOptionGroupError::OptionGroupQuotaExceededFault(
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 CreateOptionGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateOptionGroupError {
fn description(&self) -> &str {
match *self {
CreateOptionGroupError::OptionGroupAlreadyExistsFault(ref cause) => cause,
CreateOptionGroupError::OptionGroupQuotaExceededFault(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 DeleteDBClusterEndpointError {
DBClusterEndpointNotFoundFault(String),
InvalidDBClusterEndpointStateFault(String),
InvalidDBClusterStateFault(String),
}
impl DeleteDBClusterEndpointError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBClusterEndpointError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterEndpointNotFoundFault" => {
return RusotoError::Service(
DeleteDBClusterEndpointError::DBClusterEndpointNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterEndpointStateFault" => {
return RusotoError::Service(
DeleteDBClusterEndpointError::InvalidDBClusterEndpointStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
DeleteDBClusterEndpointError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteDBClusterEndpointError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBClusterEndpointError {
fn description(&self) -> &str {
match *self {
DeleteDBClusterEndpointError::DBClusterEndpointNotFoundFault(ref cause) => cause,
DeleteDBClusterEndpointError::InvalidDBClusterEndpointStateFault(ref cause) => cause,
DeleteDBClusterEndpointError::InvalidDBClusterStateFault(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 {
DBInstanceAutomatedBackupQuotaExceededFault(String),
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[..] {
"DBInstanceAutomatedBackupQuotaExceeded" => {
return RusotoError::Service(
DeleteDBInstanceError::DBInstanceAutomatedBackupQuotaExceededFault(
parsed_error.message,
),
)
}
"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::DBInstanceAutomatedBackupQuotaExceededFault(ref cause) => cause,
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 DeleteDBInstanceAutomatedBackupError {
DBInstanceAutomatedBackupNotFoundFault(String),
InvalidDBInstanceAutomatedBackupStateFault(String),
}
impl DeleteDBInstanceAutomatedBackupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteDBInstanceAutomatedBackupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBInstanceAutomatedBackupNotFound" => return RusotoError::Service(DeleteDBInstanceAutomatedBackupError::DBInstanceAutomatedBackupNotFoundFault(parsed_error.message)),"InvalidDBInstanceAutomatedBackupState" => return RusotoError::Service(DeleteDBInstanceAutomatedBackupError::InvalidDBInstanceAutomatedBackupStateFault(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 DeleteDBInstanceAutomatedBackupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBInstanceAutomatedBackupError {
fn description(&self) -> &str {
match *self {
DeleteDBInstanceAutomatedBackupError::DBInstanceAutomatedBackupNotFoundFault(
ref cause,
) => cause,
DeleteDBInstanceAutomatedBackupError::InvalidDBInstanceAutomatedBackupStateFault(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl DeleteDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBParameterGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DeleteDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
DeleteDBParameterGroupError::InvalidDBParameterGroupStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBParameterGroupError {
fn description(&self) -> &str {
match *self {
DeleteDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
DeleteDBParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBSecurityGroupError {
DBSecurityGroupNotFoundFault(String),
InvalidDBSecurityGroupStateFault(String),
}
impl DeleteDBSecurityGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBSecurityGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
DeleteDBSecurityGroupError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBSecurityGroupState" => {
return RusotoError::Service(
DeleteDBSecurityGroupError::InvalidDBSecurityGroupStateFault(
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 DeleteDBSecurityGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBSecurityGroupError {
fn description(&self) -> &str {
match *self {
DeleteDBSecurityGroupError::DBSecurityGroupNotFoundFault(ref cause) => cause,
DeleteDBSecurityGroupError::InvalidDBSecurityGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBSnapshotError {
DBSnapshotNotFoundFault(String),
InvalidDBSnapshotStateFault(String),
}
impl DeleteDBSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBSnapshotError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSnapshotNotFound" => {
return RusotoError::Service(
DeleteDBSnapshotError::DBSnapshotNotFoundFault(parsed_error.message),
)
}
"InvalidDBSnapshotState" => {
return RusotoError::Service(
DeleteDBSnapshotError::InvalidDBSnapshotStateFault(
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 DeleteDBSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBSnapshotError {
fn description(&self) -> &str {
match *self {
DeleteDBSnapshotError::DBSnapshotNotFoundFault(ref cause) => cause,
DeleteDBSnapshotError::InvalidDBSnapshotStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDBSubnetGroupError {
DBSubnetGroupNotFoundFault(String),
InvalidDBSubnetGroupStateFault(String),
InvalidDBSubnetStateFault(String),
}
impl DeleteDBSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDBSubnetGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
DeleteDBSubnetGroupError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBSubnetGroupStateFault" => {
return RusotoError::Service(
DeleteDBSubnetGroupError::InvalidDBSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidDBSubnetStateFault" => {
return RusotoError::Service(
DeleteDBSubnetGroupError::InvalidDBSubnetStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteDBSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDBSubnetGroupError {
fn description(&self) -> &str {
match *self {
DeleteDBSubnetGroupError::DBSubnetGroupNotFoundFault(ref cause) => cause,
DeleteDBSubnetGroupError::InvalidDBSubnetGroupStateFault(ref cause) => cause,
DeleteDBSubnetGroupError::InvalidDBSubnetStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteEventSubscriptionError {
InvalidEventSubscriptionStateFault(String),
SubscriptionNotFoundFault(String),
}
impl DeleteEventSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteEventSubscriptionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidEventSubscriptionState" => {
return RusotoError::Service(
DeleteEventSubscriptionError::InvalidEventSubscriptionStateFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
DeleteEventSubscriptionError::SubscriptionNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteEventSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteEventSubscriptionError {
fn description(&self) -> &str {
match *self {
DeleteEventSubscriptionError::InvalidEventSubscriptionStateFault(ref cause) => cause,
DeleteEventSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteGlobalClusterError {
GlobalClusterNotFoundFault(String),
InvalidGlobalClusterStateFault(String),
}
impl DeleteGlobalClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGlobalClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"GlobalClusterNotFoundFault" => {
return RusotoError::Service(
DeleteGlobalClusterError::GlobalClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidGlobalClusterStateFault" => {
return RusotoError::Service(
DeleteGlobalClusterError::InvalidGlobalClusterStateFault(
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 DeleteGlobalClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteGlobalClusterError {
fn description(&self) -> &str {
match *self {
DeleteGlobalClusterError::GlobalClusterNotFoundFault(ref cause) => cause,
DeleteGlobalClusterError::InvalidGlobalClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteOptionGroupError {
InvalidOptionGroupStateFault(String),
OptionGroupNotFoundFault(String),
}
impl DeleteOptionGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteOptionGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidOptionGroupStateFault" => {
return RusotoError::Service(
DeleteOptionGroupError::InvalidOptionGroupStateFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
DeleteOptionGroupError::OptionGroupNotFoundFault(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 DeleteOptionGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteOptionGroupError {
fn description(&self) -> &str {
match *self {
DeleteOptionGroupError::InvalidOptionGroupStateFault(ref cause) => cause,
DeleteOptionGroupError::OptionGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountAttributesError {}
impl DescribeAccountAttributesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeAccountAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountAttributesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeCertificatesError {
CertificateNotFoundFault(String),
}
impl DescribeCertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCertificatesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"CertificateNotFound" => {
return RusotoError::Service(
DescribeCertificatesError::CertificateNotFoundFault(
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 DescribeCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeCertificatesError {
fn description(&self) -> &str {
match *self {
DescribeCertificatesError::CertificateNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBClusterBacktracksError {
DBClusterBacktrackNotFoundFault(String),
DBClusterNotFoundFault(String),
}
impl DescribeDBClusterBacktracksError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBClusterBacktracksError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterBacktrackNotFoundFault" => {
return RusotoError::Service(
DescribeDBClusterBacktracksError::DBClusterBacktrackNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(
DescribeDBClusterBacktracksError::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 DescribeDBClusterBacktracksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBClusterBacktracksError {
fn description(&self) -> &str {
match *self {
DescribeDBClusterBacktracksError::DBClusterBacktrackNotFoundFault(ref cause) => cause,
DescribeDBClusterBacktracksError::DBClusterNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBClusterEndpointsError {
DBClusterNotFoundFault(String),
}
impl DescribeDBClusterEndpointsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBClusterEndpointsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
DescribeDBClusterEndpointsError::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 DescribeDBClusterEndpointsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBClusterEndpointsError {
fn description(&self) -> &str {
match *self {
DescribeDBClusterEndpointsError::DBClusterNotFoundFault(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 DescribeDBInstanceAutomatedBackupsError {
DBInstanceAutomatedBackupNotFoundFault(String),
}
impl DescribeDBInstanceAutomatedBackupsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBInstanceAutomatedBackupsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBInstanceAutomatedBackupNotFound" => return RusotoError::Service(DescribeDBInstanceAutomatedBackupsError::DBInstanceAutomatedBackupNotFoundFault(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 DescribeDBInstanceAutomatedBackupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBInstanceAutomatedBackupsError {
fn description(&self) -> &str {
match *self {
DescribeDBInstanceAutomatedBackupsError::DBInstanceAutomatedBackupNotFoundFault(
ref cause,
) => cause,
}
}
}
#[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 DescribeDBLogFilesError {
DBInstanceNotFoundFault(String),
}
impl DescribeDBLogFilesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBLogFilesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
DescribeDBLogFilesError::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 DescribeDBLogFilesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBLogFilesError {
fn description(&self) -> &str {
match *self {
DescribeDBLogFilesError::DBInstanceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBParameterGroupsError {
DBParameterGroupNotFoundFault(String),
}
impl DescribeDBParameterGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBParameterGroupsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DescribeDBParameterGroupsError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeDBParameterGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBParameterGroupsError {
fn description(&self) -> &str {
match *self {
DescribeDBParameterGroupsError::DBParameterGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBParametersError {
DBParameterGroupNotFoundFault(String),
}
impl DescribeDBParametersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBParametersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
DescribeDBParametersError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeDBParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBParametersError {
fn description(&self) -> &str {
match *self {
DescribeDBParametersError::DBParameterGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBSecurityGroupsError {
DBSecurityGroupNotFoundFault(String),
}
impl DescribeDBSecurityGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBSecurityGroupsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
DescribeDBSecurityGroupsError::DBSecurityGroupNotFoundFault(
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 DescribeDBSecurityGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBSecurityGroupsError {
fn description(&self) -> &str {
match *self {
DescribeDBSecurityGroupsError::DBSecurityGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBSnapshotAttributesError {
DBSnapshotNotFoundFault(String),
}
impl DescribeDBSnapshotAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDBSnapshotAttributesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSnapshotNotFound" => {
return RusotoError::Service(
DescribeDBSnapshotAttributesError::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 DescribeDBSnapshotAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBSnapshotAttributesError {
fn description(&self) -> &str {
match *self {
DescribeDBSnapshotAttributesError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBSnapshotsError {
DBSnapshotNotFoundFault(String),
}
impl DescribeDBSnapshotsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBSnapshotsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSnapshotNotFound" => {
return RusotoError::Service(
DescribeDBSnapshotsError::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 DescribeDBSnapshotsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBSnapshotsError {
fn description(&self) -> &str {
match *self {
DescribeDBSnapshotsError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDBSubnetGroupsError {
DBSubnetGroupNotFoundFault(String),
}
impl DescribeDBSubnetGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDBSubnetGroupsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
DescribeDBSubnetGroupsError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeDBSubnetGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDBSubnetGroupsError {
fn description(&self) -> &str {
match *self {
DescribeDBSubnetGroupsError::DBSubnetGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEngineDefaultClusterParametersError {}
impl DescribeEngineDefaultClusterParametersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEngineDefaultClusterParametersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEngineDefaultClusterParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEngineDefaultClusterParametersError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEngineDefaultParametersError {}
impl DescribeEngineDefaultParametersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEngineDefaultParametersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEngineDefaultParametersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEngineDefaultParametersError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventCategoriesError {}
impl DescribeEventCategoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEventCategoriesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEventCategoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventCategoriesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventSubscriptionsError {
SubscriptionNotFoundFault(String),
}
impl DescribeEventSubscriptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEventSubscriptionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"SubscriptionNotFound" => {
return RusotoError::Service(
DescribeEventSubscriptionsError::SubscriptionNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEventSubscriptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventSubscriptionsError {
fn description(&self) -> &str {
match *self {
DescribeEventSubscriptionsError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventsError {}
impl DescribeEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEventsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeGlobalClustersError {
GlobalClusterNotFoundFault(String),
}
impl DescribeGlobalClustersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeGlobalClustersError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"GlobalClusterNotFoundFault" => {
return RusotoError::Service(
DescribeGlobalClustersError::GlobalClusterNotFoundFault(
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 DescribeGlobalClustersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeGlobalClustersError {
fn description(&self) -> &str {
match *self {
DescribeGlobalClustersError::GlobalClusterNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeOptionGroupOptionsError {}
impl DescribeOptionGroupOptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeOptionGroupOptionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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 DescribeOptionGroupOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeOptionGroupOptionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeOptionGroupsError {
OptionGroupNotFoundFault(String),
}
impl DescribeOptionGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeOptionGroupsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
DescribeOptionGroupsError::OptionGroupNotFoundFault(
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 DescribeOptionGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeOptionGroupsError {
fn description(&self) -> &str {
match *self {
DescribeOptionGroupsError::OptionGroupNotFoundFault(ref cause) => cause,
}
}
}
#[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 DescribeReservedDBInstancesError {
ReservedDBInstanceNotFoundFault(String),
}
impl DescribeReservedDBInstancesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeReservedDBInstancesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ReservedDBInstanceNotFound" => {
return RusotoError::Service(
DescribeReservedDBInstancesError::ReservedDBInstanceNotFoundFault(
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 DescribeReservedDBInstancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeReservedDBInstancesError {
fn description(&self) -> &str {
match *self {
DescribeReservedDBInstancesError::ReservedDBInstanceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeReservedDBInstancesOfferingsError {
ReservedDBInstancesOfferingNotFoundFault(String),
}
impl DescribeReservedDBInstancesOfferingsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeReservedDBInstancesOfferingsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ReservedDBInstancesOfferingNotFound" => return RusotoError::Service(DescribeReservedDBInstancesOfferingsError::ReservedDBInstancesOfferingNotFoundFault(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 DescribeReservedDBInstancesOfferingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeReservedDBInstancesOfferingsError {
fn description(&self) -> &str {
match *self {
DescribeReservedDBInstancesOfferingsError::ReservedDBInstancesOfferingNotFoundFault(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSourceRegionsError {}
impl DescribeSourceRegionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSourceRegionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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 DescribeSourceRegionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSourceRegionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeValidDBInstanceModificationsError {
DBInstanceNotFoundFault(String),
InvalidDBInstanceStateFault(String),
}
impl DescribeValidDBInstanceModificationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeValidDBInstanceModificationsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBInstanceNotFound" => {
return RusotoError::Service(
DescribeValidDBInstanceModificationsError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
DescribeValidDBInstanceModificationsError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DescribeValidDBInstanceModificationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeValidDBInstanceModificationsError {
fn description(&self) -> &str {
match *self {
DescribeValidDBInstanceModificationsError::DBInstanceNotFoundFault(ref cause) => cause,
DescribeValidDBInstanceModificationsError::InvalidDBInstanceStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DownloadDBLogFilePortionError {
DBInstanceNotFoundFault(String),
DBLogFileNotFoundFault(String),
}
impl DownloadDBLogFilePortionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DownloadDBLogFilePortionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
DownloadDBLogFilePortionError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"DBLogFileNotFoundFault" => {
return RusotoError::Service(
DownloadDBLogFilePortionError::DBLogFileNotFoundFault(
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 DownloadDBLogFilePortionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DownloadDBLogFilePortionError {
fn description(&self) -> &str {
match *self {
DownloadDBLogFilePortionError::DBInstanceNotFoundFault(ref cause) => cause,
DownloadDBLogFilePortionError::DBLogFileNotFoundFault(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 ModifyCurrentDBClusterCapacityError {
DBClusterNotFoundFault(String),
InvalidDBClusterCapacityFault(String),
InvalidDBClusterStateFault(String),
}
impl ModifyCurrentDBClusterCapacityError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyCurrentDBClusterCapacityError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
ModifyCurrentDBClusterCapacityError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterCapacityFault" => {
return RusotoError::Service(
ModifyCurrentDBClusterCapacityError::InvalidDBClusterCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
ModifyCurrentDBClusterCapacityError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ModifyCurrentDBClusterCapacityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyCurrentDBClusterCapacityError {
fn description(&self) -> &str {
match *self {
ModifyCurrentDBClusterCapacityError::DBClusterNotFoundFault(ref cause) => cause,
ModifyCurrentDBClusterCapacityError::InvalidDBClusterCapacityFault(ref cause) => cause,
ModifyCurrentDBClusterCapacityError::InvalidDBClusterStateFault(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 ModifyDBClusterEndpointError {
DBClusterEndpointNotFoundFault(String),
DBInstanceNotFoundFault(String),
InvalidDBClusterEndpointStateFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
}
impl ModifyDBClusterEndpointError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBClusterEndpointError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterEndpointNotFoundFault" => {
return RusotoError::Service(
ModifyDBClusterEndpointError::DBClusterEndpointNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
ModifyDBClusterEndpointError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterEndpointStateFault" => {
return RusotoError::Service(
ModifyDBClusterEndpointError::InvalidDBClusterEndpointStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
ModifyDBClusterEndpointError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
ModifyDBClusterEndpointError::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 ModifyDBClusterEndpointError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBClusterEndpointError {
fn description(&self) -> &str {
match *self {
ModifyDBClusterEndpointError::DBClusterEndpointNotFoundFault(ref cause) => cause,
ModifyDBClusterEndpointError::DBInstanceNotFoundFault(ref cause) => cause,
ModifyDBClusterEndpointError::InvalidDBClusterEndpointStateFault(ref cause) => cause,
ModifyDBClusterEndpointError::InvalidDBClusterStateFault(ref cause) => cause,
ModifyDBClusterEndpointError::InvalidDBInstanceStateFault(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),
BackupPolicyNotFoundFault(String),
CertificateNotFoundFault(String),
DBInstanceAlreadyExistsFault(String),
DBInstanceNotFoundFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBUpgradeDependencyFailureFault(String),
DomainNotFoundFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBInstanceStateFault(String),
InvalidDBSecurityGroupStateFault(String),
InvalidVPCNetworkStateFault(String),
OptionGroupNotFoundFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl ModifyDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"AuthorizationNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::AuthorizationNotFoundFault(parsed_error.message),
)
}
"BackupPolicyNotFoundFault" => {
return RusotoError::Service(
ModifyDBInstanceError::BackupPolicyNotFoundFault(parsed_error.message),
)
}
"CertificateNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::CertificateNotFoundFault(parsed_error.message),
)
}
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
ModifyDBInstanceError::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
ModifyDBInstanceError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBUpgradeDependencyFailure" => {
return RusotoError::Service(
ModifyDBInstanceError::DBUpgradeDependencyFailureFault(
parsed_error.message,
),
)
}
"DomainNotFoundFault" => {
return RusotoError::Service(ModifyDBInstanceError::DomainNotFoundFault(
parsed_error.message,
))
}
"InsufficientDBInstanceCapacity" => {
return RusotoError::Service(
ModifyDBInstanceError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
ModifyDBInstanceError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"InvalidDBSecurityGroupState" => {
return RusotoError::Service(
ModifyDBInstanceError::InvalidDBSecurityGroupStateFault(
parsed_error.message,
),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
ModifyDBInstanceError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
ModifyDBInstanceError::OptionGroupNotFoundFault(parsed_error.message),
)
}
"ProvisionedIopsNotAvailableInAZFault" => {
return RusotoError::Service(
ModifyDBInstanceError::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
ModifyDBInstanceError::StorageQuotaExceededFault(parsed_error.message),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
ModifyDBInstanceError::StorageTypeNotSupportedFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ModifyDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBInstanceError {
fn description(&self) -> &str {
match *self {
ModifyDBInstanceError::AuthorizationNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::BackupPolicyNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::CertificateNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBInstanceAlreadyExistsFault(ref cause) => cause,
ModifyDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBParameterGroupNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBSecurityGroupNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::DBUpgradeDependencyFailureFault(ref cause) => cause,
ModifyDBInstanceError::DomainNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::InsufficientDBInstanceCapacityFault(ref cause) => cause,
ModifyDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
ModifyDBInstanceError::InvalidDBSecurityGroupStateFault(ref cause) => cause,
ModifyDBInstanceError::InvalidVPCNetworkStateFault(ref cause) => cause,
ModifyDBInstanceError::OptionGroupNotFoundFault(ref cause) => cause,
ModifyDBInstanceError::ProvisionedIopsNotAvailableInAZFault(ref cause) => cause,
ModifyDBInstanceError::StorageQuotaExceededFault(ref cause) => cause,
ModifyDBInstanceError::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl ModifyDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBParameterGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ModifyDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
ModifyDBParameterGroupError::InvalidDBParameterGroupStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ModifyDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBParameterGroupError {
fn description(&self) -> &str {
match *self {
ModifyDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
ModifyDBParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBSnapshotError {
DBSnapshotNotFoundFault(String),
}
impl ModifyDBSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBSnapshotError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSnapshotNotFound" => {
return RusotoError::Service(
ModifyDBSnapshotError::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 ModifyDBSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBSnapshotError {
fn description(&self) -> &str {
match *self {
ModifyDBSnapshotError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBSnapshotAttributeError {
DBSnapshotNotFoundFault(String),
InvalidDBSnapshotStateFault(String),
SharedSnapshotQuotaExceededFault(String),
}
impl ModifyDBSnapshotAttributeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBSnapshotAttributeError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSnapshotNotFound" => {
return RusotoError::Service(
ModifyDBSnapshotAttributeError::DBSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBSnapshotState" => {
return RusotoError::Service(
ModifyDBSnapshotAttributeError::InvalidDBSnapshotStateFault(
parsed_error.message,
),
)
}
"SharedSnapshotQuotaExceeded" => {
return RusotoError::Service(
ModifyDBSnapshotAttributeError::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 ModifyDBSnapshotAttributeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBSnapshotAttributeError {
fn description(&self) -> &str {
match *self {
ModifyDBSnapshotAttributeError::DBSnapshotNotFoundFault(ref cause) => cause,
ModifyDBSnapshotAttributeError::InvalidDBSnapshotStateFault(ref cause) => cause,
ModifyDBSnapshotAttributeError::SharedSnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyDBSubnetGroupError {
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
DBSubnetQuotaExceededFault(String),
InvalidSubnet(String),
SubnetAlreadyInUse(String),
}
impl ModifyDBSubnetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyDBSubnetGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
ModifyDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
ModifyDBSubnetGroupError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetQuotaExceededFault" => {
return RusotoError::Service(
ModifyDBSubnetGroupError::DBSubnetQuotaExceededFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(ModifyDBSubnetGroupError::InvalidSubnet(
parsed_error.message,
))
}
"SubnetAlreadyInUse" => {
return RusotoError::Service(ModifyDBSubnetGroupError::SubnetAlreadyInUse(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ModifyDBSubnetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyDBSubnetGroupError {
fn description(&self) -> &str {
match *self {
ModifyDBSubnetGroupError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
ModifyDBSubnetGroupError::DBSubnetGroupNotFoundFault(ref cause) => cause,
ModifyDBSubnetGroupError::DBSubnetQuotaExceededFault(ref cause) => cause,
ModifyDBSubnetGroupError::InvalidSubnet(ref cause) => cause,
ModifyDBSubnetGroupError::SubnetAlreadyInUse(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyEventSubscriptionError {
EventSubscriptionQuotaExceededFault(String),
SNSInvalidTopicFault(String),
SNSNoAuthorizationFault(String),
SNSTopicArnNotFoundFault(String),
SubscriptionCategoryNotFoundFault(String),
SubscriptionNotFoundFault(String),
}
impl ModifyEventSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyEventSubscriptionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"EventSubscriptionQuotaExceeded" => {
return RusotoError::Service(
ModifyEventSubscriptionError::EventSubscriptionQuotaExceededFault(
parsed_error.message,
),
)
}
"SNSInvalidTopic" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SNSInvalidTopicFault(
parsed_error.message,
),
)
}
"SNSNoAuthorization" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SNSNoAuthorizationFault(
parsed_error.message,
),
)
}
"SNSTopicArnNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SNSTopicArnNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionCategoryNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SubscriptionCategoryNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
ModifyEventSubscriptionError::SubscriptionNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ModifyEventSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyEventSubscriptionError {
fn description(&self) -> &str {
match *self {
ModifyEventSubscriptionError::EventSubscriptionQuotaExceededFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSInvalidTopicFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSNoAuthorizationFault(ref cause) => cause,
ModifyEventSubscriptionError::SNSTopicArnNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionCategoryNotFoundFault(ref cause) => cause,
ModifyEventSubscriptionError::SubscriptionNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyGlobalClusterError {
GlobalClusterNotFoundFault(String),
InvalidGlobalClusterStateFault(String),
}
impl ModifyGlobalClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyGlobalClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"GlobalClusterNotFoundFault" => {
return RusotoError::Service(
ModifyGlobalClusterError::GlobalClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidGlobalClusterStateFault" => {
return RusotoError::Service(
ModifyGlobalClusterError::InvalidGlobalClusterStateFault(
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 ModifyGlobalClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyGlobalClusterError {
fn description(&self) -> &str {
match *self {
ModifyGlobalClusterError::GlobalClusterNotFoundFault(ref cause) => cause,
ModifyGlobalClusterError::InvalidGlobalClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyOptionGroupError {
InvalidOptionGroupStateFault(String),
OptionGroupNotFoundFault(String),
}
impl ModifyOptionGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyOptionGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidOptionGroupStateFault" => {
return RusotoError::Service(
ModifyOptionGroupError::InvalidOptionGroupStateFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
ModifyOptionGroupError::OptionGroupNotFoundFault(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 ModifyOptionGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyOptionGroupError {
fn description(&self) -> &str {
match *self {
ModifyOptionGroupError::InvalidOptionGroupStateFault(ref cause) => cause,
ModifyOptionGroupError::OptionGroupNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PromoteReadReplicaError {
DBInstanceNotFoundFault(String),
InvalidDBInstanceStateFault(String),
}
impl PromoteReadReplicaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PromoteReadReplicaError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
PromoteReadReplicaError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
PromoteReadReplicaError::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 PromoteReadReplicaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PromoteReadReplicaError {
fn description(&self) -> &str {
match *self {
PromoteReadReplicaError::DBInstanceNotFoundFault(ref cause) => cause,
PromoteReadReplicaError::InvalidDBInstanceStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PromoteReadReplicaDBClusterError {
DBClusterNotFoundFault(String),
InvalidDBClusterStateFault(String),
}
impl PromoteReadReplicaDBClusterError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PromoteReadReplicaDBClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
PromoteReadReplicaDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
PromoteReadReplicaDBClusterError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for PromoteReadReplicaDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PromoteReadReplicaDBClusterError {
fn description(&self) -> &str {
match *self {
PromoteReadReplicaDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
PromoteReadReplicaDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PurchaseReservedDBInstancesOfferingError {
ReservedDBInstanceAlreadyExistsFault(String),
ReservedDBInstanceQuotaExceededFault(String),
ReservedDBInstancesOfferingNotFoundFault(String),
}
impl PurchaseReservedDBInstancesOfferingError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PurchaseReservedDBInstancesOfferingError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ReservedDBInstanceAlreadyExists" => return RusotoError::Service(PurchaseReservedDBInstancesOfferingError::ReservedDBInstanceAlreadyExistsFault(parsed_error.message)),"ReservedDBInstanceQuotaExceeded" => return RusotoError::Service(PurchaseReservedDBInstancesOfferingError::ReservedDBInstanceQuotaExceededFault(parsed_error.message)),"ReservedDBInstancesOfferingNotFound" => return RusotoError::Service(PurchaseReservedDBInstancesOfferingError::ReservedDBInstancesOfferingNotFoundFault(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 PurchaseReservedDBInstancesOfferingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PurchaseReservedDBInstancesOfferingError {
fn description(&self) -> &str {
match *self {
PurchaseReservedDBInstancesOfferingError::ReservedDBInstanceAlreadyExistsFault(
ref cause,
) => cause,
PurchaseReservedDBInstancesOfferingError::ReservedDBInstanceQuotaExceededFault(
ref cause,
) => cause,
PurchaseReservedDBInstancesOfferingError::ReservedDBInstancesOfferingNotFoundFault(
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 RemoveFromGlobalClusterError {
DBClusterNotFoundFault(String),
GlobalClusterNotFoundFault(String),
InvalidGlobalClusterStateFault(String),
}
impl RemoveFromGlobalClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveFromGlobalClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
RemoveFromGlobalClusterError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"GlobalClusterNotFoundFault" => {
return RusotoError::Service(
RemoveFromGlobalClusterError::GlobalClusterNotFoundFault(
parsed_error.message,
),
)
}
"InvalidGlobalClusterStateFault" => {
return RusotoError::Service(
RemoveFromGlobalClusterError::InvalidGlobalClusterStateFault(
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 RemoveFromGlobalClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveFromGlobalClusterError {
fn description(&self) -> &str {
match *self {
RemoveFromGlobalClusterError::DBClusterNotFoundFault(ref cause) => cause,
RemoveFromGlobalClusterError::GlobalClusterNotFoundFault(ref cause) => cause,
RemoveFromGlobalClusterError::InvalidGlobalClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveRoleFromDBClusterError {
DBClusterNotFoundFault(String),
DBClusterRoleNotFoundFault(String),
InvalidDBClusterStateFault(String),
}
impl RemoveRoleFromDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveRoleFromDBClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
RemoveRoleFromDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterRoleNotFound" => {
return RusotoError::Service(
RemoveRoleFromDBClusterError::DBClusterRoleNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
RemoveRoleFromDBClusterError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RemoveRoleFromDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveRoleFromDBClusterError {
fn description(&self) -> &str {
match *self {
RemoveRoleFromDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
RemoveRoleFromDBClusterError::DBClusterRoleNotFoundFault(ref cause) => cause,
RemoveRoleFromDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveRoleFromDBInstanceError {
DBInstanceNotFoundFault(String),
DBInstanceRoleNotFoundFault(String),
InvalidDBInstanceStateFault(String),
}
impl RemoveRoleFromDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveRoleFromDBInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
RemoveRoleFromDBInstanceError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceRoleNotFound" => {
return RusotoError::Service(
RemoveRoleFromDBInstanceError::DBInstanceRoleNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
RemoveRoleFromDBInstanceError::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 RemoveRoleFromDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveRoleFromDBInstanceError {
fn description(&self) -> &str {
match *self {
RemoveRoleFromDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
RemoveRoleFromDBInstanceError::DBInstanceRoleNotFoundFault(ref cause) => cause,
RemoveRoleFromDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveSourceIdentifierFromSubscriptionError {
SourceNotFoundFault(String),
SubscriptionNotFoundFault(String),
}
impl RemoveSourceIdentifierFromSubscriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RemoveSourceIdentifierFromSubscriptionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"SourceNotFound" => {
return RusotoError::Service(
RemoveSourceIdentifierFromSubscriptionError::SourceNotFoundFault(
parsed_error.message,
),
)
}
"SubscriptionNotFound" => {
return RusotoError::Service(
RemoveSourceIdentifierFromSubscriptionError::SubscriptionNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RemoveSourceIdentifierFromSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveSourceIdentifierFromSubscriptionError {
fn description(&self) -> &str {
match *self {
RemoveSourceIdentifierFromSubscriptionError::SourceNotFoundFault(ref cause) => cause,
RemoveSourceIdentifierFromSubscriptionError::SubscriptionNotFoundFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsFromResourceError {
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
DBSnapshotNotFoundFault(String),
}
impl RemoveTagsFromResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromResourceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterNotFoundFault" => {
return RusotoError::Service(
RemoveTagsFromResourceError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
RemoveTagsFromResourceError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
RemoveTagsFromResourceError::DBSnapshotNotFoundFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RemoveTagsFromResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveTagsFromResourceError {
fn description(&self) -> &str {
match *self {
RemoveTagsFromResourceError::DBClusterNotFoundFault(ref cause) => cause,
RemoveTagsFromResourceError::DBInstanceNotFoundFault(ref cause) => cause,
RemoveTagsFromResourceError::DBSnapshotNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetDBClusterParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl ResetDBClusterParameterGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ResetDBClusterParameterGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ResetDBClusterParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
ResetDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ResetDBClusterParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetDBClusterParameterGroupError {
fn description(&self) -> &str {
match *self {
ResetDBClusterParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
ResetDBClusterParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetDBParameterGroupError {
DBParameterGroupNotFoundFault(String),
InvalidDBParameterGroupStateFault(String),
}
impl ResetDBParameterGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResetDBParameterGroupError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBParameterGroupNotFound" => {
return RusotoError::Service(
ResetDBParameterGroupError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBParameterGroupState" => {
return RusotoError::Service(
ResetDBParameterGroupError::InvalidDBParameterGroupStateFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ResetDBParameterGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetDBParameterGroupError {
fn description(&self) -> &str {
match *self {
ResetDBParameterGroupError::DBParameterGroupNotFoundFault(ref cause) => cause,
ResetDBParameterGroupError::InvalidDBParameterGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBClusterFromS3Error {
DBClusterAlreadyExistsFault(String),
DBClusterNotFoundFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBClusterQuotaExceededFault(String),
DBSubnetGroupNotFoundFault(String),
InsufficientStorageClusterCapacityFault(String),
InvalidDBClusterStateFault(String),
InvalidDBSubnetGroupStateFault(String),
InvalidS3BucketFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
StorageQuotaExceededFault(String),
}
impl RestoreDBClusterFromS3Error {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreDBClusterFromS3Error> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
RestoreDBClusterFromS3Error::DBClusterAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterParameterGroupNotFound" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::DBClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterQuotaExceededFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::DBClusterQuotaExceededFault(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InsufficientStorageClusterCapacity" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::InsufficientStorageClusterCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBSubnetGroupStateFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::InvalidDBSubnetGroupStateFault(
parsed_error.message,
),
)
}
"InvalidS3BucketFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::InvalidS3BucketFault(parsed_error.message),
)
}
"InvalidSubnet" => {
return RusotoError::Service(RestoreDBClusterFromS3Error::InvalidSubnet(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBClusterFromS3Error::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 RestoreDBClusterFromS3Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBClusterFromS3Error {
fn description(&self) -> &str {
match *self {
RestoreDBClusterFromS3Error::DBClusterAlreadyExistsFault(ref cause) => cause,
RestoreDBClusterFromS3Error::DBClusterNotFoundFault(ref cause) => cause,
RestoreDBClusterFromS3Error::DBClusterParameterGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterFromS3Error::DBClusterQuotaExceededFault(ref cause) => cause,
RestoreDBClusterFromS3Error::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterFromS3Error::InsufficientStorageClusterCapacityFault(ref cause) => {
cause
}
RestoreDBClusterFromS3Error::InvalidDBClusterStateFault(ref cause) => cause,
RestoreDBClusterFromS3Error::InvalidDBSubnetGroupStateFault(ref cause) => cause,
RestoreDBClusterFromS3Error::InvalidS3BucketFault(ref cause) => cause,
RestoreDBClusterFromS3Error::InvalidSubnet(ref cause) => cause,
RestoreDBClusterFromS3Error::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBClusterFromS3Error::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBClusterFromS3Error::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBClusterFromSnapshotError {
DBClusterAlreadyExistsFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBClusterQuotaExceededFault(String),
DBClusterSnapshotNotFoundFault(String),
DBSnapshotNotFoundFault(String),
DBSubnetGroupNotFoundFault(String),
InsufficientDBClusterCapacityFault(String),
InsufficientStorageClusterCapacityFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBSnapshotStateFault(String),
InvalidRestoreFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
StorageQuotaExceededFault(String),
}
impl RestoreDBClusterFromSnapshotError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreDBClusterFromSnapshotError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterAlreadyExistsFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterParameterGroupNotFound" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterQuotaExceededFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterQuotaExceededFault(
parsed_error.message,
),
)
}
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InsufficientDBClusterCapacityFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InsufficientDBClusterCapacityFault(
parsed_error.message,
),
)
}
"InsufficientStorageClusterCapacity" => return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InsufficientStorageClusterCapacityFault(
parsed_error.message,
),
),
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBSnapshotState" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidDBSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidRestoreFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidRestoreFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidSubnet(parsed_error.message),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBClusterFromSnapshotError::StorageQuotaExceededFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RestoreDBClusterFromSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBClusterFromSnapshotError {
fn description(&self) -> &str {
match *self {
RestoreDBClusterFromSnapshotError::DBClusterAlreadyExistsFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBClusterParameterGroupNotFoundFault(ref cause) => {
cause
}
RestoreDBClusterFromSnapshotError::DBClusterQuotaExceededFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBSnapshotNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InsufficientDBClusterCapacityFault(ref cause) => {
cause
}
RestoreDBClusterFromSnapshotError::InsufficientStorageClusterCapacityFault(
ref cause,
) => cause,
RestoreDBClusterFromSnapshotError::InvalidDBClusterSnapshotStateFault(ref cause) => {
cause
}
RestoreDBClusterFromSnapshotError::InvalidDBSnapshotStateFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InvalidRestoreFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InvalidSubnet(ref cause) => cause,
RestoreDBClusterFromSnapshotError::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::OptionGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterFromSnapshotError::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBClusterToPointInTimeError {
DBClusterAlreadyExistsFault(String),
DBClusterNotFoundFault(String),
DBClusterParameterGroupNotFoundFault(String),
DBClusterQuotaExceededFault(String),
DBClusterSnapshotNotFoundFault(String),
DBSubnetGroupNotFoundFault(String),
InsufficientDBClusterCapacityFault(String),
InsufficientStorageClusterCapacityFault(String),
InvalidDBClusterSnapshotStateFault(String),
InvalidDBClusterStateFault(String),
InvalidDBSnapshotStateFault(String),
InvalidRestoreFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
StorageQuotaExceededFault(String),
}
impl RestoreDBClusterToPointInTimeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreDBClusterToPointInTimeError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DBClusterAlreadyExistsFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterNotFoundFault(
parsed_error.message,
),
)
}
"DBClusterParameterGroupNotFound" => return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterParameterGroupNotFoundFault(
parsed_error.message,
),
),
"DBClusterQuotaExceededFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterQuotaExceededFault(
parsed_error.message,
),
)
}
"DBClusterSnapshotNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBClusterSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InsufficientDBClusterCapacityFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InsufficientDBClusterCapacityFault(
parsed_error.message,
),
)
}
"InsufficientStorageClusterCapacity" => return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InsufficientStorageClusterCapacityFault(
parsed_error.message,
),
),
"InvalidDBClusterSnapshotStateFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidDBClusterSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBSnapshotState" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidDBSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidRestoreFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidRestoreFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidSubnet(parsed_error.message),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBClusterToPointInTimeError::StorageQuotaExceededFault(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for RestoreDBClusterToPointInTimeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBClusterToPointInTimeError {
fn description(&self) -> &str {
match *self {
RestoreDBClusterToPointInTimeError::DBClusterAlreadyExistsFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBClusterNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBClusterParameterGroupNotFoundFault(ref cause) => {
cause
}
RestoreDBClusterToPointInTimeError::DBClusterQuotaExceededFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBClusterSnapshotNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InsufficientDBClusterCapacityFault(ref cause) => {
cause
}
RestoreDBClusterToPointInTimeError::InsufficientStorageClusterCapacityFault(
ref cause,
) => cause,
RestoreDBClusterToPointInTimeError::InvalidDBClusterSnapshotStateFault(ref cause) => {
cause
}
RestoreDBClusterToPointInTimeError::InvalidDBClusterStateFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidDBSnapshotStateFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidRestoreFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidSubnet(ref cause) => cause,
RestoreDBClusterToPointInTimeError::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::OptionGroupNotFoundFault(ref cause) => cause,
RestoreDBClusterToPointInTimeError::StorageQuotaExceededFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBInstanceFromDBSnapshotError {
AuthorizationNotFoundFault(String),
BackupPolicyNotFoundFault(String),
DBInstanceAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBSnapshotNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
DomainNotFoundFault(String),
InstanceQuotaExceededFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBSnapshotStateFault(String),
InvalidRestoreFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl RestoreDBInstanceFromDBSnapshotError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreDBInstanceFromDBSnapshotError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
RestoreDBInstanceFromDBSnapshotError::AuthorizationNotFoundFault(
parsed_error.message,
),
)
}
"BackupPolicyNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::BackupPolicyNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSnapshotNotFound" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::DBSnapshotNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
),
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"DomainNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::DomainNotFoundFault(
parsed_error.message,
),
)
}
"InstanceQuotaExceeded" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::InstanceQuotaExceededFault(
parsed_error.message,
),
)
}
"InsufficientDBInstanceCapacity" => return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
),
"InvalidDBSnapshotState" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::InvalidDBSnapshotStateFault(
parsed_error.message,
),
)
}
"InvalidRestoreFault" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::InvalidRestoreFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::InvalidSubnet(
parsed_error.message,
),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"ProvisionedIopsNotAvailableInAZFault" => return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
),
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::StorageQuotaExceededFault(
parsed_error.message,
),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
RestoreDBInstanceFromDBSnapshotError::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 RestoreDBInstanceFromDBSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBInstanceFromDBSnapshotError {
fn description(&self) -> &str {
match *self {
RestoreDBInstanceFromDBSnapshotError::AuthorizationNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::BackupPolicyNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::DBInstanceAlreadyExistsFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::DBParameterGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::DBSecurityGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::DBSnapshotNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => {
cause
}
RestoreDBInstanceFromDBSnapshotError::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::DomainNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::InstanceQuotaExceededFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::InsufficientDBInstanceCapacityFault(
ref cause,
) => cause,
RestoreDBInstanceFromDBSnapshotError::InvalidDBSnapshotStateFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::InvalidRestoreFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::InvalidSubnet(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::OptionGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::ProvisionedIopsNotAvailableInAZFault(
ref cause,
) => cause,
RestoreDBInstanceFromDBSnapshotError::StorageQuotaExceededFault(ref cause) => cause,
RestoreDBInstanceFromDBSnapshotError::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBInstanceFromS3Error {
AuthorizationNotFoundFault(String),
BackupPolicyNotFoundFault(String),
DBInstanceAlreadyExistsFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
InstanceQuotaExceededFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidS3BucketFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl RestoreDBInstanceFromS3Error {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreDBInstanceFromS3Error> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
RestoreDBInstanceFromS3Error::AuthorizationNotFoundFault(
parsed_error.message,
),
)
}
"BackupPolicyNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::BackupPolicyNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"InstanceQuotaExceeded" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::InstanceQuotaExceededFault(
parsed_error.message,
),
)
}
"InsufficientDBInstanceCapacity" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
)
}
"InvalidS3BucketFault" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::InvalidS3BucketFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(RestoreDBInstanceFromS3Error::InvalidSubnet(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"ProvisionedIopsNotAvailableInAZFault" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
)
}
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::StorageQuotaExceededFault(
parsed_error.message,
),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
RestoreDBInstanceFromS3Error::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 RestoreDBInstanceFromS3Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBInstanceFromS3Error {
fn description(&self) -> &str {
match *self {
RestoreDBInstanceFromS3Error::AuthorizationNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::BackupPolicyNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::DBInstanceAlreadyExistsFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::DBParameterGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::DBSecurityGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
RestoreDBInstanceFromS3Error::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::InstanceQuotaExceededFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::InsufficientDBInstanceCapacityFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::InvalidS3BucketFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::InvalidSubnet(ref cause) => cause,
RestoreDBInstanceFromS3Error::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::OptionGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::ProvisionedIopsNotAvailableInAZFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::StorageQuotaExceededFault(ref cause) => cause,
RestoreDBInstanceFromS3Error::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDBInstanceToPointInTimeError {
AuthorizationNotFoundFault(String),
BackupPolicyNotFoundFault(String),
DBInstanceAlreadyExistsFault(String),
DBInstanceAutomatedBackupNotFoundFault(String),
DBInstanceNotFoundFault(String),
DBParameterGroupNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
DomainNotFoundFault(String),
InstanceQuotaExceededFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBInstanceStateFault(String),
InvalidRestoreFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
OptionGroupNotFoundFault(String),
PointInTimeRestoreNotEnabledFault(String),
ProvisionedIopsNotAvailableInAZFault(String),
StorageQuotaExceededFault(String),
StorageTypeNotSupportedFault(String),
}
impl RestoreDBInstanceToPointInTimeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RestoreDBInstanceToPointInTimeError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
RestoreDBInstanceToPointInTimeError::AuthorizationNotFoundFault(
parsed_error.message,
),
)
}
"BackupPolicyNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::BackupPolicyNotFoundFault(
parsed_error.message,
),
)
}
"DBInstanceAlreadyExists" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DBInstanceAlreadyExistsFault(
parsed_error.message,
),
)
}
"DBInstanceAutomatedBackupNotFound" => return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DBInstanceAutomatedBackupNotFoundFault(
parsed_error.message,
),
),
"DBInstanceNotFound" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DBInstanceNotFoundFault(
parsed_error.message,
),
)
}
"DBParameterGroupNotFound" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DBParameterGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DBSubnetGroupNotFoundFault(
parsed_error.message,
),
)
}
"DomainNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::DomainNotFoundFault(
parsed_error.message,
),
)
}
"InstanceQuotaExceeded" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::InstanceQuotaExceededFault(
parsed_error.message,
),
)
}
"InsufficientDBInstanceCapacity" => return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
),
"InvalidDBInstanceState" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"InvalidRestoreFault" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::InvalidRestoreFault(
parsed_error.message,
),
)
}
"InvalidSubnet" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::InvalidSubnet(
parsed_error.message,
),
)
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::InvalidVPCNetworkStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"OptionGroupNotFoundFault" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::OptionGroupNotFoundFault(
parsed_error.message,
),
)
}
"PointInTimeRestoreNotEnabled" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::PointInTimeRestoreNotEnabledFault(
parsed_error.message,
),
)
}
"ProvisionedIopsNotAvailableInAZFault" => return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::ProvisionedIopsNotAvailableInAZFault(
parsed_error.message,
),
),
"StorageQuotaExceeded" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::StorageQuotaExceededFault(
parsed_error.message,
),
)
}
"StorageTypeNotSupported" => {
return RusotoError::Service(
RestoreDBInstanceToPointInTimeError::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 RestoreDBInstanceToPointInTimeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDBInstanceToPointInTimeError {
fn description(&self) -> &str {
match *self {
RestoreDBInstanceToPointInTimeError::AuthorizationNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::BackupPolicyNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::DBInstanceAlreadyExistsFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::DBInstanceAutomatedBackupNotFoundFault(
ref cause,
) => cause,
RestoreDBInstanceToPointInTimeError::DBInstanceNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::DBParameterGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::DBSecurityGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => {
cause
}
RestoreDBInstanceToPointInTimeError::DBSubnetGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::DomainNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::InstanceQuotaExceededFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::InsufficientDBInstanceCapacityFault(ref cause) => {
cause
}
RestoreDBInstanceToPointInTimeError::InvalidDBInstanceStateFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::InvalidRestoreFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::InvalidSubnet(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::InvalidVPCNetworkStateFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::KMSKeyNotAccessibleFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::OptionGroupNotFoundFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::PointInTimeRestoreNotEnabledFault(ref cause) => {
cause
}
RestoreDBInstanceToPointInTimeError::ProvisionedIopsNotAvailableInAZFault(
ref cause,
) => cause,
RestoreDBInstanceToPointInTimeError::StorageQuotaExceededFault(ref cause) => cause,
RestoreDBInstanceToPointInTimeError::StorageTypeNotSupportedFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RevokeDBSecurityGroupIngressError {
AuthorizationNotFoundFault(String),
DBSecurityGroupNotFoundFault(String),
InvalidDBSecurityGroupStateFault(String),
}
impl RevokeDBSecurityGroupIngressError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RevokeDBSecurityGroupIngressError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
RevokeDBSecurityGroupIngressError::AuthorizationNotFoundFault(
parsed_error.message,
),
)
}
"DBSecurityGroupNotFound" => {
return RusotoError::Service(
RevokeDBSecurityGroupIngressError::DBSecurityGroupNotFoundFault(
parsed_error.message,
),
)
}
"InvalidDBSecurityGroupState" => {
return RusotoError::Service(
RevokeDBSecurityGroupIngressError::InvalidDBSecurityGroupStateFault(
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 RevokeDBSecurityGroupIngressError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RevokeDBSecurityGroupIngressError {
fn description(&self) -> &str {
match *self {
RevokeDBSecurityGroupIngressError::AuthorizationNotFoundFault(ref cause) => cause,
RevokeDBSecurityGroupIngressError::DBSecurityGroupNotFoundFault(ref cause) => cause,
RevokeDBSecurityGroupIngressError::InvalidDBSecurityGroupStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartActivityStreamError {
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
KMSKeyNotAccessibleFault(String),
ResourceNotFoundFault(String),
}
impl StartActivityStreamError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartActivityStreamError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
StartActivityStreamError::DBClusterNotFoundFault(parsed_error.message),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
StartActivityStreamError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
StartActivityStreamError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
StartActivityStreamError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
StartActivityStreamError::KMSKeyNotAccessibleFault(
parsed_error.message,
),
)
}
"ResourceNotFoundFault" => {
return RusotoError::Service(
StartActivityStreamError::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 StartActivityStreamError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartActivityStreamError {
fn description(&self) -> &str {
match *self {
StartActivityStreamError::DBClusterNotFoundFault(ref cause) => cause,
StartActivityStreamError::DBInstanceNotFoundFault(ref cause) => cause,
StartActivityStreamError::InvalidDBClusterStateFault(ref cause) => cause,
StartActivityStreamError::InvalidDBInstanceStateFault(ref cause) => cause,
StartActivityStreamError::KMSKeyNotAccessibleFault(ref cause) => cause,
StartActivityStreamError::ResourceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartDBClusterError {
DBClusterNotFoundFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
}
impl StartDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartDBClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(StartDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
StartDBClusterError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
StartDBClusterError::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 StartDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartDBClusterError {
fn description(&self) -> &str {
match *self {
StartDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
StartDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
StartDBClusterError::InvalidDBInstanceStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartDBInstanceError {
AuthorizationNotFoundFault(String),
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
DBSubnetGroupDoesNotCoverEnoughAZs(String),
DBSubnetGroupNotFoundFault(String),
InsufficientDBInstanceCapacityFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
InvalidSubnet(String),
InvalidVPCNetworkStateFault(String),
KMSKeyNotAccessibleFault(String),
}
impl StartDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartDBInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
StartDBInstanceError::AuthorizationNotFoundFault(parsed_error.message),
)
}
"DBClusterNotFoundFault" => {
return RusotoError::Service(StartDBInstanceError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"DBInstanceNotFound" => {
return RusotoError::Service(StartDBInstanceError::DBInstanceNotFoundFault(
parsed_error.message,
))
}
"DBSubnetGroupDoesNotCoverEnoughAZs" => {
return RusotoError::Service(
StartDBInstanceError::DBSubnetGroupDoesNotCoverEnoughAZs(
parsed_error.message,
),
)
}
"DBSubnetGroupNotFoundFault" => {
return RusotoError::Service(
StartDBInstanceError::DBSubnetGroupNotFoundFault(parsed_error.message),
)
}
"InsufficientDBInstanceCapacity" => {
return RusotoError::Service(
StartDBInstanceError::InsufficientDBInstanceCapacityFault(
parsed_error.message,
),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
StartDBInstanceError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
StartDBInstanceError::InvalidDBInstanceStateFault(parsed_error.message),
)
}
"InvalidSubnet" => {
return RusotoError::Service(StartDBInstanceError::InvalidSubnet(
parsed_error.message,
))
}
"InvalidVPCNetworkStateFault" => {
return RusotoError::Service(
StartDBInstanceError::InvalidVPCNetworkStateFault(parsed_error.message),
)
}
"KMSKeyNotAccessibleFault" => {
return RusotoError::Service(
StartDBInstanceError::KMSKeyNotAccessibleFault(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 StartDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartDBInstanceError {
fn description(&self) -> &str {
match *self {
StartDBInstanceError::AuthorizationNotFoundFault(ref cause) => cause,
StartDBInstanceError::DBClusterNotFoundFault(ref cause) => cause,
StartDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
StartDBInstanceError::DBSubnetGroupDoesNotCoverEnoughAZs(ref cause) => cause,
StartDBInstanceError::DBSubnetGroupNotFoundFault(ref cause) => cause,
StartDBInstanceError::InsufficientDBInstanceCapacityFault(ref cause) => cause,
StartDBInstanceError::InvalidDBClusterStateFault(ref cause) => cause,
StartDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
StartDBInstanceError::InvalidSubnet(ref cause) => cause,
StartDBInstanceError::InvalidVPCNetworkStateFault(ref cause) => cause,
StartDBInstanceError::KMSKeyNotAccessibleFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopActivityStreamError {
DBClusterNotFoundFault(String),
DBInstanceNotFoundFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
ResourceNotFoundFault(String),
}
impl StopActivityStreamError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopActivityStreamError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(
StopActivityStreamError::DBClusterNotFoundFault(parsed_error.message),
)
}
"DBInstanceNotFound" => {
return RusotoError::Service(
StopActivityStreamError::DBInstanceNotFoundFault(parsed_error.message),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
StopActivityStreamError::InvalidDBClusterStateFault(
parsed_error.message,
),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
StopActivityStreamError::InvalidDBInstanceStateFault(
parsed_error.message,
),
)
}
"ResourceNotFoundFault" => {
return RusotoError::Service(
StopActivityStreamError::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 StopActivityStreamError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopActivityStreamError {
fn description(&self) -> &str {
match *self {
StopActivityStreamError::DBClusterNotFoundFault(ref cause) => cause,
StopActivityStreamError::DBInstanceNotFoundFault(ref cause) => cause,
StopActivityStreamError::InvalidDBClusterStateFault(ref cause) => cause,
StopActivityStreamError::InvalidDBInstanceStateFault(ref cause) => cause,
StopActivityStreamError::ResourceNotFoundFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopDBClusterError {
DBClusterNotFoundFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
}
impl StopDBClusterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopDBClusterError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(StopDBClusterError::DBClusterNotFoundFault(
parsed_error.message,
))
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
StopDBClusterError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
StopDBClusterError::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 StopDBClusterError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopDBClusterError {
fn description(&self) -> &str {
match *self {
StopDBClusterError::DBClusterNotFoundFault(ref cause) => cause,
StopDBClusterError::InvalidDBClusterStateFault(ref cause) => cause,
StopDBClusterError::InvalidDBInstanceStateFault(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopDBInstanceError {
DBInstanceNotFoundFault(String),
DBSnapshotAlreadyExistsFault(String),
InvalidDBClusterStateFault(String),
InvalidDBInstanceStateFault(String),
SnapshotQuotaExceededFault(String),
}
impl StopDBInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopDBInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = 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(StopDBInstanceError::DBInstanceNotFoundFault(
parsed_error.message,
))
}
"DBSnapshotAlreadyExists" => {
return RusotoError::Service(
StopDBInstanceError::DBSnapshotAlreadyExistsFault(parsed_error.message),
)
}
"InvalidDBClusterStateFault" => {
return RusotoError::Service(
StopDBInstanceError::InvalidDBClusterStateFault(parsed_error.message),
)
}
"InvalidDBInstanceState" => {
return RusotoError::Service(
StopDBInstanceError::InvalidDBInstanceStateFault(parsed_error.message),
)
}
"SnapshotQuotaExceeded" => {
return RusotoError::Service(
StopDBInstanceError::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 StopDBInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopDBInstanceError {
fn description(&self) -> &str {
match *self {
StopDBInstanceError::DBInstanceNotFoundFault(ref cause) => cause,
StopDBInstanceError::DBSnapshotAlreadyExistsFault(ref cause) => cause,
StopDBInstanceError::InvalidDBClusterStateFault(ref cause) => cause,
StopDBInstanceError::InvalidDBInstanceStateFault(ref cause) => cause,
StopDBInstanceError::SnapshotQuotaExceededFault(ref cause) => cause,
}
}
}
pub trait Rds {
fn add_role_to_db_cluster(
&self,
input: AddRoleToDBClusterMessage,
) -> RusotoFuture<(), AddRoleToDBClusterError>;
fn add_role_to_db_instance(
&self,
input: AddRoleToDBInstanceMessage,
) -> RusotoFuture<(), AddRoleToDBInstanceError>;
fn add_source_identifier_to_subscription(
&self,
input: AddSourceIdentifierToSubscriptionMessage,
) -> RusotoFuture<AddSourceIdentifierToSubscriptionResult, AddSourceIdentifierToSubscriptionError>;
fn add_tags_to_resource(
&self,
input: AddTagsToResourceMessage,
) -> RusotoFuture<(), AddTagsToResourceError>;
fn apply_pending_maintenance_action(
&self,
input: ApplyPendingMaintenanceActionMessage,
) -> RusotoFuture<ApplyPendingMaintenanceActionResult, ApplyPendingMaintenanceActionError>;
fn authorize_db_security_group_ingress(
&self,
input: AuthorizeDBSecurityGroupIngressMessage,
) -> RusotoFuture<AuthorizeDBSecurityGroupIngressResult, AuthorizeDBSecurityGroupIngressError>;
fn backtrack_db_cluster(
&self,
input: BacktrackDBClusterMessage,
) -> RusotoFuture<DBClusterBacktrack, BacktrackDBClusterError>;
fn copy_db_cluster_parameter_group(
&self,
input: CopyDBClusterParameterGroupMessage,
) -> RusotoFuture<CopyDBClusterParameterGroupResult, CopyDBClusterParameterGroupError>;
fn copy_db_cluster_snapshot(
&self,
input: CopyDBClusterSnapshotMessage,
) -> RusotoFuture<CopyDBClusterSnapshotResult, CopyDBClusterSnapshotError>;
fn copy_db_parameter_group(
&self,
input: CopyDBParameterGroupMessage,
) -> RusotoFuture<CopyDBParameterGroupResult, CopyDBParameterGroupError>;
fn copy_db_snapshot(
&self,
input: CopyDBSnapshotMessage,
) -> RusotoFuture<CopyDBSnapshotResult, CopyDBSnapshotError>;
fn copy_option_group(
&self,
input: CopyOptionGroupMessage,
) -> RusotoFuture<CopyOptionGroupResult, CopyOptionGroupError>;
fn create_db_cluster(
&self,
input: CreateDBClusterMessage,
) -> RusotoFuture<CreateDBClusterResult, CreateDBClusterError>;
fn create_db_cluster_endpoint(
&self,
input: CreateDBClusterEndpointMessage,
) -> RusotoFuture<DBClusterEndpoint, CreateDBClusterEndpointError>;
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_instance_read_replica(
&self,
input: CreateDBInstanceReadReplicaMessage,
) -> RusotoFuture<CreateDBInstanceReadReplicaResult, CreateDBInstanceReadReplicaError>;
fn create_db_parameter_group(
&self,
input: CreateDBParameterGroupMessage,
) -> RusotoFuture<CreateDBParameterGroupResult, CreateDBParameterGroupError>;
fn create_db_security_group(
&self,
input: CreateDBSecurityGroupMessage,
) -> RusotoFuture<CreateDBSecurityGroupResult, CreateDBSecurityGroupError>;
fn create_db_snapshot(
&self,
input: CreateDBSnapshotMessage,
) -> RusotoFuture<CreateDBSnapshotResult, CreateDBSnapshotError>;
fn create_db_subnet_group(
&self,
input: CreateDBSubnetGroupMessage,
) -> RusotoFuture<CreateDBSubnetGroupResult, CreateDBSubnetGroupError>;
fn create_event_subscription(
&self,
input: CreateEventSubscriptionMessage,
) -> RusotoFuture<CreateEventSubscriptionResult, CreateEventSubscriptionError>;
fn create_global_cluster(
&self,
input: CreateGlobalClusterMessage,
) -> RusotoFuture<CreateGlobalClusterResult, CreateGlobalClusterError>;
fn create_option_group(
&self,
input: CreateOptionGroupMessage,
) -> RusotoFuture<CreateOptionGroupResult, CreateOptionGroupError>;
fn delete_db_cluster(
&self,
input: DeleteDBClusterMessage,
) -> RusotoFuture<DeleteDBClusterResult, DeleteDBClusterError>;
fn delete_db_cluster_endpoint(
&self,
input: DeleteDBClusterEndpointMessage,
) -> RusotoFuture<DBClusterEndpoint, DeleteDBClusterEndpointError>;
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_instance_automated_backup(
&self,
input: DeleteDBInstanceAutomatedBackupMessage,
) -> RusotoFuture<DeleteDBInstanceAutomatedBackupResult, DeleteDBInstanceAutomatedBackupError>;
fn delete_db_parameter_group(
&self,
input: DeleteDBParameterGroupMessage,
) -> RusotoFuture<(), DeleteDBParameterGroupError>;
fn delete_db_security_group(
&self,
input: DeleteDBSecurityGroupMessage,
) -> RusotoFuture<(), DeleteDBSecurityGroupError>;
fn delete_db_snapshot(
&self,
input: DeleteDBSnapshotMessage,
) -> RusotoFuture<DeleteDBSnapshotResult, DeleteDBSnapshotError>;
fn delete_db_subnet_group(
&self,
input: DeleteDBSubnetGroupMessage,
) -> RusotoFuture<(), DeleteDBSubnetGroupError>;
fn delete_event_subscription(
&self,
input: DeleteEventSubscriptionMessage,
) -> RusotoFuture<DeleteEventSubscriptionResult, DeleteEventSubscriptionError>;
fn delete_global_cluster(
&self,
input: DeleteGlobalClusterMessage,
) -> RusotoFuture<DeleteGlobalClusterResult, DeleteGlobalClusterError>;
fn delete_option_group(
&self,
input: DeleteOptionGroupMessage,
) -> RusotoFuture<(), DeleteOptionGroupError>;
fn describe_account_attributes(
&self,
input: DescribeAccountAttributesMessage,
) -> RusotoFuture<AccountAttributesMessage, DescribeAccountAttributesError>;
fn describe_certificates(
&self,
input: DescribeCertificatesMessage,
) -> RusotoFuture<CertificateMessage, DescribeCertificatesError>;
fn describe_db_cluster_backtracks(
&self,
input: DescribeDBClusterBacktracksMessage,
) -> RusotoFuture<DBClusterBacktrackMessage, DescribeDBClusterBacktracksError>;
fn describe_db_cluster_endpoints(
&self,
input: DescribeDBClusterEndpointsMessage,
) -> RusotoFuture<DBClusterEndpointMessage, DescribeDBClusterEndpointsError>;
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_instance_automated_backups(
&self,
input: DescribeDBInstanceAutomatedBackupsMessage,
) -> RusotoFuture<DBInstanceAutomatedBackupMessage, DescribeDBInstanceAutomatedBackupsError>;
fn describe_db_instances(
&self,
input: DescribeDBInstancesMessage,
) -> RusotoFuture<DBInstanceMessage, DescribeDBInstancesError>;
fn describe_db_log_files(
&self,
input: DescribeDBLogFilesMessage,
) -> RusotoFuture<DescribeDBLogFilesResponse, DescribeDBLogFilesError>;
fn describe_db_parameter_groups(
&self,
input: DescribeDBParameterGroupsMessage,
) -> RusotoFuture<DBParameterGroupsMessage, DescribeDBParameterGroupsError>;
fn describe_db_parameters(
&self,
input: DescribeDBParametersMessage,
) -> RusotoFuture<DBParameterGroupDetails, DescribeDBParametersError>;
fn describe_db_security_groups(
&self,
input: DescribeDBSecurityGroupsMessage,
) -> RusotoFuture<DBSecurityGroupMessage, DescribeDBSecurityGroupsError>;
fn describe_db_snapshot_attributes(
&self,
input: DescribeDBSnapshotAttributesMessage,
) -> RusotoFuture<DescribeDBSnapshotAttributesResult, DescribeDBSnapshotAttributesError>;
fn describe_db_snapshots(
&self,
input: DescribeDBSnapshotsMessage,
) -> RusotoFuture<DBSnapshotMessage, DescribeDBSnapshotsError>;
fn describe_db_subnet_groups(
&self,
input: DescribeDBSubnetGroupsMessage,
) -> RusotoFuture<DBSubnetGroupMessage, DescribeDBSubnetGroupsError>;
fn describe_engine_default_cluster_parameters(
&self,
input: DescribeEngineDefaultClusterParametersMessage,
) -> RusotoFuture<
DescribeEngineDefaultClusterParametersResult,
DescribeEngineDefaultClusterParametersError,
>;
fn describe_engine_default_parameters(
&self,
input: DescribeEngineDefaultParametersMessage,
) -> RusotoFuture<DescribeEngineDefaultParametersResult, DescribeEngineDefaultParametersError>;
fn describe_event_categories(
&self,
input: DescribeEventCategoriesMessage,
) -> RusotoFuture<EventCategoriesMessage, DescribeEventCategoriesError>;
fn describe_event_subscriptions(
&self,
input: DescribeEventSubscriptionsMessage,
) -> RusotoFuture<EventSubscriptionsMessage, DescribeEventSubscriptionsError>;
fn describe_events(
&self,
input: DescribeEventsMessage,
) -> RusotoFuture<EventsMessage, DescribeEventsError>;
fn describe_global_clusters(
&self,
input: DescribeGlobalClustersMessage,
) -> RusotoFuture<GlobalClustersMessage, DescribeGlobalClustersError>;
fn describe_option_group_options(
&self,
input: DescribeOptionGroupOptionsMessage,
) -> RusotoFuture<OptionGroupOptionsMessage, DescribeOptionGroupOptionsError>;
fn describe_option_groups(
&self,
input: DescribeOptionGroupsMessage,
) -> RusotoFuture<OptionGroups, DescribeOptionGroupsError>;
fn describe_orderable_db_instance_options(
&self,
input: DescribeOrderableDBInstanceOptionsMessage,
) -> RusotoFuture<OrderableDBInstanceOptionsMessage, DescribeOrderableDBInstanceOptionsError>;
fn describe_pending_maintenance_actions(
&self,
input: DescribePendingMaintenanceActionsMessage,
) -> RusotoFuture<PendingMaintenanceActionsMessage, DescribePendingMaintenanceActionsError>;
fn describe_reserved_db_instances(
&self,
input: DescribeReservedDBInstancesMessage,
) -> RusotoFuture<ReservedDBInstanceMessage, DescribeReservedDBInstancesError>;
fn describe_reserved_db_instances_offerings(
&self,
input: DescribeReservedDBInstancesOfferingsMessage,
) -> RusotoFuture<ReservedDBInstancesOfferingMessage, DescribeReservedDBInstancesOfferingsError>;
fn describe_source_regions(
&self,
input: DescribeSourceRegionsMessage,
) -> RusotoFuture<SourceRegionMessage, DescribeSourceRegionsError>;
fn describe_valid_db_instance_modifications(
&self,
input: DescribeValidDBInstanceModificationsMessage,
) -> RusotoFuture<
DescribeValidDBInstanceModificationsResult,
DescribeValidDBInstanceModificationsError,
>;
fn download_db_log_file_portion(
&self,
input: DownloadDBLogFilePortionMessage,
) -> RusotoFuture<DownloadDBLogFilePortionDetails, DownloadDBLogFilePortionError>;
fn failover_db_cluster(
&self,
input: FailoverDBClusterMessage,
) -> RusotoFuture<FailoverDBClusterResult, FailoverDBClusterError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceMessage,
) -> RusotoFuture<TagListMessage, ListTagsForResourceError>;
fn modify_current_db_cluster_capacity(
&self,
input: ModifyCurrentDBClusterCapacityMessage,
) -> RusotoFuture<DBClusterCapacityInfo, ModifyCurrentDBClusterCapacityError>;
fn modify_db_cluster(
&self,
input: ModifyDBClusterMessage,
) -> RusotoFuture<ModifyDBClusterResult, ModifyDBClusterError>;
fn modify_db_cluster_endpoint(
&self,
input: ModifyDBClusterEndpointMessage,
) -> RusotoFuture<DBClusterEndpoint, ModifyDBClusterEndpointError>;
fn modify_db_cluster_parameter_group(
&self,
input: ModifyDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ModifyDBClusterParameterGroupError>;
fn modify_db_cluster_snapshot_attribute(
&self,
input: ModifyDBClusterSnapshotAttributeMessage,
) -> RusotoFuture<ModifyDBClusterSnapshotAttributeResult, ModifyDBClusterSnapshotAttributeError>;
fn modify_db_instance(
&self,
input: ModifyDBInstanceMessage,
) -> RusotoFuture<ModifyDBInstanceResult, ModifyDBInstanceError>;
fn modify_db_parameter_group(
&self,
input: ModifyDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ModifyDBParameterGroupError>;
fn modify_db_snapshot(
&self,
input: ModifyDBSnapshotMessage,
) -> RusotoFuture<ModifyDBSnapshotResult, ModifyDBSnapshotError>;
fn modify_db_snapshot_attribute(
&self,
input: ModifyDBSnapshotAttributeMessage,
) -> RusotoFuture<ModifyDBSnapshotAttributeResult, ModifyDBSnapshotAttributeError>;
fn modify_db_subnet_group(
&self,
input: ModifyDBSubnetGroupMessage,
) -> RusotoFuture<ModifyDBSubnetGroupResult, ModifyDBSubnetGroupError>;
fn modify_event_subscription(
&self,
input: ModifyEventSubscriptionMessage,
) -> RusotoFuture<ModifyEventSubscriptionResult, ModifyEventSubscriptionError>;
fn modify_global_cluster(
&self,
input: ModifyGlobalClusterMessage,
) -> RusotoFuture<ModifyGlobalClusterResult, ModifyGlobalClusterError>;
fn modify_option_group(
&self,
input: ModifyOptionGroupMessage,
) -> RusotoFuture<ModifyOptionGroupResult, ModifyOptionGroupError>;
fn promote_read_replica(
&self,
input: PromoteReadReplicaMessage,
) -> RusotoFuture<PromoteReadReplicaResult, PromoteReadReplicaError>;
fn promote_read_replica_db_cluster(
&self,
input: PromoteReadReplicaDBClusterMessage,
) -> RusotoFuture<PromoteReadReplicaDBClusterResult, PromoteReadReplicaDBClusterError>;
fn purchase_reserved_db_instances_offering(
&self,
input: PurchaseReservedDBInstancesOfferingMessage,
) -> RusotoFuture<
PurchaseReservedDBInstancesOfferingResult,
PurchaseReservedDBInstancesOfferingError,
>;
fn reboot_db_instance(
&self,
input: RebootDBInstanceMessage,
) -> RusotoFuture<RebootDBInstanceResult, RebootDBInstanceError>;
fn remove_from_global_cluster(
&self,
input: RemoveFromGlobalClusterMessage,
) -> RusotoFuture<RemoveFromGlobalClusterResult, RemoveFromGlobalClusterError>;
fn remove_role_from_db_cluster(
&self,
input: RemoveRoleFromDBClusterMessage,
) -> RusotoFuture<(), RemoveRoleFromDBClusterError>;
fn remove_role_from_db_instance(
&self,
input: RemoveRoleFromDBInstanceMessage,
) -> RusotoFuture<(), RemoveRoleFromDBInstanceError>;
fn remove_source_identifier_from_subscription(
&self,
input: RemoveSourceIdentifierFromSubscriptionMessage,
) -> RusotoFuture<
RemoveSourceIdentifierFromSubscriptionResult,
RemoveSourceIdentifierFromSubscriptionError,
>;
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceMessage,
) -> RusotoFuture<(), RemoveTagsFromResourceError>;
fn reset_db_cluster_parameter_group(
&self,
input: ResetDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ResetDBClusterParameterGroupError>;
fn reset_db_parameter_group(
&self,
input: ResetDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ResetDBParameterGroupError>;
fn restore_db_cluster_from_s3(
&self,
input: RestoreDBClusterFromS3Message,
) -> RusotoFuture<RestoreDBClusterFromS3Result, RestoreDBClusterFromS3Error>;
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>;
fn restore_db_instance_from_db_snapshot(
&self,
input: RestoreDBInstanceFromDBSnapshotMessage,
) -> RusotoFuture<RestoreDBInstanceFromDBSnapshotResult, RestoreDBInstanceFromDBSnapshotError>;
fn restore_db_instance_from_s3(
&self,
input: RestoreDBInstanceFromS3Message,
) -> RusotoFuture<RestoreDBInstanceFromS3Result, RestoreDBInstanceFromS3Error>;
fn restore_db_instance_to_point_in_time(
&self,
input: RestoreDBInstanceToPointInTimeMessage,
) -> RusotoFuture<RestoreDBInstanceToPointInTimeResult, RestoreDBInstanceToPointInTimeError>;
fn revoke_db_security_group_ingress(
&self,
input: RevokeDBSecurityGroupIngressMessage,
) -> RusotoFuture<RevokeDBSecurityGroupIngressResult, RevokeDBSecurityGroupIngressError>;
fn start_activity_stream(
&self,
input: StartActivityStreamRequest,
) -> RusotoFuture<StartActivityStreamResponse, StartActivityStreamError>;
fn start_db_cluster(
&self,
input: StartDBClusterMessage,
) -> RusotoFuture<StartDBClusterResult, StartDBClusterError>;
fn start_db_instance(
&self,
input: StartDBInstanceMessage,
) -> RusotoFuture<StartDBInstanceResult, StartDBInstanceError>;
fn stop_activity_stream(
&self,
input: StopActivityStreamRequest,
) -> RusotoFuture<StopActivityStreamResponse, StopActivityStreamError>;
fn stop_db_cluster(
&self,
input: StopDBClusterMessage,
) -> RusotoFuture<StopDBClusterResult, StopDBClusterError>;
fn stop_db_instance(
&self,
input: StopDBInstanceMessage,
) -> RusotoFuture<StopDBInstanceResult, StopDBInstanceError>;
}
#[derive(Clone)]
pub struct RdsClient {
client: Client,
region: region::Region,
}
impl RdsClient {
pub fn new(region: region::Region) -> RdsClient {
RdsClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> RdsClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
RdsClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Rds for RdsClient {
fn add_role_to_db_cluster(
&self,
input: AddRoleToDBClusterMessage,
) -> RusotoFuture<(), AddRoleToDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddRoleToDBCluster");
params.put("Version", "2014-10-31");
AddRoleToDBClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddRoleToDBClusterError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn add_role_to_db_instance(
&self,
input: AddRoleToDBInstanceMessage,
) -> RusotoFuture<(), AddRoleToDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddRoleToDBInstance");
params.put("Version", "2014-10-31");
AddRoleToDBInstanceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(AddRoleToDBInstanceError::from_response(response))
}),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn add_source_identifier_to_subscription(
&self,
input: AddSourceIdentifierToSubscriptionMessage,
) -> RusotoFuture<AddSourceIdentifierToSubscriptionResult, AddSourceIdentifierToSubscriptionError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddSourceIdentifierToSubscription");
params.put("Version", "2014-10-31");
AddSourceIdentifierToSubscriptionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(AddSourceIdentifierToSubscriptionError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AddSourceIdentifierToSubscriptionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = AddSourceIdentifierToSubscriptionResultDeserializer::deserialize(
"AddSourceIdentifierToSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn add_tags_to_resource(
&self,
input: AddTagsToResourceMessage,
) -> RusotoFuture<(), AddTagsToResourceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AddTagsToResource");
params.put("Version", "2014-10-31");
AddTagsToResourceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddTagsToResourceError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn apply_pending_maintenance_action(
&self,
input: ApplyPendingMaintenanceActionMessage,
) -> RusotoFuture<ApplyPendingMaintenanceActionResult, ApplyPendingMaintenanceActionError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ApplyPendingMaintenanceAction");
params.put("Version", "2014-10-31");
ApplyPendingMaintenanceActionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ApplyPendingMaintenanceActionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ApplyPendingMaintenanceActionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ApplyPendingMaintenanceActionResultDeserializer::deserialize(
"ApplyPendingMaintenanceActionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn authorize_db_security_group_ingress(
&self,
input: AuthorizeDBSecurityGroupIngressMessage,
) -> RusotoFuture<AuthorizeDBSecurityGroupIngressResult, AuthorizeDBSecurityGroupIngressError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "AuthorizeDBSecurityGroupIngress");
params.put("Version", "2014-10-31");
AuthorizeDBSecurityGroupIngressMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(AuthorizeDBSecurityGroupIngressError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AuthorizeDBSecurityGroupIngressResult::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 = AuthorizeDBSecurityGroupIngressResultDeserializer::deserialize(
"AuthorizeDBSecurityGroupIngressResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn backtrack_db_cluster(
&self,
input: BacktrackDBClusterMessage,
) -> RusotoFuture<DBClusterBacktrack, BacktrackDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "BacktrackDBCluster");
params.put("Version", "2014-10-31");
BacktrackDBClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(BacktrackDBClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterBacktrack::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 = DBClusterBacktrackDeserializer::deserialize(
"BacktrackDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_db_cluster_parameter_group(
&self,
input: CopyDBClusterParameterGroupMessage,
) -> RusotoFuture<CopyDBClusterParameterGroupResult, CopyDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyDBClusterParameterGroup");
params.put("Version", "2014-10-31");
CopyDBClusterParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CopyDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyDBClusterParameterGroupResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CopyDBClusterParameterGroupResultDeserializer::deserialize(
"CopyDBClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_db_cluster_snapshot(
&self,
input: CopyDBClusterSnapshotMessage,
) -> RusotoFuture<CopyDBClusterSnapshotResult, CopyDBClusterSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyDBClusterSnapshot");
params.put("Version", "2014-10-31");
CopyDBClusterSnapshotMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CopyDBClusterSnapshotError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyDBClusterSnapshotResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CopyDBClusterSnapshotResultDeserializer::deserialize(
"CopyDBClusterSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_db_parameter_group(
&self,
input: CopyDBParameterGroupMessage,
) -> RusotoFuture<CopyDBParameterGroupResult, CopyDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyDBParameterGroup");
params.put("Version", "2014-10-31");
CopyDBParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(CopyDBParameterGroupError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyDBParameterGroupResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CopyDBParameterGroupResultDeserializer::deserialize(
"CopyDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_db_snapshot(
&self,
input: CopyDBSnapshotMessage,
) -> RusotoFuture<CopyDBSnapshotResult, CopyDBSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyDBSnapshot");
params.put("Version", "2014-10-31");
CopyDBSnapshotMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CopyDBSnapshotError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyDBSnapshotResult::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 = CopyDBSnapshotResultDeserializer::deserialize(
"CopyDBSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn copy_option_group(
&self,
input: CopyOptionGroupMessage,
) -> RusotoFuture<CopyOptionGroupResult, CopyOptionGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CopyOptionGroup");
params.put("Version", "2014-10-31");
CopyOptionGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CopyOptionGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CopyOptionGroupResult::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 = CopyOptionGroupResultDeserializer::deserialize(
"CopyOptionGroupResult",
&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_endpoint(
&self,
input: CreateDBClusterEndpointMessage,
) -> RusotoFuture<DBClusterEndpoint, CreateDBClusterEndpointError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBClusterEndpoint");
params.put("Version", "2014-10-31");
CreateDBClusterEndpointMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDBClusterEndpointError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterEndpoint::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 = DBClusterEndpointDeserializer::deserialize(
"CreateDBClusterEndpointResult",
&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_instance_read_replica(
&self,
input: CreateDBInstanceReadReplicaMessage,
) -> RusotoFuture<CreateDBInstanceReadReplicaResult, CreateDBInstanceReadReplicaError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBInstanceReadReplica");
params.put("Version", "2014-10-31");
CreateDBInstanceReadReplicaMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDBInstanceReadReplicaError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBInstanceReadReplicaResult::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 = CreateDBInstanceReadReplicaResultDeserializer::deserialize(
"CreateDBInstanceReadReplicaResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_parameter_group(
&self,
input: CreateDBParameterGroupMessage,
) -> RusotoFuture<CreateDBParameterGroupResult, CreateDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBParameterGroup");
params.put("Version", "2014-10-31");
CreateDBParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDBParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBParameterGroupResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateDBParameterGroupResultDeserializer::deserialize(
"CreateDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_security_group(
&self,
input: CreateDBSecurityGroupMessage,
) -> RusotoFuture<CreateDBSecurityGroupResult, CreateDBSecurityGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBSecurityGroup");
params.put("Version", "2014-10-31");
CreateDBSecurityGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDBSecurityGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBSecurityGroupResult::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 = CreateDBSecurityGroupResultDeserializer::deserialize(
"CreateDBSecurityGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_snapshot(
&self,
input: CreateDBSnapshotMessage,
) -> RusotoFuture<CreateDBSnapshotResult, CreateDBSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBSnapshot");
params.put("Version", "2014-10-31");
CreateDBSnapshotMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDBSnapshotError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBSnapshotResult::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 = CreateDBSnapshotResultDeserializer::deserialize(
"CreateDBSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_db_subnet_group(
&self,
input: CreateDBSubnetGroupMessage,
) -> RusotoFuture<CreateDBSubnetGroupResult, CreateDBSubnetGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateDBSubnetGroup");
params.put("Version", "2014-10-31");
CreateDBSubnetGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateDBSubnetGroupError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateDBSubnetGroupResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateDBSubnetGroupResultDeserializer::deserialize(
"CreateDBSubnetGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_event_subscription(
&self,
input: CreateEventSubscriptionMessage,
) -> RusotoFuture<CreateEventSubscriptionResult, CreateEventSubscriptionError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateEventSubscription");
params.put("Version", "2014-10-31");
CreateEventSubscriptionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateEventSubscriptionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateEventSubscriptionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = CreateEventSubscriptionResultDeserializer::deserialize(
"CreateEventSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_global_cluster(
&self,
input: CreateGlobalClusterMessage,
) -> RusotoFuture<CreateGlobalClusterResult, CreateGlobalClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateGlobalCluster");
params.put("Version", "2014-10-31");
CreateGlobalClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateGlobalClusterError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateGlobalClusterResult::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 = CreateGlobalClusterResultDeserializer::deserialize(
"CreateGlobalClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn create_option_group(
&self,
input: CreateOptionGroupMessage,
) -> RusotoFuture<CreateOptionGroupResult, CreateOptionGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "CreateOptionGroup");
params.put("Version", "2014-10-31");
CreateOptionGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateOptionGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CreateOptionGroupResult::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 = CreateOptionGroupResultDeserializer::deserialize(
"CreateOptionGroupResult",
&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_endpoint(
&self,
input: DeleteDBClusterEndpointMessage,
) -> RusotoFuture<DBClusterEndpoint, DeleteDBClusterEndpointError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBClusterEndpoint");
params.put("Version", "2014-10-31");
DeleteDBClusterEndpointMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDBClusterEndpointError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterEndpoint::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 = DBClusterEndpointDeserializer::deserialize(
"DeleteDBClusterEndpointResult",
&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_instance_automated_backup(
&self,
input: DeleteDBInstanceAutomatedBackupMessage,
) -> RusotoFuture<DeleteDBInstanceAutomatedBackupResult, DeleteDBInstanceAutomatedBackupError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBInstanceAutomatedBackup");
params.put("Version", "2014-10-31");
DeleteDBInstanceAutomatedBackupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDBInstanceAutomatedBackupError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteDBInstanceAutomatedBackupResult::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 = DeleteDBInstanceAutomatedBackupResultDeserializer::deserialize(
"DeleteDBInstanceAutomatedBackupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_db_parameter_group(
&self,
input: DeleteDBParameterGroupMessage,
) -> RusotoFuture<(), DeleteDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBParameterGroup");
params.put("Version", "2014-10-31");
DeleteDBParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDBParameterGroupError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_db_security_group(
&self,
input: DeleteDBSecurityGroupMessage,
) -> RusotoFuture<(), DeleteDBSecurityGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBSecurityGroup");
params.put("Version", "2014-10-31");
DeleteDBSecurityGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDBSecurityGroupError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn delete_db_snapshot(
&self,
input: DeleteDBSnapshotMessage,
) -> RusotoFuture<DeleteDBSnapshotResult, DeleteDBSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteDBSnapshot");
params.put("Version", "2014-10-31");
DeleteDBSnapshotMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDBSnapshotError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteDBSnapshotResult::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 = DeleteDBSnapshotResultDeserializer::deserialize(
"DeleteDBSnapshotResult",
&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 delete_event_subscription(
&self,
input: DeleteEventSubscriptionMessage,
) -> RusotoFuture<DeleteEventSubscriptionResult, DeleteEventSubscriptionError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteEventSubscription");
params.put("Version", "2014-10-31");
DeleteEventSubscriptionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteEventSubscriptionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteEventSubscriptionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DeleteEventSubscriptionResultDeserializer::deserialize(
"DeleteEventSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_global_cluster(
&self,
input: DeleteGlobalClusterMessage,
) -> RusotoFuture<DeleteGlobalClusterResult, DeleteGlobalClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteGlobalCluster");
params.put("Version", "2014-10-31");
DeleteGlobalClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteGlobalClusterError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DeleteGlobalClusterResult::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 = DeleteGlobalClusterResultDeserializer::deserialize(
"DeleteGlobalClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn delete_option_group(
&self,
input: DeleteOptionGroupMessage,
) -> RusotoFuture<(), DeleteOptionGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DeleteOptionGroup");
params.put("Version", "2014-10-31");
DeleteOptionGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteOptionGroupError::from_response(response))),
);
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn describe_account_attributes(
&self,
input: DescribeAccountAttributesMessage,
) -> RusotoFuture<AccountAttributesMessage, DescribeAccountAttributesError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeAccountAttributes");
params.put("Version", "2014-10-31");
DescribeAccountAttributesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAccountAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = AccountAttributesMessage::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 = AccountAttributesMessageDeserializer::deserialize(
"DescribeAccountAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_certificates(
&self,
input: DescribeCertificatesMessage,
) -> RusotoFuture<CertificateMessage, DescribeCertificatesError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeCertificates");
params.put("Version", "2014-10-31");
DescribeCertificatesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeCertificatesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = CertificateMessage::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 = CertificateMessageDeserializer::deserialize(
"DescribeCertificatesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_backtracks(
&self,
input: DescribeDBClusterBacktracksMessage,
) -> RusotoFuture<DBClusterBacktrackMessage, DescribeDBClusterBacktracksError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterBacktracks");
params.put("Version", "2014-10-31");
DescribeDBClusterBacktracksMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBClusterBacktracksError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterBacktrackMessage::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 = DBClusterBacktrackMessageDeserializer::deserialize(
"DescribeDBClusterBacktracksResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_endpoints(
&self,
input: DescribeDBClusterEndpointsMessage,
) -> RusotoFuture<DBClusterEndpointMessage, DescribeDBClusterEndpointsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterEndpoints");
params.put("Version", "2014-10-31");
DescribeDBClusterEndpointsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBClusterEndpointsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterEndpointMessage::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 = DBClusterEndpointMessageDeserializer::deserialize(
"DescribeDBClusterEndpointsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_parameter_groups(
&self,
input: DescribeDBClusterParameterGroupsMessage,
) -> RusotoFuture<DBClusterParameterGroupsMessage, DescribeDBClusterParameterGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterParameterGroups");
params.put("Version", "2014-10-31");
DescribeDBClusterParameterGroupsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBClusterParameterGroupsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBClusterParameterGroupsMessageDeserializer::deserialize(
"DescribeDBClusterParameterGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_parameters(
&self,
input: DescribeDBClusterParametersMessage,
) -> RusotoFuture<DBClusterParameterGroupDetails, DescribeDBClusterParametersError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterParameters");
params.put("Version", "2014-10-31");
DescribeDBClusterParametersMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBClusterParametersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupDetails::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBClusterParameterGroupDetailsDeserializer::deserialize(
"DescribeDBClusterParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_snapshot_attributes(
&self,
input: DescribeDBClusterSnapshotAttributesMessage,
) -> RusotoFuture<
DescribeDBClusterSnapshotAttributesResult,
DescribeDBClusterSnapshotAttributesError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterSnapshotAttributes");
params.put("Version", "2014-10-31");
DescribeDBClusterSnapshotAttributesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBClusterSnapshotAttributesError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeDBClusterSnapshotAttributesResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeDBClusterSnapshotAttributesResultDeserializer::deserialize(
"DescribeDBClusterSnapshotAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_cluster_snapshots(
&self,
input: DescribeDBClusterSnapshotsMessage,
) -> RusotoFuture<DBClusterSnapshotMessage, DescribeDBClusterSnapshotsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusterSnapshots");
params.put("Version", "2014-10-31");
DescribeDBClusterSnapshotsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBClusterSnapshotsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterSnapshotMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBClusterSnapshotMessageDeserializer::deserialize(
"DescribeDBClusterSnapshotsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_clusters(
&self,
input: DescribeDBClustersMessage,
) -> RusotoFuture<DBClusterMessage, DescribeDBClustersError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBClusters");
params.put("Version", "2014-10-31");
DescribeDBClustersMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeDBClustersError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBClusterMessageDeserializer::deserialize(
"DescribeDBClustersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_engine_versions(
&self,
input: DescribeDBEngineVersionsMessage,
) -> RusotoFuture<DBEngineVersionMessage, DescribeDBEngineVersionsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBEngineVersions");
params.put("Version", "2014-10-31");
DescribeDBEngineVersionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBEngineVersionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBEngineVersionMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBEngineVersionMessageDeserializer::deserialize(
"DescribeDBEngineVersionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_instance_automated_backups(
&self,
input: DescribeDBInstanceAutomatedBackupsMessage,
) -> RusotoFuture<DBInstanceAutomatedBackupMessage, DescribeDBInstanceAutomatedBackupsError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBInstanceAutomatedBackups");
params.put("Version", "2014-10-31");
DescribeDBInstanceAutomatedBackupsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBInstanceAutomatedBackupsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBInstanceAutomatedBackupMessage::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 = DBInstanceAutomatedBackupMessageDeserializer::deserialize(
"DescribeDBInstanceAutomatedBackupsResult",
&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_log_files(
&self,
input: DescribeDBLogFilesMessage,
) -> RusotoFuture<DescribeDBLogFilesResponse, DescribeDBLogFilesError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBLogFiles");
params.put("Version", "2014-10-31");
DescribeDBLogFilesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeDBLogFilesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeDBLogFilesResponse::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 = DescribeDBLogFilesResponseDeserializer::deserialize(
"DescribeDBLogFilesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_parameter_groups(
&self,
input: DescribeDBParameterGroupsMessage,
) -> RusotoFuture<DBParameterGroupsMessage, DescribeDBParameterGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBParameterGroups");
params.put("Version", "2014-10-31");
DescribeDBParameterGroupsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBParameterGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBParameterGroupsMessageDeserializer::deserialize(
"DescribeDBParameterGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_parameters(
&self,
input: DescribeDBParametersMessage,
) -> RusotoFuture<DBParameterGroupDetails, DescribeDBParametersError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBParameters");
params.put("Version", "2014-10-31");
DescribeDBParametersMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeDBParametersError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupDetails::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBParameterGroupDetailsDeserializer::deserialize(
"DescribeDBParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_security_groups(
&self,
input: DescribeDBSecurityGroupsMessage,
) -> RusotoFuture<DBSecurityGroupMessage, DescribeDBSecurityGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBSecurityGroups");
params.put("Version", "2014-10-31");
DescribeDBSecurityGroupsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBSecurityGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBSecurityGroupMessage::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 = DBSecurityGroupMessageDeserializer::deserialize(
"DescribeDBSecurityGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_snapshot_attributes(
&self,
input: DescribeDBSnapshotAttributesMessage,
) -> RusotoFuture<DescribeDBSnapshotAttributesResult, DescribeDBSnapshotAttributesError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBSnapshotAttributes");
params.put("Version", "2014-10-31");
DescribeDBSnapshotAttributesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBSnapshotAttributesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeDBSnapshotAttributesResult::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 = DescribeDBSnapshotAttributesResultDeserializer::deserialize(
"DescribeDBSnapshotAttributesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_snapshots(
&self,
input: DescribeDBSnapshotsMessage,
) -> RusotoFuture<DBSnapshotMessage, DescribeDBSnapshotsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBSnapshots");
params.put("Version", "2014-10-31");
DescribeDBSnapshotsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeDBSnapshotsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBSnapshotMessage::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 = DBSnapshotMessageDeserializer::deserialize(
"DescribeDBSnapshotsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_db_subnet_groups(
&self,
input: DescribeDBSubnetGroupsMessage,
) -> RusotoFuture<DBSubnetGroupMessage, DescribeDBSubnetGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeDBSubnetGroups");
params.put("Version", "2014-10-31");
DescribeDBSubnetGroupsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDBSubnetGroupsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBSubnetGroupMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBSubnetGroupMessageDeserializer::deserialize(
"DescribeDBSubnetGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_engine_default_cluster_parameters(
&self,
input: DescribeEngineDefaultClusterParametersMessage,
) -> RusotoFuture<
DescribeEngineDefaultClusterParametersResult,
DescribeEngineDefaultClusterParametersError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEngineDefaultClusterParameters");
params.put("Version", "2014-10-31");
DescribeEngineDefaultClusterParametersMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeEngineDefaultClusterParametersError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEngineDefaultClusterParametersResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeEngineDefaultClusterParametersResultDeserializer::deserialize(
"DescribeEngineDefaultClusterParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_engine_default_parameters(
&self,
input: DescribeEngineDefaultParametersMessage,
) -> RusotoFuture<DescribeEngineDefaultParametersResult, DescribeEngineDefaultParametersError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEngineDefaultParameters");
params.put("Version", "2014-10-31");
DescribeEngineDefaultParametersMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeEngineDefaultParametersError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeEngineDefaultParametersResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeEngineDefaultParametersResultDeserializer::deserialize(
"DescribeEngineDefaultParametersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_event_categories(
&self,
input: DescribeEventCategoriesMessage,
) -> RusotoFuture<EventCategoriesMessage, DescribeEventCategoriesError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEventCategories");
params.put("Version", "2014-10-31");
DescribeEventCategoriesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeEventCategoriesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EventCategoriesMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EventCategoriesMessageDeserializer::deserialize(
"DescribeEventCategoriesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_event_subscriptions(
&self,
input: DescribeEventSubscriptionsMessage,
) -> RusotoFuture<EventSubscriptionsMessage, DescribeEventSubscriptionsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEventSubscriptions");
params.put("Version", "2014-10-31");
DescribeEventSubscriptionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeEventSubscriptionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EventSubscriptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = EventSubscriptionsMessageDeserializer::deserialize(
"DescribeEventSubscriptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_events(
&self,
input: DescribeEventsMessage,
) -> RusotoFuture<EventsMessage, DescribeEventsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeEvents");
params.put("Version", "2014-10-31");
DescribeEventsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeEventsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = EventsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result =
EventsMessageDeserializer::deserialize("DescribeEventsResult", &mut stack)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_global_clusters(
&self,
input: DescribeGlobalClustersMessage,
) -> RusotoFuture<GlobalClustersMessage, DescribeGlobalClustersError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeGlobalClusters");
params.put("Version", "2014-10-31");
DescribeGlobalClustersMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeGlobalClustersError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = GlobalClustersMessage::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 = GlobalClustersMessageDeserializer::deserialize(
"DescribeGlobalClustersResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_option_group_options(
&self,
input: DescribeOptionGroupOptionsMessage,
) -> RusotoFuture<OptionGroupOptionsMessage, DescribeOptionGroupOptionsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeOptionGroupOptions");
params.put("Version", "2014-10-31");
DescribeOptionGroupOptionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeOptionGroupOptionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = OptionGroupOptionsMessage::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 = OptionGroupOptionsMessageDeserializer::deserialize(
"DescribeOptionGroupOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_option_groups(
&self,
input: DescribeOptionGroupsMessage,
) -> RusotoFuture<OptionGroups, DescribeOptionGroupsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeOptionGroups");
params.put("Version", "2014-10-31");
DescribeOptionGroupsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeOptionGroupsError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = OptionGroups::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 = OptionGroupsDeserializer::deserialize(
"DescribeOptionGroupsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_orderable_db_instance_options(
&self,
input: DescribeOrderableDBInstanceOptionsMessage,
) -> RusotoFuture<OrderableDBInstanceOptionsMessage, DescribeOrderableDBInstanceOptionsError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeOrderableDBInstanceOptions");
params.put("Version", "2014-10-31");
DescribeOrderableDBInstanceOptionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeOrderableDBInstanceOptionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = OrderableDBInstanceOptionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = OrderableDBInstanceOptionsMessageDeserializer::deserialize(
"DescribeOrderableDBInstanceOptionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_pending_maintenance_actions(
&self,
input: DescribePendingMaintenanceActionsMessage,
) -> RusotoFuture<PendingMaintenanceActionsMessage, DescribePendingMaintenanceActionsError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribePendingMaintenanceActions");
params.put("Version", "2014-10-31");
DescribePendingMaintenanceActionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribePendingMaintenanceActionsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PendingMaintenanceActionsMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = PendingMaintenanceActionsMessageDeserializer::deserialize(
"DescribePendingMaintenanceActionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_reserved_db_instances(
&self,
input: DescribeReservedDBInstancesMessage,
) -> RusotoFuture<ReservedDBInstanceMessage, DescribeReservedDBInstancesError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeReservedDBInstances");
params.put("Version", "2014-10-31");
DescribeReservedDBInstancesMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeReservedDBInstancesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ReservedDBInstanceMessage::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 = ReservedDBInstanceMessageDeserializer::deserialize(
"DescribeReservedDBInstancesResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_reserved_db_instances_offerings(
&self,
input: DescribeReservedDBInstancesOfferingsMessage,
) -> RusotoFuture<ReservedDBInstancesOfferingMessage, DescribeReservedDBInstancesOfferingsError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeReservedDBInstancesOfferings");
params.put("Version", "2014-10-31");
DescribeReservedDBInstancesOfferingsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeReservedDBInstancesOfferingsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ReservedDBInstancesOfferingMessage::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 = ReservedDBInstancesOfferingMessageDeserializer::deserialize(
"DescribeReservedDBInstancesOfferingsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_source_regions(
&self,
input: DescribeSourceRegionsMessage,
) -> RusotoFuture<SourceRegionMessage, DescribeSourceRegionsError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeSourceRegions");
params.put("Version", "2014-10-31");
DescribeSourceRegionsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeSourceRegionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = SourceRegionMessage::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 = SourceRegionMessageDeserializer::deserialize(
"DescribeSourceRegionsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn describe_valid_db_instance_modifications(
&self,
input: DescribeValidDBInstanceModificationsMessage,
) -> RusotoFuture<
DescribeValidDBInstanceModificationsResult,
DescribeValidDBInstanceModificationsError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DescribeValidDBInstanceModifications");
params.put("Version", "2014-10-31");
DescribeValidDBInstanceModificationsMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeValidDBInstanceModificationsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DescribeValidDBInstanceModificationsResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DescribeValidDBInstanceModificationsResultDeserializer::deserialize(
"DescribeValidDBInstanceModificationsResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn download_db_log_file_portion(
&self,
input: DownloadDBLogFilePortionMessage,
) -> RusotoFuture<DownloadDBLogFilePortionDetails, DownloadDBLogFilePortionError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "DownloadDBLogFilePortion");
params.put("Version", "2014-10-31");
DownloadDBLogFilePortionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DownloadDBLogFilePortionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DownloadDBLogFilePortionDetails::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 = DownloadDBLogFilePortionDetailsDeserializer::deserialize(
"DownloadDBLogFilePortionResult",
&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_current_db_cluster_capacity(
&self,
input: ModifyCurrentDBClusterCapacityMessage,
) -> RusotoFuture<DBClusterCapacityInfo, ModifyCurrentDBClusterCapacityError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyCurrentDBClusterCapacity");
params.put("Version", "2014-10-31");
ModifyCurrentDBClusterCapacityMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyCurrentDBClusterCapacityError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterCapacityInfo::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 = DBClusterCapacityInfoDeserializer::deserialize(
"ModifyCurrentDBClusterCapacityResult",
&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_endpoint(
&self,
input: ModifyDBClusterEndpointMessage,
) -> RusotoFuture<DBClusterEndpoint, ModifyDBClusterEndpointError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBClusterEndpoint");
params.put("Version", "2014-10-31");
ModifyDBClusterEndpointMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyDBClusterEndpointError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterEndpoint::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 = DBClusterEndpointDeserializer::deserialize(
"ModifyDBClusterEndpointResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_cluster_parameter_group(
&self,
input: ModifyDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ModifyDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBClusterParameterGroup");
params.put("Version", "2014-10-31");
ModifyDBClusterParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupNameMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBClusterParameterGroupNameMessageDeserializer::deserialize(
"ModifyDBClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_cluster_snapshot_attribute(
&self,
input: ModifyDBClusterSnapshotAttributeMessage,
) -> RusotoFuture<ModifyDBClusterSnapshotAttributeResult, ModifyDBClusterSnapshotAttributeError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBClusterSnapshotAttribute");
params.put("Version", "2014-10-31");
ModifyDBClusterSnapshotAttributeMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyDBClusterSnapshotAttributeError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBClusterSnapshotAttributeResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ModifyDBClusterSnapshotAttributeResultDeserializer::deserialize(
"ModifyDBClusterSnapshotAttributeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_instance(
&self,
input: ModifyDBInstanceMessage,
) -> RusotoFuture<ModifyDBInstanceResult, ModifyDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBInstance");
params.put("Version", "2014-10-31");
ModifyDBInstanceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ModifyDBInstanceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBInstanceResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ModifyDBInstanceResultDeserializer::deserialize(
"ModifyDBInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_parameter_group(
&self,
input: ModifyDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ModifyDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBParameterGroup");
params.put("Version", "2014-10-31");
ModifyDBParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyDBParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupNameMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBParameterGroupNameMessageDeserializer::deserialize(
"ModifyDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_snapshot(
&self,
input: ModifyDBSnapshotMessage,
) -> RusotoFuture<ModifyDBSnapshotResult, ModifyDBSnapshotError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBSnapshot");
params.put("Version", "2014-10-31");
ModifyDBSnapshotMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ModifyDBSnapshotError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBSnapshotResult::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 = ModifyDBSnapshotResultDeserializer::deserialize(
"ModifyDBSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_snapshot_attribute(
&self,
input: ModifyDBSnapshotAttributeMessage,
) -> RusotoFuture<ModifyDBSnapshotAttributeResult, ModifyDBSnapshotAttributeError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBSnapshotAttribute");
params.put("Version", "2014-10-31");
ModifyDBSnapshotAttributeMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyDBSnapshotAttributeError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBSnapshotAttributeResult::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 = ModifyDBSnapshotAttributeResultDeserializer::deserialize(
"ModifyDBSnapshotAttributeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_db_subnet_group(
&self,
input: ModifyDBSubnetGroupMessage,
) -> RusotoFuture<ModifyDBSubnetGroupResult, ModifyDBSubnetGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyDBSubnetGroup");
params.put("Version", "2014-10-31");
ModifyDBSubnetGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ModifyDBSubnetGroupError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyDBSubnetGroupResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ModifyDBSubnetGroupResultDeserializer::deserialize(
"ModifyDBSubnetGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_event_subscription(
&self,
input: ModifyEventSubscriptionMessage,
) -> RusotoFuture<ModifyEventSubscriptionResult, ModifyEventSubscriptionError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyEventSubscription");
params.put("Version", "2014-10-31");
ModifyEventSubscriptionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyEventSubscriptionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyEventSubscriptionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = ModifyEventSubscriptionResultDeserializer::deserialize(
"ModifyEventSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_global_cluster(
&self,
input: ModifyGlobalClusterMessage,
) -> RusotoFuture<ModifyGlobalClusterResult, ModifyGlobalClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyGlobalCluster");
params.put("Version", "2014-10-31");
ModifyGlobalClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ModifyGlobalClusterError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyGlobalClusterResult::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 = ModifyGlobalClusterResultDeserializer::deserialize(
"ModifyGlobalClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn modify_option_group(
&self,
input: ModifyOptionGroupMessage,
) -> RusotoFuture<ModifyOptionGroupResult, ModifyOptionGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ModifyOptionGroup");
params.put("Version", "2014-10-31");
ModifyOptionGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ModifyOptionGroupError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = ModifyOptionGroupResult::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 = ModifyOptionGroupResultDeserializer::deserialize(
"ModifyOptionGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn promote_read_replica(
&self,
input: PromoteReadReplicaMessage,
) -> RusotoFuture<PromoteReadReplicaResult, PromoteReadReplicaError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PromoteReadReplica");
params.put("Version", "2014-10-31");
PromoteReadReplicaMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PromoteReadReplicaError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PromoteReadReplicaResult::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 = PromoteReadReplicaResultDeserializer::deserialize(
"PromoteReadReplicaResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn promote_read_replica_db_cluster(
&self,
input: PromoteReadReplicaDBClusterMessage,
) -> RusotoFuture<PromoteReadReplicaDBClusterResult, PromoteReadReplicaDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PromoteReadReplicaDBCluster");
params.put("Version", "2014-10-31");
PromoteReadReplicaDBClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(PromoteReadReplicaDBClusterError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PromoteReadReplicaDBClusterResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = PromoteReadReplicaDBClusterResultDeserializer::deserialize(
"PromoteReadReplicaDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn purchase_reserved_db_instances_offering(
&self,
input: PurchaseReservedDBInstancesOfferingMessage,
) -> RusotoFuture<
PurchaseReservedDBInstancesOfferingResult,
PurchaseReservedDBInstancesOfferingError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "PurchaseReservedDBInstancesOffering");
params.put("Version", "2014-10-31");
PurchaseReservedDBInstancesOfferingMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(PurchaseReservedDBInstancesOfferingError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = PurchaseReservedDBInstancesOfferingResult::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 = PurchaseReservedDBInstancesOfferingResultDeserializer::deserialize(
"PurchaseReservedDBInstancesOfferingResult",
&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_from_global_cluster(
&self,
input: RemoveFromGlobalClusterMessage,
) -> RusotoFuture<RemoveFromGlobalClusterResult, RemoveFromGlobalClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveFromGlobalCluster");
params.put("Version", "2014-10-31");
RemoveFromGlobalClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RemoveFromGlobalClusterError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RemoveFromGlobalClusterResult::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 = RemoveFromGlobalClusterResultDeserializer::deserialize(
"RemoveFromGlobalClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn remove_role_from_db_cluster(
&self,
input: RemoveRoleFromDBClusterMessage,
) -> RusotoFuture<(), RemoveRoleFromDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveRoleFromDBCluster");
params.put("Version", "2014-10-31");
RemoveRoleFromDBClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RemoveRoleFromDBClusterError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn remove_role_from_db_instance(
&self,
input: RemoveRoleFromDBInstanceMessage,
) -> RusotoFuture<(), RemoveRoleFromDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveRoleFromDBInstance");
params.put("Version", "2014-10-31");
RemoveRoleFromDBInstanceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RemoveRoleFromDBInstanceError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn remove_source_identifier_from_subscription(
&self,
input: RemoveSourceIdentifierFromSubscriptionMessage,
) -> RusotoFuture<
RemoveSourceIdentifierFromSubscriptionResult,
RemoveSourceIdentifierFromSubscriptionError,
> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveSourceIdentifierFromSubscription");
params.put("Version", "2014-10-31");
RemoveSourceIdentifierFromSubscriptionMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RemoveSourceIdentifierFromSubscriptionError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RemoveSourceIdentifierFromSubscriptionResult::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = RemoveSourceIdentifierFromSubscriptionResultDeserializer::deserialize(
"RemoveSourceIdentifierFromSubscriptionResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceMessage,
) -> RusotoFuture<(), RemoveTagsFromResourceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RemoveTagsFromResource");
params.put("Version", "2014-10-31");
RemoveTagsFromResourceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RemoveTagsFromResourceError::from_response(response))
}));
}
Box::new(future::ok(::std::mem::drop(response)))
})
}
fn reset_db_cluster_parameter_group(
&self,
input: ResetDBClusterParameterGroupMessage,
) -> RusotoFuture<DBClusterParameterGroupNameMessage, ResetDBClusterParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResetDBClusterParameterGroup");
params.put("Version", "2014-10-31");
ResetDBClusterParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ResetDBClusterParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBClusterParameterGroupNameMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBClusterParameterGroupNameMessageDeserializer::deserialize(
"ResetDBClusterParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn reset_db_parameter_group(
&self,
input: ResetDBParameterGroupMessage,
) -> RusotoFuture<DBParameterGroupNameMessage, ResetDBParameterGroupError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "ResetDBParameterGroup");
params.put("Version", "2014-10-31");
ResetDBParameterGroupMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ResetDBParameterGroupError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = DBParameterGroupNameMessage::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
start_element(&actual_tag_name, &mut stack)?;
result = DBParameterGroupNameMessageDeserializer::deserialize(
"ResetDBParameterGroupResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn restore_db_cluster_from_s3(
&self,
input: RestoreDBClusterFromS3Message,
) -> RusotoFuture<RestoreDBClusterFromS3Result, RestoreDBClusterFromS3Error> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreDBClusterFromS3");
params.put("Version", "2014-10-31");
RestoreDBClusterFromS3MessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RestoreDBClusterFromS3Error::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreDBClusterFromS3Result::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 = RestoreDBClusterFromS3ResultDeserializer::deserialize(
"RestoreDBClusterFromS3Result",
&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)
}))
})
}
fn restore_db_instance_from_db_snapshot(
&self,
input: RestoreDBInstanceFromDBSnapshotMessage,
) -> RusotoFuture<RestoreDBInstanceFromDBSnapshotResult, RestoreDBInstanceFromDBSnapshotError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreDBInstanceFromDBSnapshot");
params.put("Version", "2014-10-31");
RestoreDBInstanceFromDBSnapshotMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RestoreDBInstanceFromDBSnapshotError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreDBInstanceFromDBSnapshotResult::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 = RestoreDBInstanceFromDBSnapshotResultDeserializer::deserialize(
"RestoreDBInstanceFromDBSnapshotResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn restore_db_instance_from_s3(
&self,
input: RestoreDBInstanceFromS3Message,
) -> RusotoFuture<RestoreDBInstanceFromS3Result, RestoreDBInstanceFromS3Error> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreDBInstanceFromS3");
params.put("Version", "2014-10-31");
RestoreDBInstanceFromS3MessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RestoreDBInstanceFromS3Error::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreDBInstanceFromS3Result::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 = RestoreDBInstanceFromS3ResultDeserializer::deserialize(
"RestoreDBInstanceFromS3Result",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn restore_db_instance_to_point_in_time(
&self,
input: RestoreDBInstanceToPointInTimeMessage,
) -> RusotoFuture<RestoreDBInstanceToPointInTimeResult, RestoreDBInstanceToPointInTimeError>
{
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RestoreDBInstanceToPointInTime");
params.put("Version", "2014-10-31");
RestoreDBInstanceToPointInTimeMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RestoreDBInstanceToPointInTimeError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RestoreDBInstanceToPointInTimeResult::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 = RestoreDBInstanceToPointInTimeResultDeserializer::deserialize(
"RestoreDBInstanceToPointInTimeResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn revoke_db_security_group_ingress(
&self,
input: RevokeDBSecurityGroupIngressMessage,
) -> RusotoFuture<RevokeDBSecurityGroupIngressResult, RevokeDBSecurityGroupIngressError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "RevokeDBSecurityGroupIngress");
params.put("Version", "2014-10-31");
RevokeDBSecurityGroupIngressMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(RevokeDBSecurityGroupIngressError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = RevokeDBSecurityGroupIngressResult::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 = RevokeDBSecurityGroupIngressResultDeserializer::deserialize(
"RevokeDBSecurityGroupIngressResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn start_activity_stream(
&self,
input: StartActivityStreamRequest,
) -> RusotoFuture<StartActivityStreamResponse, StartActivityStreamError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "StartActivityStream");
params.put("Version", "2014-10-31");
StartActivityStreamRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(StartActivityStreamError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = StartActivityStreamResponse::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 = StartActivityStreamResponseDeserializer::deserialize(
"StartActivityStreamResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn start_db_cluster(
&self,
input: StartDBClusterMessage,
) -> RusotoFuture<StartDBClusterResult, StartDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "StartDBCluster");
params.put("Version", "2014-10-31");
StartDBClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartDBClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = StartDBClusterResult::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 = StartDBClusterResultDeserializer::deserialize(
"StartDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn start_db_instance(
&self,
input: StartDBInstanceMessage,
) -> RusotoFuture<StartDBInstanceResult, StartDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "StartDBInstance");
params.put("Version", "2014-10-31");
StartDBInstanceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartDBInstanceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = StartDBInstanceResult::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 = StartDBInstanceResultDeserializer::deserialize(
"StartDBInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn stop_activity_stream(
&self,
input: StopActivityStreamRequest,
) -> RusotoFuture<StopActivityStreamResponse, StopActivityStreamError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "StopActivityStream");
params.put("Version", "2014-10-31");
StopActivityStreamRequestSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopActivityStreamError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = StopActivityStreamResponse::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 = StopActivityStreamResponseDeserializer::deserialize(
"StopActivityStreamResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn stop_db_cluster(
&self,
input: StopDBClusterMessage,
) -> RusotoFuture<StopDBClusterResult, StopDBClusterError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "StopDBCluster");
params.put("Version", "2014-10-31");
StopDBClusterMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopDBClusterError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = StopDBClusterResult::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 = StopDBClusterResultDeserializer::deserialize(
"StopDBClusterResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
fn stop_db_instance(
&self,
input: StopDBInstanceMessage,
) -> RusotoFuture<StopDBInstanceResult, StopDBInstanceError> {
let mut request = SignedRequest::new("POST", "rds", &self.region, "/");
let mut params = Params::new();
params.put("Action", "StopDBInstance");
params.put("Version", "2014-10-31");
StopDBInstanceMessageSerializer::serialize(&mut params, "", &input);
request.set_payload(Some(serde_urlencoded::to_string(¶ms).unwrap()));
request.set_content_type("application/x-www-form-urlencoded".to_owned());
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopDBInstanceError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let result;
if response.body.is_empty() {
result = StopDBInstanceResult::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 = StopDBInstanceResultDeserializer::deserialize(
"StopDBInstanceResult",
&mut stack,
)?;
skip_tree(&mut stack);
end_element(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
}
#[cfg(test)]
mod protocol_tests {
extern crate rusoto_mock;
use self::rusoto_mock::*;
use super::*;
use rusoto_core::Region as rusoto_region;
#[test]
fn test_parse_error_rds_describe_db_instances() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"rds-describe-db-instances.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeDBInstancesMessage::default();
let result = client.describe_db_instances(request).sync();
assert!(!result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_db_engine_versions() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-db-engine-versions.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeDBEngineVersionsMessage::default();
let result = client.describe_db_engine_versions(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_db_instances() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-db-instances.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeDBInstancesMessage::default();
let result = client.describe_db_instances(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_db_parameter_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-db-parameter-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeDBParameterGroupsMessage::default();
let result = client.describe_db_parameter_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_db_security_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-db-security-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeDBSecurityGroupsMessage::default();
let result = client.describe_db_security_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_db_snapshots() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-db-snapshots.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeDBSnapshotsMessage::default();
let result = client.describe_db_snapshots(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_db_subnet_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-db-subnet-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeDBSubnetGroupsMessage::default();
let result = client.describe_db_subnet_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_event_categories() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-event-categories.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeEventCategoriesMessage::default();
let result = client.describe_event_categories(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_event_subscriptions() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-event-subscriptions.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeEventSubscriptionsMessage::default();
let result = client.describe_event_subscriptions(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_events() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-events.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeEventsMessage::default();
let result = client.describe_events(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_option_groups() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-option-groups.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeOptionGroupsMessage::default();
let result = client.describe_option_groups(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_reserved_db_instances_offerings() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-reserved-db-instances-offerings.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeReservedDBInstancesOfferingsMessage::default();
let result = client
.describe_reserved_db_instances_offerings(request)
.sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
#[test]
fn test_parse_valid_rds_describe_reserved_db_instances() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"rds-describe-reserved-db-instances.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = RdsClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = DescribeReservedDBInstancesMessage::default();
let result = client.describe_reserved_db_instances(request).sync();
assert!(result.is_ok(), "parse error: {:?}", result);
}
}