#[allow(unused_mut)]
pub fn ser_lake_formation_scope_union(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::LakeFormationScopeUnion,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
match input {
crate::types::LakeFormationScopeUnion::LakeFormationQuery(inner) => {
crate::protocol_serde::shape_lake_formation_query::ser_lake_formation_query(writer, inner)?;
}
crate::types::LakeFormationScopeUnion::Unknown => {
return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
"LakeFormationScopeUnion",
))
}
}
Ok(())
}
pub fn de_lake_formation_scope_union(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::LakeFormationScopeUnion, ::aws_smithy_xml::decode::XmlDecodeError> {
let mut base: Option<crate::types::LakeFormationScopeUnion> = None;
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LakeFormationQuery") => {
let tmp =
crate::protocol_serde::shape_lake_formation_query::de_lake_formation_query(&mut tag)
?
;
base = Some(crate::types::LakeFormationScopeUnion::LakeFormationQuery(tmp));
}
,
_unknown => base = Some(crate::types::LakeFormationScopeUnion::Unknown),
}
}
base.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("expected union, got nothing"))
}