aws-sdk-rds 1.132.0

AWS SDK for Amazon Relational Database Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_db_cluster_automated_backup(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::DbClusterAutomatedBackup, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::DbClusterAutomatedBackup::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("Engine") /* Engine com.amazonaws.rds#DBClusterAutomatedBackup$Engine */ =>  {
                let var_1 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_engine(var_1);
            }
            ,
            s if s.matches("VpcId") /* VpcId com.amazonaws.rds#DBClusterAutomatedBackup$VpcId */ =>  {
                let var_2 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_vpc_id(var_2);
            }
            ,
            s if s.matches("DBClusterAutomatedBackupsArn") /* DBClusterAutomatedBackupsArn com.amazonaws.rds#DBClusterAutomatedBackup$DBClusterAutomatedBackupsArn */ =>  {
                let var_3 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_db_cluster_automated_backups_arn(var_3);
            }
            ,
            s if s.matches("DBClusterIdentifier") /* DBClusterIdentifier com.amazonaws.rds#DBClusterAutomatedBackup$DBClusterIdentifier */ =>  {
                let var_4 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_db_cluster_identifier(var_4);
            }
            ,
            s if s.matches("RestoreWindow") /* RestoreWindow com.amazonaws.rds#DBClusterAutomatedBackup$RestoreWindow */ =>  {
                let var_5 =
                    Some(
                        crate::protocol_serde::shape_restore_window::de_restore_window(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_restore_window(var_5);
            }
            ,
            s if s.matches("MasterUsername") /* MasterUsername com.amazonaws.rds#DBClusterAutomatedBackup$MasterUsername */ =>  {
                let var_6 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_master_username(var_6);
            }
            ,
            s if s.matches("DbClusterResourceId") /* DbClusterResourceId com.amazonaws.rds#DBClusterAutomatedBackup$DbClusterResourceId */ =>  {
                let var_7 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_db_cluster_resource_id(var_7);
            }
            ,
            s if s.matches("Region") /* Region com.amazonaws.rds#DBClusterAutomatedBackup$Region */ =>  {
                let var_8 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_region(var_8);
            }
            ,
            s if s.matches("LicenseModel") /* LicenseModel com.amazonaws.rds#DBClusterAutomatedBackup$LicenseModel */ =>  {
                let var_9 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_license_model(var_9);
            }
            ,
            s if s.matches("Status") /* Status com.amazonaws.rds#DBClusterAutomatedBackup$Status */ =>  {
                let var_10 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_status(var_10);
            }
            ,
            s if s.matches("IAMDatabaseAuthenticationEnabled") /* IAMDatabaseAuthenticationEnabled com.amazonaws.rds#DBClusterAutomatedBackup$IAMDatabaseAuthenticationEnabled */ =>  {
                let var_11 =
                    Some(
                         {
                            <bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.rds#Boolean`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_iam_database_authentication_enabled(var_11);
            }
            ,
            s if s.matches("ClusterCreateTime") /* ClusterCreateTime com.amazonaws.rds#DBClusterAutomatedBackup$ClusterCreateTime */ =>  {
                let var_12 =
                    Some(
                        ::aws_smithy_types::DateTime::from_str(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
                        )
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.rds#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_cluster_create_time(var_12);
            }
            ,
            s if s.matches("StorageEncrypted") /* StorageEncrypted com.amazonaws.rds#DBClusterAutomatedBackup$StorageEncrypted */ =>  {
                let var_13 =
                    Some(
                         {
                            <bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.rds#Boolean`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_storage_encrypted(var_13);
            }
            ,
            s if s.matches("StorageEncryptionType") /* StorageEncryptionType com.amazonaws.rds#DBClusterAutomatedBackup$StorageEncryptionType */ =>  {
                let var_14 =
                    Some(
                        Result::<crate::types::StorageEncryptionType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::StorageEncryptionType::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_storage_encryption_type(var_14);
            }
            ,
            s if s.matches("AllocatedStorage") /* AllocatedStorage com.amazonaws.rds#DBClusterAutomatedBackup$AllocatedStorage */ =>  {
                let var_15 =
                    Some(
                         {
                            <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.rds#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_allocated_storage(var_15);
            }
            ,
            s if s.matches("EngineVersion") /* EngineVersion com.amazonaws.rds#DBClusterAutomatedBackup$EngineVersion */ =>  {
                let var_16 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_engine_version(var_16);
            }
            ,
            s if s.matches("DBClusterArn") /* DBClusterArn com.amazonaws.rds#DBClusterAutomatedBackup$DBClusterArn */ =>  {
                let var_17 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_db_cluster_arn(var_17);
            }
            ,
            s if s.matches("BackupRetentionPeriod") /* BackupRetentionPeriod com.amazonaws.rds#DBClusterAutomatedBackup$BackupRetentionPeriod */ =>  {
                let var_18 =
                    Some(
                         {
                            <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.rds#IntegerOptional`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_backup_retention_period(var_18);
            }
            ,
            s if s.matches("PreferredBackupWindow") /* PreferredBackupWindow com.amazonaws.rds#DBClusterAutomatedBackup$PreferredBackupWindow */ =>  {
                let var_19 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_preferred_backup_window(var_19);
            }
            ,
            s if s.matches("EngineMode") /* EngineMode com.amazonaws.rds#DBClusterAutomatedBackup$EngineMode */ =>  {
                let var_20 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_engine_mode(var_20);
            }
            ,
            s if s.matches("AvailabilityZones") /* AvailabilityZones com.amazonaws.rds#DBClusterAutomatedBackup$AvailabilityZones */ =>  {
                let var_21 =
                    Some(
                        crate::protocol_serde::shape_availability_zones::de_availability_zones(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_availability_zones(var_21);
            }
            ,
            s if s.matches("Port") /* Port com.amazonaws.rds#DBClusterAutomatedBackup$Port */ =>  {
                let var_22 =
                    Some(
                         {
                            <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.rds#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_port(var_22);
            }
            ,
            s if s.matches("KmsKeyId") /* KmsKeyId com.amazonaws.rds#DBClusterAutomatedBackup$KmsKeyId */ =>  {
                let var_23 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_kms_key_id(var_23);
            }
            ,
            s if s.matches("StorageType") /* StorageType com.amazonaws.rds#DBClusterAutomatedBackup$StorageType */ =>  {
                let var_24 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_storage_type(var_24);
            }
            ,
            s if s.matches("Iops") /* Iops com.amazonaws.rds#DBClusterAutomatedBackup$Iops */ =>  {
                let var_25 =
                    Some(
                         {
                            <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.rds#IntegerOptional`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_iops(var_25);
            }
            ,
            s if s.matches("StorageThroughput") /* StorageThroughput com.amazonaws.rds#DBClusterAutomatedBackup$StorageThroughput */ =>  {
                let var_26 =
                    Some(
                         {
                            <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.rds#IntegerOptional`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_storage_throughput(var_26);
            }
            ,
            s if s.matches("AwsBackupRecoveryPointArn") /* AwsBackupRecoveryPointArn com.amazonaws.rds#DBClusterAutomatedBackup$AwsBackupRecoveryPointArn */ =>  {
                let var_27 =
                    Some(
                        Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_aws_backup_recovery_point_arn(var_27);
            }
            ,
            s if s.matches("TagList") /* TagList com.amazonaws.rds#DBClusterAutomatedBackup$TagList */ =>  {
                let var_28 =
                    Some(
                        crate::protocol_serde::shape_tag_list::de_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tag_list(var_28);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}