#[allow(unused_mut)]
pub fn ser_launch_permission(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::LaunchPermission,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("Group");
if let Some(var_2) = &input.group {
scope_1.string(var_2.as_str());
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("UserId");
if let Some(var_4) = &input.user_id {
scope_3.string(var_4);
}
#[allow(unused_mut)]
let mut scope_5 = writer.prefix("OrganizationArn");
if let Some(var_6) = &input.organization_arn {
scope_5.string(var_6);
}
#[allow(unused_mut)]
let mut scope_7 = writer.prefix("OrganizationalUnitArn");
if let Some(var_8) = &input.organizational_unit_arn {
scope_7.string(var_8);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_launch_permission(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::LaunchPermission, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::LaunchPermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("group") => {
let var_9 =
Some(
Result::<crate::types::PermissionGroup, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::PermissionGroup::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_group(var_9);
}
,
s if s.matches("userId") => {
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_user_id(var_10);
}
,
s if s.matches("organizationArn") => {
let var_11 =
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_organization_arn(var_11);
}
,
s if s.matches("organizationalUnitArn") => {
let var_12 =
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_organizational_unit_arn(var_12);
}
,
_ => {}
}
}
Ok(builder.build())
}