#[allow(unused_mut)]
pub fn ser_rds_custom_cluster_configuration(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::RdsCustomClusterConfiguration,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("InterconnectSubnetId");
if let Some(var_2) = &input.interconnect_subnet_id {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("TransitGatewayMulticastDomainId");
if let Some(var_4) = &input.transit_gateway_multicast_domain_id {
scope_3.string(var_4);
}
#[allow(unused_mut)]
let mut scope_5 = writer.prefix("ReplicaMode");
if let Some(var_6) = &input.replica_mode {
scope_5.string(var_6.as_str());
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_rds_custom_cluster_configuration(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::RdsCustomClusterConfiguration, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::RdsCustomClusterConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("InterconnectSubnetId") => {
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_interconnect_subnet_id(var_7);
}
,
s if s.matches("TransitGatewayMulticastDomainId") => {
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_transit_gateway_multicast_domain_id(var_8);
}
,
s if s.matches("ReplicaMode") => {
let var_9 =
Some(
Result::<crate::types::ReplicaMode, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::ReplicaMode::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_replica_mode(var_9);
}
,
_ => {}
}
}
Ok(builder.build())
}