aws-sdk-s3control 1.108.0

AWS SDK for AWS S3 Control
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_object_lambda_content_transformation(
    input: &crate::types::ObjectLambdaContentTransformation,
    writer: ::aws_smithy_xml::encode::ElWriter,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    let mut scope_writer = writer.finish();
    match input {
        crate::types::ObjectLambdaContentTransformation::AwsLambda(inner) => {
            let inner_writer = scope_writer.start_el("AwsLambda");
            crate::protocol_serde::shape_aws_lambda_transformation::ser_aws_lambda_transformation(inner, inner_writer)?
        }
        crate::types::ObjectLambdaContentTransformation::Unknown => {
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
                "ObjectLambdaContentTransformation",
            ))
        }
    }
    Ok(())
}

pub fn de_object_lambda_content_transformation(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::ObjectLambdaContentTransformation, ::aws_smithy_xml::decode::XmlDecodeError> {
    let mut base: Option<crate::types::ObjectLambdaContentTransformation> = None;
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("AwsLambda") /* AwsLambda com.amazonaws.s3control#ObjectLambdaContentTransformation$AwsLambda */ =>  {
                let tmp =
                    crate::protocol_serde::shape_aws_lambda_transformation::de_aws_lambda_transformation(&mut tag)
                    ?
                ;
                base = Some(crate::types::ObjectLambdaContentTransformation::AwsLambda(tmp));
            }
            ,
            _unknown => base = Some(crate::types::ObjectLambdaContentTransformation::Unknown),
        }
    }
    base.ok_or_else(|| ::aws_smithy_xml::decode::XmlDecodeError::custom("expected union, got nothing"))
}