aws-sdk-cloudwatch 1.111.0

AWS SDK for Amazon CloudWatch
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::unnecessary_wraps)]
pub fn de_stop_o_tel_enrichment_http_error(
    _response_status: u16,
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    _response_body: &[u8],
) -> std::result::Result<
    crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentOutput,
    crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError,
> {
    #[allow(unused_mut)]
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
        .map_err(crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError::unhandled)?;
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
    let generic = generic_builder.build();
    Err(crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError::generic(generic))
}

#[allow(clippy::unnecessary_wraps)]
pub fn de_stop_o_tel_enrichment_http_response(
    _response_status: u16,
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    _response_body: &[u8],
) -> std::result::Result<
    crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentOutput,
    crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::operation::stop_o_tel_enrichment::builders::StopOTelEnrichmentOutputBuilder::default();
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
        output.build()
    })
}

pub fn ser_stop_o_tel_enrichment_input(
    input: &crate::operation::stop_o_tel_enrichment::StopOTelEnrichmentInput,
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
    let mut encoder = ::aws_smithy_cbor::Encoder::new(Vec::new());
    {
        let encoder = &mut encoder;
        crate::protocol_serde::shape_stop_o_tel_enrichment_input::ser_stop_o_tel_enrichment_input_input(encoder, input)?;
    }
    Ok(::aws_smithy_types::body::SdkBody::from(encoder.into_writer()))
}