#[allow(unused_mut)]
pub fn ser_deployment_targets(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::DeploymentTargets,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("Accounts");
if let Some(var_2) = &input.accounts {
let mut list_4 = scope_1.start_list(false, None);
for item_3 in var_2 {
#[allow(unused_mut)]
let mut entry_5 = list_4.entry();
entry_5.string(item_3);
}
list_4.finish();
}
#[allow(unused_mut)]
let mut scope_6 = writer.prefix("AccountsUrl");
if let Some(var_7) = &input.accounts_url {
scope_6.string(var_7);
}
#[allow(unused_mut)]
let mut scope_8 = writer.prefix("OrganizationalUnitIds");
if let Some(var_9) = &input.organizational_unit_ids {
let mut list_11 = scope_8.start_list(false, None);
for item_10 in var_9 {
#[allow(unused_mut)]
let mut entry_12 = list_11.entry();
entry_12.string(item_10);
}
list_11.finish();
}
#[allow(unused_mut)]
let mut scope_13 = writer.prefix("AccountFilterType");
if let Some(var_14) = &input.account_filter_type {
scope_13.string(var_14.as_str());
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_deployment_targets(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::DeploymentTargets, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::DeploymentTargets::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Accounts") => {
let var_15 =
Some(
crate::protocol_serde::shape_account_list::de_account_list(&mut tag)
?
)
;
builder = builder.set_accounts(var_15);
}
,
s if s.matches("AccountsUrl") => {
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_accounts_url(var_16);
}
,
s if s.matches("OrganizationalUnitIds") => {
let var_17 =
Some(
crate::protocol_serde::shape_organizational_unit_id_list::de_organizational_unit_id_list(&mut tag)
?
)
;
builder = builder.set_organizational_unit_ids(var_17);
}
,
s if s.matches("AccountFilterType") => {
let var_18 =
Some(
Result::<crate::types::AccountFilterType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::AccountFilterType::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_account_filter_type(var_18);
}
,
_ => {}
}
}
Ok(builder.build())
}