#[allow(unused_mut)]
pub fn ser_create_volume_permission(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::CreateVolumePermission,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("UserId");
if let Some(var_2) = &input.user_id {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("Group");
if let Some(var_4) = &input.group {
scope_3.string(var_4.as_str());
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_create_volume_permission(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::CreateVolumePermission, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::CreateVolumePermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("userId") => {
let var_5 =
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_5);
}
,
s if s.matches("group") => {
let var_6 =
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_6);
}
,
_ => {}
}
}
Ok(builder.build())
}