#[allow(unused_mut)]
pub fn ser_kinesis_firehose_destination(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::KinesisFirehoseDestination,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("IAMRoleARN");
{
scope_1.string(&input.iam_role_arn);
}
#[allow(unused_mut)]
let mut scope_2 = writer.prefix("DeliveryStreamARN");
{
scope_2.string(&input.delivery_stream_arn);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_kinesis_firehose_destination(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::KinesisFirehoseDestination, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::KinesisFirehoseDestination::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("IAMRoleARN") => {
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_iam_role_arn(var_3);
}
,
s if s.matches("DeliveryStreamARN") => {
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_delivery_stream_arn(var_4);
}
,
_ => {}
}
}
Ok(crate::serde_util::kinesis_firehose_destination_correct_errors(builder)
.build()
.map_err(|_| ::aws_smithy_xml::decode::XmlDecodeError::custom("missing field"))?)
}