// Code generated by smithy-go-codegen DO NOT EDIT.

package cloudwatch

import (
	"context"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
	smithy "github.com/aws/smithy-go"
	smithycbor "github.com/aws/smithy-go/encoding/cbor"
	"github.com/aws/smithy-go/middleware"
	"github.com/aws/smithy-go/ptr"
	"github.com/aws/smithy-go/tracing"
	smithyhttp "github.com/aws/smithy-go/transport/http"
	"io"
	"strings"
	"time"
)

type smithyRpcv2cbor_deserializeOpAssociateDatasetKmsKey struct {
}

func (*smithyRpcv2cbor_deserializeOpAssociateDatasetKmsKey) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpAssociateDatasetKmsKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorAssociateDatasetKmsKey(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &AssociateDatasetKmsKeyOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDeleteAlarmMuteRule struct {
}

func (*smithyRpcv2cbor_deserializeOpDeleteAlarmMuteRule) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDeleteAlarmMuteRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDeleteAlarmMuteRule(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &DeleteAlarmMuteRuleOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDeleteAlarms struct {
}

func (*smithyRpcv2cbor_deserializeOpDeleteAlarms) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDeleteAlarms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDeleteAlarms(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &DeleteAlarmsOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDeleteAnomalyDetector struct {
}

func (*smithyRpcv2cbor_deserializeOpDeleteAnomalyDetector) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDeleteAnomalyDetector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDeleteAnomalyDetector(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &DeleteAnomalyDetectorOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDeleteDashboards struct {
}

func (*smithyRpcv2cbor_deserializeOpDeleteDashboards) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDeleteDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDeleteDashboards(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &DeleteDashboardsOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDeleteInsightRules struct {
}

func (*smithyRpcv2cbor_deserializeOpDeleteInsightRules) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDeleteInsightRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDeleteInsightRules(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DeleteInsightRulesOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DeleteInsightRulesOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDeleteMetricStream struct {
}

func (*smithyRpcv2cbor_deserializeOpDeleteMetricStream) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDeleteMetricStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDeleteMetricStream(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &DeleteMetricStreamOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeAlarmContributors struct {
}

func (*smithyRpcv2cbor_deserializeOpDescribeAlarmContributors) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDescribeAlarmContributors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDescribeAlarmContributors(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DescribeAlarmContributorsOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DescribeAlarmContributorsOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeAlarmHistory struct {
}

func (*smithyRpcv2cbor_deserializeOpDescribeAlarmHistory) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDescribeAlarmHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDescribeAlarmHistory(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DescribeAlarmHistoryOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DescribeAlarmHistoryOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeAlarms struct {
}

func (*smithyRpcv2cbor_deserializeOpDescribeAlarms) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDescribeAlarms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDescribeAlarms(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DescribeAlarmsOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DescribeAlarmsOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeAlarmsForMetric struct {
}

func (*smithyRpcv2cbor_deserializeOpDescribeAlarmsForMetric) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDescribeAlarmsForMetric) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDescribeAlarmsForMetric(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DescribeAlarmsForMetricOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DescribeAlarmsForMetricOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeAnomalyDetectors struct {
}

func (*smithyRpcv2cbor_deserializeOpDescribeAnomalyDetectors) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDescribeAnomalyDetectors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDescribeAnomalyDetectors(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DescribeAnomalyDetectorsOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DescribeAnomalyDetectorsOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeInsightRules struct {
}

func (*smithyRpcv2cbor_deserializeOpDescribeInsightRules) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDescribeInsightRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDescribeInsightRules(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DescribeInsightRulesOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DescribeInsightRulesOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDisableAlarmActions struct {
}

func (*smithyRpcv2cbor_deserializeOpDisableAlarmActions) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDisableAlarmActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDisableAlarmActions(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &DisableAlarmActionsOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDisableInsightRules struct {
}

func (*smithyRpcv2cbor_deserializeOpDisableInsightRules) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDisableInsightRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDisableInsightRules(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &DisableInsightRulesOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_DisableInsightRulesOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDisassociateDatasetKmsKey struct {
}

func (*smithyRpcv2cbor_deserializeOpDisassociateDatasetKmsKey) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpDisassociateDatasetKmsKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorDisassociateDatasetKmsKey(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &DisassociateDatasetKmsKeyOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpEnableAlarmActions struct {
}

func (*smithyRpcv2cbor_deserializeOpEnableAlarmActions) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpEnableAlarmActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorEnableAlarmActions(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &EnableAlarmActionsOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpEnableInsightRules struct {
}

func (*smithyRpcv2cbor_deserializeOpEnableInsightRules) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpEnableInsightRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorEnableInsightRules(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &EnableInsightRulesOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_EnableInsightRulesOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetAlarmMuteRule struct {
}

func (*smithyRpcv2cbor_deserializeOpGetAlarmMuteRule) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetAlarmMuteRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetAlarmMuteRule(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetAlarmMuteRuleOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetAlarmMuteRuleOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetDashboard struct {
}

func (*smithyRpcv2cbor_deserializeOpGetDashboard) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetDashboard(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetDashboardOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetDashboardOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetDataset struct {
}

func (*smithyRpcv2cbor_deserializeOpGetDataset) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetDataset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetDataset(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetDatasetOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetDatasetOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetInsightRuleReport struct {
}

func (*smithyRpcv2cbor_deserializeOpGetInsightRuleReport) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetInsightRuleReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetInsightRuleReport(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetInsightRuleReportOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetInsightRuleReportOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetMetricData struct {
}

func (*smithyRpcv2cbor_deserializeOpGetMetricData) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetMetricData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetMetricData(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetMetricDataOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetMetricDataOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetMetricStatistics struct {
}

func (*smithyRpcv2cbor_deserializeOpGetMetricStatistics) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetMetricStatistics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetMetricStatistics(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetMetricStatisticsOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetMetricStatisticsOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetMetricStream struct {
}

func (*smithyRpcv2cbor_deserializeOpGetMetricStream) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetMetricStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetMetricStream(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetMetricStreamOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetMetricStreamOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetMetricWidgetImage struct {
}

func (*smithyRpcv2cbor_deserializeOpGetMetricWidgetImage) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetMetricWidgetImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetMetricWidgetImage(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetMetricWidgetImageOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetMetricWidgetImageOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpGetOTelEnrichment struct {
}

func (*smithyRpcv2cbor_deserializeOpGetOTelEnrichment) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpGetOTelEnrichment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorGetOTelEnrichment(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &GetOTelEnrichmentOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_GetOTelEnrichmentOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListAlarmMuteRules struct {
}

func (*smithyRpcv2cbor_deserializeOpListAlarmMuteRules) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpListAlarmMuteRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorListAlarmMuteRules(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &ListAlarmMuteRulesOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_ListAlarmMuteRulesOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListDashboards struct {
}

func (*smithyRpcv2cbor_deserializeOpListDashboards) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpListDashboards) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorListDashboards(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &ListDashboardsOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_ListDashboardsOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListManagedInsightRules struct {
}

func (*smithyRpcv2cbor_deserializeOpListManagedInsightRules) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpListManagedInsightRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorListManagedInsightRules(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &ListManagedInsightRulesOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_ListManagedInsightRulesOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListMetrics struct {
}

func (*smithyRpcv2cbor_deserializeOpListMetrics) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpListMetrics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorListMetrics(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &ListMetricsOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_ListMetricsOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListMetricStreams struct {
}

func (*smithyRpcv2cbor_deserializeOpListMetricStreams) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpListMetricStreams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorListMetricStreams(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &ListMetricStreamsOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_ListMetricStreamsOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListTagsForResource struct {
}

func (*smithyRpcv2cbor_deserializeOpListTagsForResource) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorListTagsForResource(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &ListTagsForResourceOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_ListTagsForResourceOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutAlarmMuteRule struct {
}

func (*smithyRpcv2cbor_deserializeOpPutAlarmMuteRule) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutAlarmMuteRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutAlarmMuteRule(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &PutAlarmMuteRuleOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutAnomalyDetector struct {
}

func (*smithyRpcv2cbor_deserializeOpPutAnomalyDetector) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutAnomalyDetector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutAnomalyDetector(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &PutAnomalyDetectorOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_PutAnomalyDetectorOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutCompositeAlarm struct {
}

func (*smithyRpcv2cbor_deserializeOpPutCompositeAlarm) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutCompositeAlarm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutCompositeAlarm(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &PutCompositeAlarmOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutDashboard struct {
}

func (*smithyRpcv2cbor_deserializeOpPutDashboard) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutDashboard) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutDashboard(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &PutDashboardOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_PutDashboardOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutInsightRule struct {
}

func (*smithyRpcv2cbor_deserializeOpPutInsightRule) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutInsightRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutInsightRule(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &PutInsightRuleOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutLogAlarm struct {
}

func (*smithyRpcv2cbor_deserializeOpPutLogAlarm) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutLogAlarm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutLogAlarm(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &PutLogAlarmOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutManagedInsightRules struct {
}

func (*smithyRpcv2cbor_deserializeOpPutManagedInsightRules) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutManagedInsightRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutManagedInsightRules(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &PutManagedInsightRulesOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_PutManagedInsightRulesOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutMetricAlarm struct {
}

func (*smithyRpcv2cbor_deserializeOpPutMetricAlarm) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutMetricAlarm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutMetricAlarm(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &PutMetricAlarmOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutMetricData struct {
}

func (*smithyRpcv2cbor_deserializeOpPutMetricData) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutMetricData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutMetricData(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &PutMetricDataOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpPutMetricStream struct {
}

func (*smithyRpcv2cbor_deserializeOpPutMetricStream) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpPutMetricStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorPutMetricStream(resp)
	}

	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return out, metadata, err
	}

	if len(payload) == 0 {
		out.Result = &PutMetricStreamOutput{}
		return out, metadata, nil
	}

	cv, err := smithycbor.Decode(payload)
	if err != nil {
		return out, metadata, err
	}

	output, err := deserializeCBOR_PutMetricStreamOutput(cv)
	if err != nil {
		return out, metadata, err
	}

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpSetAlarmState struct {
}

func (*smithyRpcv2cbor_deserializeOpSetAlarmState) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpSetAlarmState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorSetAlarmState(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &SetAlarmStateOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStartMetricStreams struct {
}

func (*smithyRpcv2cbor_deserializeOpStartMetricStreams) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpStartMetricStreams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorStartMetricStreams(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &StartMetricStreamsOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStartOTelEnrichment struct {
}

func (*smithyRpcv2cbor_deserializeOpStartOTelEnrichment) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpStartOTelEnrichment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorStartOTelEnrichment(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &StartOTelEnrichmentOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStopMetricStreams struct {
}

func (*smithyRpcv2cbor_deserializeOpStopMetricStreams) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpStopMetricStreams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorStopMetricStreams(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &StopMetricStreamsOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStopOTelEnrichment struct {
}

func (*smithyRpcv2cbor_deserializeOpStopOTelEnrichment) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpStopOTelEnrichment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorStopOTelEnrichment(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &StopOTelEnrichmentOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpTagResource struct {
}

func (*smithyRpcv2cbor_deserializeOpTagResource) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorTagResource(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &TagResourceOutput{}

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpUntagResource struct {
}

func (*smithyRpcv2cbor_deserializeOpUntagResource) ID() string {
	return "OperationDeserializer"
}

func (m *smithyRpcv2cbor_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
	out, metadata, err = next.HandleDeserialize(ctx, in)

	_, span := tracing.StartSpan(ctx, "OperationDeserializer")
	endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
	defer endTimer()
	defer span.End()

	if err != nil {
		return out, metadata, err
	}

	resp, ok := out.RawResponse.(*smithyhttp.Response)
	if !ok {
		return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse)
	}

	if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" {
		return out, metadata, &smithy.DeserializationError{
			Err: fmt.Errorf(
				"unexpected smithy-protocol response header '%s' (HTTP status: %s)",
				resp.Header.Get("smithy-protocol"),
				resp.Status,
			),
		}
	}

	if resp.StatusCode != 200 {
		return out, metadata, rpc2_deserializeOpErrorUntagResource(resp)
	}

	if _, err = io.Copy(io.Discard, resp.Body); err != nil {
		return out, metadata, fmt.Errorf("discard response body: %w", err)
	}

	out.Result = &UntagResourceOutput{}

	return out, metadata, nil
}
func deserializeCBOR_ActionsSuppressedBy(v smithycbor.Value) (types.ActionsSuppressedBy, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.ActionsSuppressedBy(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.ActionsSuppressedBy(av), nil
}

func deserializeCBOR_AlarmContributor(v smithycbor.Value) (*types.AlarmContributor, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.AlarmContributor{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ContributorId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ContributorId = ptr.String(dv)
		}

		if key == "ContributorAttributes" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ContributorAttributes(sv)
			if err != nil {
				return nil, err
			}
			ds.ContributorAttributes = dv
		}

		if key == "StateReason" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.StateReason = ptr.String(dv)
		}

		if key == "StateTransitionedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StateTransitionedTimestamp = ptr.Time(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_AlarmContributors(v smithycbor.Value) ([]types.AlarmContributor, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.AlarmContributor
	for _, si := range av {

		di, err := deserializeCBOR_AlarmContributor(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_AlarmHistoryItem(v smithycbor.Value) (*types.AlarmHistoryItem, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.AlarmHistoryItem{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmName = ptr.String(dv)
		}

		if key == "AlarmContributorId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmContributorId = ptr.String(dv)
		}

		if key == "AlarmType" {

			dv, err := deserializeCBOR_AlarmType(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmType = dv
		}

		if key == "Timestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.Timestamp = ptr.Time(dv)
		}

		if key == "HistoryItemType" {

			dv, err := deserializeCBOR_HistoryItemType(sv)
			if err != nil {
				return nil, err
			}
			ds.HistoryItemType = dv
		}

		if key == "HistorySummary" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.HistorySummary = ptr.String(dv)
		}

		if key == "HistoryData" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.HistoryData = ptr.String(dv)
		}

		if key == "AlarmContributorAttributes" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ContributorAttributes(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmContributorAttributes = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_AlarmHistoryItems(v smithycbor.Value) ([]types.AlarmHistoryItem, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.AlarmHistoryItem
	for _, si := range av {

		di, err := deserializeCBOR_AlarmHistoryItem(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_AlarmMuteRuleStatus(v smithycbor.Value) (types.AlarmMuteRuleStatus, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.AlarmMuteRuleStatus(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.AlarmMuteRuleStatus(av), nil
}

func deserializeCBOR_AlarmMuteRuleSummaries(v smithycbor.Value) ([]types.AlarmMuteRuleSummary, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.AlarmMuteRuleSummary
	for _, si := range av {

		di, err := deserializeCBOR_AlarmMuteRuleSummary(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_AlarmMuteRuleSummary(v smithycbor.Value) (*types.AlarmMuteRuleSummary, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.AlarmMuteRuleSummary{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmMuteRuleArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmMuteRuleArn = ptr.String(dv)
		}

		if key == "ExpireDate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.ExpireDate = ptr.Time(dv)
		}

		if key == "Status" {

			dv, err := deserializeCBOR_AlarmMuteRuleStatus(sv)
			if err != nil {
				return nil, err
			}
			ds.Status = dv
		}

		if key == "MuteType" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MuteType = ptr.String(dv)
		}

		if key == "LastUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.LastUpdatedTimestamp = ptr.Time(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_AlarmPromQLCriteria(v smithycbor.Value) (*types.AlarmPromQLCriteria, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.AlarmPromQLCriteria{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Query" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Query = ptr.String(dv)
		}

		if key == "PendingPeriod" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.PendingPeriod = ptr.Int32(dv)
		}

		if key == "RecoveryPeriod" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.RecoveryPeriod = ptr.Int32(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_AlarmType(v smithycbor.Value) (types.AlarmType, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.AlarmType(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.AlarmType(av), nil
}

func deserializeCBOR_AnomalyDetector(v smithycbor.Value) (*types.AnomalyDetector, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.AnomalyDetector{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AnomalyDetectorId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AnomalyDetectorId = ptr.String(dv)
		}

		if key == "Namespace" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Namespace = ptr.String(dv)
		}

		if key == "MetricName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricName = ptr.String(dv)
		}

		if key == "Dimensions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Dimensions(sv)
			if err != nil {
				return nil, err
			}
			ds.Dimensions = dv
		}

		if key == "Stat" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Stat = ptr.String(dv)
		}

		if key == "Configuration" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_AnomalyDetectorConfiguration(sv)
			if err != nil {
				return nil, err
			}
			ds.Configuration = dv
		}

		if key == "StateValue" {

			dv, err := deserializeCBOR_AnomalyDetectorStateValue(sv)
			if err != nil {
				return nil, err
			}
			ds.StateValue = dv
		}

		if key == "MetricCharacteristics" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricCharacteristics(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricCharacteristics = dv
		}

		if key == "SingleMetricAnomalyDetector" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_SingleMetricAnomalyDetector(sv)
			if err != nil {
				return nil, err
			}
			ds.SingleMetricAnomalyDetector = dv
		}

		if key == "MetricMathAnomalyDetector" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricMathAnomalyDetector(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricMathAnomalyDetector = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_AnomalyDetectorConfiguration(v smithycbor.Value) (*types.AnomalyDetectorConfiguration, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.AnomalyDetectorConfiguration{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ExcludedTimeRanges" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_AnomalyDetectorExcludedTimeRanges(sv)
			if err != nil {
				return nil, err
			}
			ds.ExcludedTimeRanges = dv
		}

		if key == "MetricTimezone" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricTimezone = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_AnomalyDetectorExcludedTimeRanges(v smithycbor.Value) ([]types.Range, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.Range
	for _, si := range av {

		di, err := deserializeCBOR_Range(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_AnomalyDetectors(v smithycbor.Value) ([]types.AnomalyDetector, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.AnomalyDetector
	for _, si := range av {

		di, err := deserializeCBOR_AnomalyDetector(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_AnomalyDetectorStateValue(v smithycbor.Value) (types.AnomalyDetectorStateValue, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.AnomalyDetectorStateValue(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.AnomalyDetectorStateValue(av), nil
}

func deserializeCBOR_BatchFailures(v smithycbor.Value) ([]types.PartialFailure, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.PartialFailure
	for _, si := range av {

		di, err := deserializeCBOR_PartialFailure(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_ComparisonOperator(v smithycbor.Value) (types.ComparisonOperator, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.ComparisonOperator(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.ComparisonOperator(av), nil
}

func deserializeCBOR_CompositeAlarm(v smithycbor.Value) (*types.CompositeAlarm, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.CompositeAlarm{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ActionsEnabled" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsEnabled = ptr.Bool(dv)
		}

		if key == "AlarmActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmActions = dv
		}

		if key == "AlarmArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmArn = ptr.String(dv)
		}

		if key == "AlarmConfigurationUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmConfigurationUpdatedTimestamp = ptr.Time(dv)
		}

		if key == "AlarmDescription" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmDescription = ptr.String(dv)
		}

		if key == "AlarmName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmName = ptr.String(dv)
		}

		if key == "AlarmRule" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmRule = ptr.String(dv)
		}

		if key == "InsufficientDataActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.InsufficientDataActions = dv
		}

		if key == "OKActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.OKActions = dv
		}

		if key == "StateReason" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.StateReason = ptr.String(dv)
		}

		if key == "StateReasonData" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.StateReasonData = ptr.String(dv)
		}

		if key == "StateUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StateUpdatedTimestamp = ptr.Time(dv)
		}

		if key == "StateValue" {

			dv, err := deserializeCBOR_StateValue(sv)
			if err != nil {
				return nil, err
			}
			ds.StateValue = dv
		}

		if key == "StateTransitionedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StateTransitionedTimestamp = ptr.Time(dv)
		}

		if key == "ActionsSuppressedBy" {

			dv, err := deserializeCBOR_ActionsSuppressedBy(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsSuppressedBy = dv
		}

		if key == "ActionsSuppressedReason" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsSuppressedReason = ptr.String(dv)
		}

		if key == "ActionsSuppressor" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsSuppressor = ptr.String(dv)
		}

		if key == "ActionsSuppressorWaitPeriod" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsSuppressorWaitPeriod = ptr.Int32(dv)
		}

		if key == "ActionsSuppressorExtensionPeriod" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsSuppressorExtensionPeriod = ptr.Int32(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_CompositeAlarms(v smithycbor.Value) ([]types.CompositeAlarm, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.CompositeAlarm
	for _, si := range av {

		di, err := deserializeCBOR_CompositeAlarm(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_ConcurrentModificationException(v smithycbor.Value) (*types.ConcurrentModificationException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ConcurrentModificationException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ConflictException(v smithycbor.Value) (*types.ConflictException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ConflictException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ContributorAttributes(v smithycbor.Value) (map[string]string, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	dm := map[string]string{}
	for key, sv := range av {

		dv, err := deserializeCBOR_String(sv)
		if err != nil {
			return nil, err
		}
		dm[key] = dv
	}
	return dm, nil
}

func deserializeCBOR_DashboardEntries(v smithycbor.Value) ([]types.DashboardEntry, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.DashboardEntry
	for _, si := range av {

		di, err := deserializeCBOR_DashboardEntry(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_DashboardEntry(v smithycbor.Value) (*types.DashboardEntry, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.DashboardEntry{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "DashboardName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardName = ptr.String(dv)
		}

		if key == "DashboardArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardArn = ptr.String(dv)
		}

		if key == "LastModified" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.LastModified = ptr.Time(dv)
		}

		if key == "Size" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int64(sv)
			if err != nil {
				return nil, err
			}
			ds.Size = ptr.Int64(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_DashboardInvalidInputError(v smithycbor.Value) (*types.DashboardInvalidInputError, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.DashboardInvalidInputError{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}

		if key == "dashboardValidationMessages" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_DashboardValidationMessages(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardValidationMessages = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_DashboardNotFoundError(v smithycbor.Value) (*types.DashboardNotFoundError, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.DashboardNotFoundError{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_DashboardValidationMessage(v smithycbor.Value) (*types.DashboardValidationMessage, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.DashboardValidationMessage{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "DataPath" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.DataPath = ptr.String(dv)
		}

		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_DashboardValidationMessages(v smithycbor.Value) ([]types.DashboardValidationMessage, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.DashboardValidationMessage
	for _, si := range av {

		di, err := deserializeCBOR_DashboardValidationMessage(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_Datapoint(v smithycbor.Value) (*types.Datapoint, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Datapoint{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Timestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.Timestamp = ptr.Time(dv)
		}

		if key == "SampleCount" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.SampleCount = ptr.Float64(dv)
		}

		if key == "Average" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Average = ptr.Float64(dv)
		}

		if key == "Sum" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Sum = ptr.Float64(dv)
		}

		if key == "Minimum" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Minimum = ptr.Float64(dv)
		}

		if key == "Maximum" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Maximum = ptr.Float64(dv)
		}

		if key == "Unit" {

			dv, err := deserializeCBOR_StandardUnit(sv)
			if err != nil {
				return nil, err
			}
			ds.Unit = dv
		}

		if key == "ExtendedStatistics" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_DatapointValueMap(sv)
			if err != nil {
				return nil, err
			}
			ds.ExtendedStatistics = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_Datapoints(v smithycbor.Value) ([]types.Datapoint, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.Datapoint
	for _, si := range av {

		di, err := deserializeCBOR_Datapoint(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_DatapointValueMap(v smithycbor.Value) (map[string]float64, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	dm := map[string]float64{}
	for key, sv := range av {

		dv, err := deserializeCBOR_Float64(sv)
		if err != nil {
			return nil, err
		}
		dm[key] = dv
	}
	return dm, nil
}

func deserializeCBOR_DatapointValues(v smithycbor.Value) ([]float64, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []float64
	for _, si := range av {

		di, err := deserializeCBOR_Float64(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_Dimension(v smithycbor.Value) (*types.Dimension, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Dimension{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Name" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Name = ptr.String(dv)
		}

		if key == "Value" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Value = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_Dimensions(v smithycbor.Value) ([]types.Dimension, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.Dimension
	for _, si := range av {

		di, err := deserializeCBOR_Dimension(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_EvaluationCriteria(v smithycbor.Value) (types.EvaluationCriteria, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	for key, sv := range av {
		if key == "PromQLCriteria" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_AlarmPromQLCriteria(sv)
			if err != nil {
				return nil, err
			}
			return &types.EvaluationCriteriaMemberPromQLCriteria{Value: *dv}, nil
		}
	}
	return nil, fmt.Errorf("unrecognized variant")
}

func deserializeCBOR_EvaluationState(v smithycbor.Value) (types.EvaluationState, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.EvaluationState(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.EvaluationState(av), nil
}

func deserializeCBOR_EvaluationWindow(v smithycbor.Value) (types.EvaluationWindow, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	for key, sv := range av {
		if key == "WallClockWindow" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_WallClockWindow(sv)
			if err != nil {
				return nil, err
			}
			return &types.EvaluationWindowMemberWallClockWindow{Value: *dv}, nil
		}

		if key == "SlidingWindow" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_SlidingWindow(sv)
			if err != nil {
				return nil, err
			}
			return &types.EvaluationWindowMemberSlidingWindow{Value: *dv}, nil
		}
	}
	return nil, fmt.Errorf("unrecognized variant")
}

func deserializeCBOR_HistoryItemType(v smithycbor.Value) (types.HistoryItemType, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.HistoryItemType(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.HistoryItemType(av), nil
}

func deserializeCBOR_InsightRule(v smithycbor.Value) (*types.InsightRule, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InsightRule{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Name" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Name = ptr.String(dv)
		}

		if key == "State" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.State = ptr.String(dv)
		}

		if key == "Schema" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Schema = ptr.String(dv)
		}

		if key == "Definition" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Definition = ptr.String(dv)
		}

		if key == "ManagedRule" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.ManagedRule = ptr.Bool(dv)
		}

		if key == "ApplyOnTransformedLogs" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.ApplyOnTransformedLogs = ptr.Bool(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_InsightRuleContributor(v smithycbor.Value) (*types.InsightRuleContributor, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InsightRuleContributor{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Keys" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_InsightRuleContributorKeys(sv)
			if err != nil {
				return nil, err
			}
			ds.Keys = dv
		}

		if key == "ApproximateAggregateValue" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.ApproximateAggregateValue = ptr.Float64(dv)
		}

		if key == "Datapoints" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_InsightRuleContributorDatapoints(sv)
			if err != nil {
				return nil, err
			}
			ds.Datapoints = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_InsightRuleContributorDatapoint(v smithycbor.Value) (*types.InsightRuleContributorDatapoint, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InsightRuleContributorDatapoint{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Timestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.Timestamp = ptr.Time(dv)
		}

		if key == "ApproximateValue" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.ApproximateValue = ptr.Float64(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_InsightRuleContributorDatapoints(v smithycbor.Value) ([]types.InsightRuleContributorDatapoint, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.InsightRuleContributorDatapoint
	for _, si := range av {

		di, err := deserializeCBOR_InsightRuleContributorDatapoint(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_InsightRuleContributorKeyLabels(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_InsightRuleContributorKeys(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_InsightRuleContributors(v smithycbor.Value) ([]types.InsightRuleContributor, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.InsightRuleContributor
	for _, si := range av {

		di, err := deserializeCBOR_InsightRuleContributor(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_InsightRuleMetricDatapoint(v smithycbor.Value) (*types.InsightRuleMetricDatapoint, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InsightRuleMetricDatapoint{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Timestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.Timestamp = ptr.Time(dv)
		}

		if key == "UniqueContributors" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.UniqueContributors = ptr.Float64(dv)
		}

		if key == "MaxContributorValue" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.MaxContributorValue = ptr.Float64(dv)
		}

		if key == "SampleCount" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.SampleCount = ptr.Float64(dv)
		}

		if key == "Average" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Average = ptr.Float64(dv)
		}

		if key == "Sum" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Sum = ptr.Float64(dv)
		}

		if key == "Minimum" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Minimum = ptr.Float64(dv)
		}

		if key == "Maximum" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Maximum = ptr.Float64(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_InsightRuleMetricDatapoints(v smithycbor.Value) ([]types.InsightRuleMetricDatapoint, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.InsightRuleMetricDatapoint
	for _, si := range av {

		di, err := deserializeCBOR_InsightRuleMetricDatapoint(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_InsightRules(v smithycbor.Value) ([]types.InsightRule, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.InsightRule
	for _, si := range av {

		di, err := deserializeCBOR_InsightRule(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_InternalServiceFault(v smithycbor.Value) (*types.InternalServiceFault, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InternalServiceFault{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_InvalidFormatFault(v smithycbor.Value) (*types.InvalidFormatFault, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InvalidFormatFault{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_InvalidNextToken(v smithycbor.Value) (*types.InvalidNextToken, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InvalidNextToken{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_InvalidParameterCombinationException(v smithycbor.Value) (*types.InvalidParameterCombinationException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InvalidParameterCombinationException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_InvalidParameterValueException(v smithycbor.Value) (*types.InvalidParameterValueException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InvalidParameterValueException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_KmsAccessDeniedException(v smithycbor.Value) (*types.KmsAccessDeniedException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.KmsAccessDeniedException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_KmsKeyDisabledException(v smithycbor.Value) (*types.KmsKeyDisabledException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.KmsKeyDisabledException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_KmsKeyNotFoundException(v smithycbor.Value) (*types.KmsKeyNotFoundException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.KmsKeyNotFoundException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_LimitExceededException(v smithycbor.Value) (*types.LimitExceededException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.LimitExceededException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_LimitExceededFault(v smithycbor.Value) (*types.LimitExceededFault, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.LimitExceededFault{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_LogAlarm(v smithycbor.Value) (*types.LogAlarm, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.LogAlarm{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmName = ptr.String(dv)
		}

		if key == "AlarmArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmArn = ptr.String(dv)
		}

		if key == "AlarmDescription" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmDescription = ptr.String(dv)
		}

		if key == "AlarmConfigurationUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmConfigurationUpdatedTimestamp = ptr.Time(dv)
		}

		if key == "ActionsEnabled" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsEnabled = ptr.Bool(dv)
		}

		if key == "OKActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.OKActions = dv
		}

		if key == "AlarmActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmActions = dv
		}

		if key == "InsufficientDataActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.InsufficientDataActions = dv
		}

		if key == "StateValue" {

			dv, err := deserializeCBOR_StateValue(sv)
			if err != nil {
				return nil, err
			}
			ds.StateValue = dv
		}

		if key == "StateReason" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.StateReason = ptr.String(dv)
		}

		if key == "StateReasonData" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.StateReasonData = ptr.String(dv)
		}

		if key == "StateUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StateUpdatedTimestamp = ptr.Time(dv)
		}

		if key == "ScheduledQueryConfiguration" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ScheduledQueryConfiguration(sv)
			if err != nil {
				return nil, err
			}
			ds.ScheduledQueryConfiguration = dv
		}

		if key == "QueryResultsToEvaluate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.QueryResultsToEvaluate = ptr.Int32(dv)
		}

		if key == "QueryResultsToAlarm" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.QueryResultsToAlarm = ptr.Int32(dv)
		}

		if key == "Threshold" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Threshold = ptr.Float64(dv)
		}

		if key == "ComparisonOperator" {

			dv, err := deserializeCBOR_ComparisonOperator(sv)
			if err != nil {
				return nil, err
			}
			ds.ComparisonOperator = dv
		}

		if key == "TreatMissingData" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.TreatMissingData = ptr.String(dv)
		}

		if key == "StateTransitionedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StateTransitionedTimestamp = ptr.Time(dv)
		}

		if key == "EvaluationState" {

			dv, err := deserializeCBOR_EvaluationState(sv)
			if err != nil {
				return nil, err
			}
			ds.EvaluationState = dv
		}

		if key == "ActionLogLineCount" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionLogLineCount = ptr.Int32(dv)
		}

		if key == "ActionLogLineRoleArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionLogLineRoleArn = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_LogAlarms(v smithycbor.Value) ([]types.LogAlarm, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.LogAlarm
	for _, si := range av {

		di, err := deserializeCBOR_LogAlarm(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_LogGroupIdentifiers(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_ManagedRuleDescription(v smithycbor.Value) (*types.ManagedRuleDescription, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ManagedRuleDescription{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "TemplateName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.TemplateName = ptr.String(dv)
		}

		if key == "ResourceARN" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ResourceARN = ptr.String(dv)
		}

		if key == "RuleState" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ManagedRuleState(sv)
			if err != nil {
				return nil, err
			}
			ds.RuleState = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_ManagedRuleDescriptions(v smithycbor.Value) ([]types.ManagedRuleDescription, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.ManagedRuleDescription
	for _, si := range av {

		di, err := deserializeCBOR_ManagedRuleDescription(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_ManagedRuleState(v smithycbor.Value) (*types.ManagedRuleState, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ManagedRuleState{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "RuleName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.RuleName = ptr.String(dv)
		}

		if key == "State" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.State = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_MessageData(v smithycbor.Value) (*types.MessageData, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MessageData{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Code" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Code = ptr.String(dv)
		}

		if key == "Value" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Value = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_Metric(v smithycbor.Value) (*types.Metric, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Metric{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Namespace" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Namespace = ptr.String(dv)
		}

		if key == "MetricName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricName = ptr.String(dv)
		}

		if key == "Dimensions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Dimensions(sv)
			if err != nil {
				return nil, err
			}
			ds.Dimensions = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricAlarm(v smithycbor.Value) (*types.MetricAlarm, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricAlarm{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmName = ptr.String(dv)
		}

		if key == "AlarmArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmArn = ptr.String(dv)
		}

		if key == "AlarmDescription" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmDescription = ptr.String(dv)
		}

		if key == "AlarmConfigurationUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmConfigurationUpdatedTimestamp = ptr.Time(dv)
		}

		if key == "ActionsEnabled" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.ActionsEnabled = ptr.Bool(dv)
		}

		if key == "OKActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.OKActions = dv
		}

		if key == "AlarmActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmActions = dv
		}

		if key == "InsufficientDataActions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ResourceList(sv)
			if err != nil {
				return nil, err
			}
			ds.InsufficientDataActions = dv
		}

		if key == "StateValue" {

			dv, err := deserializeCBOR_StateValue(sv)
			if err != nil {
				return nil, err
			}
			ds.StateValue = dv
		}

		if key == "StateReason" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.StateReason = ptr.String(dv)
		}

		if key == "StateReasonData" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.StateReasonData = ptr.String(dv)
		}

		if key == "StateUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StateUpdatedTimestamp = ptr.Time(dv)
		}

		if key == "MetricName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricName = ptr.String(dv)
		}

		if key == "Namespace" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Namespace = ptr.String(dv)
		}

		if key == "Statistic" {

			dv, err := deserializeCBOR_Statistic(sv)
			if err != nil {
				return nil, err
			}
			ds.Statistic = dv
		}

		if key == "ExtendedStatistic" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ExtendedStatistic = ptr.String(dv)
		}

		if key == "Dimensions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Dimensions(sv)
			if err != nil {
				return nil, err
			}
			ds.Dimensions = dv
		}

		if key == "Period" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.Period = ptr.Int32(dv)
		}

		if key == "Unit" {

			dv, err := deserializeCBOR_StandardUnit(sv)
			if err != nil {
				return nil, err
			}
			ds.Unit = dv
		}

		if key == "EvaluationPeriods" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.EvaluationPeriods = ptr.Int32(dv)
		}

		if key == "DatapointsToAlarm" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.DatapointsToAlarm = ptr.Int32(dv)
		}

		if key == "Threshold" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.Threshold = ptr.Float64(dv)
		}

		if key == "ComparisonOperator" {

			dv, err := deserializeCBOR_ComparisonOperator(sv)
			if err != nil {
				return nil, err
			}
			ds.ComparisonOperator = dv
		}

		if key == "TreatMissingData" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.TreatMissingData = ptr.String(dv)
		}

		if key == "EvaluateLowSampleCountPercentile" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.EvaluateLowSampleCountPercentile = ptr.String(dv)
		}

		if key == "Metrics" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricDataQueries(sv)
			if err != nil {
				return nil, err
			}
			ds.Metrics = dv
		}

		if key == "ThresholdMetricId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ThresholdMetricId = ptr.String(dv)
		}

		if key == "EvaluationState" {

			dv, err := deserializeCBOR_EvaluationState(sv)
			if err != nil {
				return nil, err
			}
			ds.EvaluationState = dv
		}

		if key == "StateTransitionedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StateTransitionedTimestamp = ptr.Time(dv)
		}

		if key == "EvaluationWindow" {

			dv, err := deserializeCBOR_EvaluationWindow(sv)
			if err != nil {
				return nil, err
			}
			ds.EvaluationWindow = dv
		}

		if key == "EvaluationCriteria" {

			dv, err := deserializeCBOR_EvaluationCriteria(sv)
			if err != nil {
				return nil, err
			}
			ds.EvaluationCriteria = dv
		}

		if key == "EvaluationInterval" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.EvaluationInterval = ptr.Int32(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricAlarms(v smithycbor.Value) ([]types.MetricAlarm, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MetricAlarm
	for _, si := range av {

		di, err := deserializeCBOR_MetricAlarm(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricCharacteristics(v smithycbor.Value) (*types.MetricCharacteristics, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricCharacteristics{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "PeriodicSpikes" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.PeriodicSpikes = ptr.Bool(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricDataQueries(v smithycbor.Value) ([]types.MetricDataQuery, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MetricDataQuery
	for _, si := range av {

		di, err := deserializeCBOR_MetricDataQuery(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricDataQuery(v smithycbor.Value) (*types.MetricDataQuery, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricDataQuery{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Id" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Id = ptr.String(dv)
		}

		if key == "MetricStat" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStat(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricStat = dv
		}

		if key == "Expression" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Expression = ptr.String(dv)
		}

		if key == "Label" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Label = ptr.String(dv)
		}

		if key == "ReturnData" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.ReturnData = ptr.Bool(dv)
		}

		if key == "Period" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.Period = ptr.Int32(dv)
		}

		if key == "AccountId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AccountId = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricDataResult(v smithycbor.Value) (*types.MetricDataResult, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricDataResult{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Id" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Id = ptr.String(dv)
		}

		if key == "Label" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Label = ptr.String(dv)
		}

		if key == "Timestamps" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Timestamps(sv)
			if err != nil {
				return nil, err
			}
			ds.Timestamps = dv
		}

		if key == "Values" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_DatapointValues(sv)
			if err != nil {
				return nil, err
			}
			ds.Values = dv
		}

		if key == "StatusCode" {

			dv, err := deserializeCBOR_StatusCode(sv)
			if err != nil {
				return nil, err
			}
			ds.StatusCode = dv
		}

		if key == "Messages" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricDataResultMessages(sv)
			if err != nil {
				return nil, err
			}
			ds.Messages = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricDataResultMessages(v smithycbor.Value) ([]types.MessageData, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MessageData
	for _, si := range av {

		di, err := deserializeCBOR_MessageData(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricDataResults(v smithycbor.Value) ([]types.MetricDataResult, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MetricDataResult
	for _, si := range av {

		di, err := deserializeCBOR_MetricDataResult(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricMathAnomalyDetector(v smithycbor.Value) (*types.MetricMathAnomalyDetector, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricMathAnomalyDetector{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "MetricDataQueries" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricDataQueries(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricDataQueries = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_Metrics(v smithycbor.Value) ([]types.Metric, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.Metric
	for _, si := range av {

		di, err := deserializeCBOR_Metric(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricStat(v smithycbor.Value) (*types.MetricStat, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricStat{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Metric" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Metric(sv)
			if err != nil {
				return nil, err
			}
			ds.Metric = dv
		}

		if key == "Period" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int32(sv)
			if err != nil {
				return nil, err
			}
			ds.Period = ptr.Int32(dv)
		}

		if key == "Stat" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Stat = ptr.String(dv)
		}

		if key == "Unit" {

			dv, err := deserializeCBOR_StandardUnit(sv)
			if err != nil {
				return nil, err
			}
			ds.Unit = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricStreamEntries(v smithycbor.Value) ([]types.MetricStreamEntry, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MetricStreamEntry
	for _, si := range av {

		di, err := deserializeCBOR_MetricStreamEntry(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricStreamEntry(v smithycbor.Value) (*types.MetricStreamEntry, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricStreamEntry{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Arn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Arn = ptr.String(dv)
		}

		if key == "CreationDate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.CreationDate = ptr.Time(dv)
		}

		if key == "LastUpdateDate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.LastUpdateDate = ptr.Time(dv)
		}

		if key == "Name" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Name = ptr.String(dv)
		}

		if key == "FirehoseArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.FirehoseArn = ptr.String(dv)
		}

		if key == "State" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.State = ptr.String(dv)
		}

		if key == "OutputFormat" {

			dv, err := deserializeCBOR_MetricStreamOutputFormat(sv)
			if err != nil {
				return nil, err
			}
			ds.OutputFormat = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricStreamFilter(v smithycbor.Value) (*types.MetricStreamFilter, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricStreamFilter{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Namespace" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Namespace = ptr.String(dv)
		}

		if key == "MetricNames" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStreamFilterMetricNames(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricNames = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricStreamFilterMetricNames(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_MetricStreamFilters(v smithycbor.Value) ([]types.MetricStreamFilter, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MetricStreamFilter
	for _, si := range av {

		di, err := deserializeCBOR_MetricStreamFilter(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricStreamOutputFormat(v smithycbor.Value) (types.MetricStreamOutputFormat, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.MetricStreamOutputFormat(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.MetricStreamOutputFormat(av), nil
}

func deserializeCBOR_MetricStreamStatisticsAdditionalStatistics(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_MetricStreamStatisticsConfiguration(v smithycbor.Value) (*types.MetricStreamStatisticsConfiguration, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricStreamStatisticsConfiguration{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "IncludeMetrics" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStreamStatisticsIncludeMetrics(sv)
			if err != nil {
				return nil, err
			}
			ds.IncludeMetrics = dv
		}

		if key == "AdditionalStatistics" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStreamStatisticsAdditionalStatistics(sv)
			if err != nil {
				return nil, err
			}
			ds.AdditionalStatistics = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_MetricStreamStatisticsConfigurations(v smithycbor.Value) ([]types.MetricStreamStatisticsConfiguration, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MetricStreamStatisticsConfiguration
	for _, si := range av {

		di, err := deserializeCBOR_MetricStreamStatisticsConfiguration(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricStreamStatisticsIncludeMetrics(v smithycbor.Value) ([]types.MetricStreamStatisticsMetric, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.MetricStreamStatisticsMetric
	for _, si := range av {

		di, err := deserializeCBOR_MetricStreamStatisticsMetric(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_MetricStreamStatisticsMetric(v smithycbor.Value) (*types.MetricStreamStatisticsMetric, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MetricStreamStatisticsMetric{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Namespace" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Namespace = ptr.String(dv)
		}

		if key == "MetricName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricName = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_MissingRequiredParameterException(v smithycbor.Value) (*types.MissingRequiredParameterException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MissingRequiredParameterException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_MuteTargetAlarmNameList(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_MuteTargets(v smithycbor.Value) (*types.MuteTargets, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.MuteTargets{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmNames" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MuteTargetAlarmNameList(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmNames = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_OTelEnrichmentStatus(v smithycbor.Value) (types.OTelEnrichmentStatus, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.OTelEnrichmentStatus(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.OTelEnrichmentStatus(av), nil
}

func deserializeCBOR_OwningAccounts(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_PartialFailure(v smithycbor.Value) (*types.PartialFailure, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.PartialFailure{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "FailureResource" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.FailureResource = ptr.String(dv)
		}

		if key == "ExceptionType" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ExceptionType = ptr.String(dv)
		}

		if key == "FailureCode" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.FailureCode = ptr.String(dv)
		}

		if key == "FailureDescription" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.FailureDescription = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_Range(v smithycbor.Value) (*types.Range, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Range{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "StartTime" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StartTime = ptr.Time(dv)
		}

		if key == "EndTime" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.EndTime = ptr.Time(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ResourceConflict(v smithycbor.Value) (*types.ResourceConflict, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ResourceConflict{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ResourceList(v smithycbor.Value) ([]string, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []string
	for _, si := range av {

		di, err := deserializeCBOR_String(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_ResourceNotFound(v smithycbor.Value) (*types.ResourceNotFound, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ResourceNotFound{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ResourceNotFoundException(v smithycbor.Value) (*types.ResourceNotFoundException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ResourceNotFoundException{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ResourceType" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ResourceType = ptr.String(dv)
		}

		if key == "ResourceId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ResourceId = ptr.String(dv)
		}

		if key == "Message" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Message = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_Rule(v smithycbor.Value) (*types.Rule, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Rule{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Schedule" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Schedule(sv)
			if err != nil {
				return nil, err
			}
			ds.Schedule = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_Schedule(v smithycbor.Value) (*types.Schedule, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Schedule{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Expression" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Expression = ptr.String(dv)
		}

		if key == "Duration" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Duration = ptr.String(dv)
		}

		if key == "Timezone" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Timezone = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ScheduleConfiguration(v smithycbor.Value) (*types.ScheduleConfiguration, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ScheduleConfiguration{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ScheduleExpression" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ScheduleExpression = ptr.String(dv)
		}

		if key == "StartTimeOffset" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int64(sv)
			if err != nil {
				return nil, err
			}
			ds.StartTimeOffset = ptr.Int64(dv)
		}

		if key == "EndTimeOffset" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int64(sv)
			if err != nil {
				return nil, err
			}
			ds.EndTimeOffset = ptr.Int64(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ScheduledQueryConfiguration(v smithycbor.Value) (*types.ScheduledQueryConfiguration, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ScheduledQueryConfiguration{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "QueryString" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.QueryString = ptr.String(dv)
		}

		if key == "LogGroupIdentifiers" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_LogGroupIdentifiers(sv)
			if err != nil {
				return nil, err
			}
			ds.LogGroupIdentifiers = dv
		}

		if key == "QueryARN" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.QueryARN = ptr.String(dv)
		}

		if key == "ScheduledQueryRoleARN" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.ScheduledQueryRoleARN = ptr.String(dv)
		}

		if key == "ScheduleConfiguration" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ScheduleConfiguration(sv)
			if err != nil {
				return nil, err
			}
			ds.ScheduleConfiguration = dv
		}

		if key == "AggregationExpression" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AggregationExpression = ptr.String(dv)
		}

		if key == "Tags" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_TagList(sv)
			if err != nil {
				return nil, err
			}
			ds.Tags = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_SingleMetricAnomalyDetector(v smithycbor.Value) (*types.SingleMetricAnomalyDetector, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.SingleMetricAnomalyDetector{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AccountId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AccountId = ptr.String(dv)
		}

		if key == "Namespace" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Namespace = ptr.String(dv)
		}

		if key == "MetricName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricName = ptr.String(dv)
		}

		if key == "Dimensions" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Dimensions(sv)
			if err != nil {
				return nil, err
			}
			ds.Dimensions = dv
		}

		if key == "Stat" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Stat = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_SlidingWindow(v smithycbor.Value) (*types.SlidingWindow, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.SlidingWindow{}
	for key, sv := range av {
		_, _ = key, sv

	}
	return ds, nil
}

func deserializeCBOR_StandardUnit(v smithycbor.Value) (types.StandardUnit, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.StandardUnit(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.StandardUnit(av), nil
}

func deserializeCBOR_StateValue(v smithycbor.Value) (types.StateValue, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.StateValue(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.StateValue(av), nil
}

func deserializeCBOR_Statistic(v smithycbor.Value) (types.Statistic, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.Statistic(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.Statistic(av), nil
}

func deserializeCBOR_StatusCode(v smithycbor.Value) (types.StatusCode, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.StatusCode(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.StatusCode(av), nil
}

func deserializeCBOR_Tag(v smithycbor.Value) (*types.Tag, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Tag{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Key" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Key = ptr.String(dv)
		}

		if key == "Value" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Value = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_TagList(v smithycbor.Value) ([]types.Tag, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []types.Tag
	for _, si := range av {

		di, err := deserializeCBOR_Tag(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, *di)
	}
	return dl, nil
}

func deserializeCBOR_Timestamps(v smithycbor.Value) ([]time.Time, error) {
	av, ok := v.(smithycbor.List)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	var dl []time.Time
	for _, si := range av {

		di, err := deserializeCBOR_Time(si)
		if err != nil {
			return nil, err
		}
		dl = append(dl, di)
	}
	return dl, nil
}

func deserializeCBOR_WallClockWindow(v smithycbor.Value) (*types.WallClockWindow, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.WallClockWindow{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Timezone" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Timezone = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_Blob(v smithycbor.Value) ([]byte, error) {
	av, ok := v.(smithycbor.Slice)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	return []byte(av), nil
}

func deserializeCBOR_Bool(v smithycbor.Value) (bool, error) {
	av, ok := v.(smithycbor.Bool)
	if !ok {
		return false, fmt.Errorf("unexpected value type %T", v)
	}
	return bool(av), nil
}

func deserializeCBOR_Float64(v smithycbor.Value) (float64, error) {
	return smithycbor.AsFloat64(v)
}

func deserializeCBOR_Int32(v smithycbor.Value) (int32, error) {
	return smithycbor.AsInt32(v)
}

func deserializeCBOR_Int64(v smithycbor.Value) (int64, error) {
	return smithycbor.AsInt64(v)
}

func deserializeCBOR_String(v smithycbor.Value) (string, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return "", fmt.Errorf("unexpected value type %T", v)
	}
	return string(av), nil
}

func deserializeCBOR_Time(v smithycbor.Value) (time.Time, error) {
	return smithycbor.AsTime(v)
}

func deserializeCBOR_DeleteInsightRulesOutput(v smithycbor.Value) (*DeleteInsightRulesOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DeleteInsightRulesOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Failures" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_BatchFailures(sv)
			if err != nil {
				return nil, err
			}
			ds.Failures = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_DescribeAlarmContributorsOutput(v smithycbor.Value) (*DescribeAlarmContributorsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DescribeAlarmContributorsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmContributors" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_AlarmContributors(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmContributors = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_DescribeAlarmHistoryOutput(v smithycbor.Value) (*DescribeAlarmHistoryOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DescribeAlarmHistoryOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmHistoryItems" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_AlarmHistoryItems(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmHistoryItems = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_DescribeAlarmsForMetricOutput(v smithycbor.Value) (*DescribeAlarmsForMetricOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DescribeAlarmsForMetricOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "MetricAlarms" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricAlarms(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricAlarms = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_DescribeAlarmsOutput(v smithycbor.Value) (*DescribeAlarmsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DescribeAlarmsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "CompositeAlarms" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_CompositeAlarms(sv)
			if err != nil {
				return nil, err
			}
			ds.CompositeAlarms = dv
		}

		if key == "MetricAlarms" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricAlarms(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricAlarms = dv
		}

		if key == "LogAlarms" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_LogAlarms(sv)
			if err != nil {
				return nil, err
			}
			ds.LogAlarms = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_DescribeAnomalyDetectorsOutput(v smithycbor.Value) (*DescribeAnomalyDetectorsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DescribeAnomalyDetectorsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AnomalyDetectors" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_AnomalyDetectors(sv)
			if err != nil {
				return nil, err
			}
			ds.AnomalyDetectors = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_DescribeInsightRulesOutput(v smithycbor.Value) (*DescribeInsightRulesOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DescribeInsightRulesOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}

		if key == "InsightRules" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_InsightRules(sv)
			if err != nil {
				return nil, err
			}
			ds.InsightRules = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_DisableInsightRulesOutput(v smithycbor.Value) (*DisableInsightRulesOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DisableInsightRulesOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Failures" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_BatchFailures(sv)
			if err != nil {
				return nil, err
			}
			ds.Failures = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_EnableInsightRulesOutput(v smithycbor.Value) (*EnableInsightRulesOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &EnableInsightRulesOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Failures" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_BatchFailures(sv)
			if err != nil {
				return nil, err
			}
			ds.Failures = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_GetAlarmMuteRuleOutput(v smithycbor.Value) (*GetAlarmMuteRuleOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetAlarmMuteRuleOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Name" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Name = ptr.String(dv)
		}

		if key == "AlarmMuteRuleArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmMuteRuleArn = ptr.String(dv)
		}

		if key == "Description" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Description = ptr.String(dv)
		}

		if key == "Rule" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Rule(sv)
			if err != nil {
				return nil, err
			}
			ds.Rule = dv
		}

		if key == "MuteTargets" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MuteTargets(sv)
			if err != nil {
				return nil, err
			}
			ds.MuteTargets = dv
		}

		if key == "StartDate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.StartDate = ptr.Time(dv)
		}

		if key == "ExpireDate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.ExpireDate = ptr.Time(dv)
		}

		if key == "Status" {

			dv, err := deserializeCBOR_AlarmMuteRuleStatus(sv)
			if err != nil {
				return nil, err
			}
			ds.Status = dv
		}

		if key == "LastUpdatedTimestamp" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.LastUpdatedTimestamp = ptr.Time(dv)
		}

		if key == "MuteType" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.MuteType = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_GetDashboardOutput(v smithycbor.Value) (*GetDashboardOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetDashboardOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "DashboardArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardArn = ptr.String(dv)
		}

		if key == "DashboardBody" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardBody = ptr.String(dv)
		}

		if key == "DashboardName" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardName = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_GetDatasetOutput(v smithycbor.Value) (*GetDatasetOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetDatasetOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "DatasetId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.DatasetId = ptr.String(dv)
		}

		if key == "Arn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Arn = ptr.String(dv)
		}

		if key == "KmsKeyArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.KmsKeyArn = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_GetInsightRuleReportOutput(v smithycbor.Value) (*GetInsightRuleReportOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetInsightRuleReportOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "KeyLabels" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_InsightRuleContributorKeyLabels(sv)
			if err != nil {
				return nil, err
			}
			ds.KeyLabels = dv
		}

		if key == "AggregationStatistic" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AggregationStatistic = ptr.String(dv)
		}

		if key == "AggregateValue" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float64(sv)
			if err != nil {
				return nil, err
			}
			ds.AggregateValue = ptr.Float64(dv)
		}

		if key == "ApproximateUniqueCount" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Int64(sv)
			if err != nil {
				return nil, err
			}
			ds.ApproximateUniqueCount = ptr.Int64(dv)
		}

		if key == "Contributors" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_InsightRuleContributors(sv)
			if err != nil {
				return nil, err
			}
			ds.Contributors = dv
		}

		if key == "MetricDatapoints" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_InsightRuleMetricDatapoints(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricDatapoints = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_GetMetricDataOutput(v smithycbor.Value) (*GetMetricDataOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetMetricDataOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "MetricDataResults" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricDataResults(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricDataResults = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}

		if key == "Messages" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricDataResultMessages(sv)
			if err != nil {
				return nil, err
			}
			ds.Messages = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_GetMetricStatisticsOutput(v smithycbor.Value) (*GetMetricStatisticsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetMetricStatisticsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Label" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Label = ptr.String(dv)
		}

		if key == "Datapoints" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Datapoints(sv)
			if err != nil {
				return nil, err
			}
			ds.Datapoints = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_GetMetricStreamOutput(v smithycbor.Value) (*GetMetricStreamOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetMetricStreamOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Arn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Arn = ptr.String(dv)
		}

		if key == "Name" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Name = ptr.String(dv)
		}

		if key == "IncludeFilters" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStreamFilters(sv)
			if err != nil {
				return nil, err
			}
			ds.IncludeFilters = dv
		}

		if key == "ExcludeFilters" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStreamFilters(sv)
			if err != nil {
				return nil, err
			}
			ds.ExcludeFilters = dv
		}

		if key == "FirehoseArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.FirehoseArn = ptr.String(dv)
		}

		if key == "RoleArn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.RoleArn = ptr.String(dv)
		}

		if key == "State" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.State = ptr.String(dv)
		}

		if key == "CreationDate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.CreationDate = ptr.Time(dv)
		}

		if key == "LastUpdateDate" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.LastUpdateDate = ptr.Time(dv)
		}

		if key == "OutputFormat" {

			dv, err := deserializeCBOR_MetricStreamOutputFormat(sv)
			if err != nil {
				return nil, err
			}
			ds.OutputFormat = dv
		}

		if key == "StatisticsConfigurations" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStreamStatisticsConfigurations(sv)
			if err != nil {
				return nil, err
			}
			ds.StatisticsConfigurations = dv
		}

		if key == "IncludeLinkedAccountsMetrics" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Bool(sv)
			if err != nil {
				return nil, err
			}
			ds.IncludeLinkedAccountsMetrics = ptr.Bool(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_GetMetricWidgetImageOutput(v smithycbor.Value) (*GetMetricWidgetImageOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetMetricWidgetImageOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "MetricWidgetImage" {

			dv, err := deserializeCBOR_Blob(sv)
			if err != nil {
				return nil, err
			}
			ds.MetricWidgetImage = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_GetOTelEnrichmentOutput(v smithycbor.Value) (*GetOTelEnrichmentOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &GetOTelEnrichmentOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Status" {

			dv, err := deserializeCBOR_OTelEnrichmentStatus(sv)
			if err != nil {
				return nil, err
			}
			ds.Status = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_ListAlarmMuteRulesOutput(v smithycbor.Value) (*ListAlarmMuteRulesOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListAlarmMuteRulesOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AlarmMuteRuleSummaries" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_AlarmMuteRuleSummaries(sv)
			if err != nil {
				return nil, err
			}
			ds.AlarmMuteRuleSummaries = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ListDashboardsOutput(v smithycbor.Value) (*ListDashboardsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListDashboardsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "DashboardEntries" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_DashboardEntries(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardEntries = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ListManagedInsightRulesOutput(v smithycbor.Value) (*ListManagedInsightRulesOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListManagedInsightRulesOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ManagedRules" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ManagedRuleDescriptions(sv)
			if err != nil {
				return nil, err
			}
			ds.ManagedRules = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_ListMetricsOutput(v smithycbor.Value) (*ListMetricsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListMetricsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Metrics" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Metrics(sv)
			if err != nil {
				return nil, err
			}
			ds.Metrics = dv
		}

		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}

		if key == "OwningAccounts" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_OwningAccounts(sv)
			if err != nil {
				return nil, err
			}
			ds.OwningAccounts = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_ListMetricStreamsOutput(v smithycbor.Value) (*ListMetricStreamsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListMetricStreamsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "NextToken" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.NextToken = ptr.String(dv)
		}

		if key == "Entries" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_MetricStreamEntries(sv)
			if err != nil {
				return nil, err
			}
			ds.Entries = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_ListTagsForResourceOutput(v smithycbor.Value) (*ListTagsForResourceOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListTagsForResourceOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Tags" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_TagList(sv)
			if err != nil {
				return nil, err
			}
			ds.Tags = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_PutAnomalyDetectorOutput(v smithycbor.Value) (*PutAnomalyDetectorOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &PutAnomalyDetectorOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "AnomalyDetectorId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.AnomalyDetectorId = ptr.String(dv)
		}
	}
	return ds, nil
}

func deserializeCBOR_PutDashboardOutput(v smithycbor.Value) (*PutDashboardOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &PutDashboardOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "DashboardValidationMessages" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_DashboardValidationMessages(sv)
			if err != nil {
				return nil, err
			}
			ds.DashboardValidationMessages = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_PutManagedInsightRulesOutput(v smithycbor.Value) (*PutManagedInsightRulesOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &PutManagedInsightRulesOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Failures" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_BatchFailures(sv)
			if err != nil {
				return nil, err
			}
			ds.Failures = dv
		}
	}
	return ds, nil
}

func deserializeCBOR_PutMetricStreamOutput(v smithycbor.Value) (*PutMetricStreamOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &PutMetricStreamOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Arn" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.Arn = ptr.String(dv)
		}
	}
	return ds, nil
}
func rpc2_deserializeOpErrorAssociateDatasetKmsKey(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ConflictException":
		verr, err := deserializeCBOR_ConflictException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConflictException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "KmsAccessDeniedException":
		verr, err := deserializeCBOR_KmsAccessDeniedException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#KmsAccessDeniedException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "KmsKeyDisabledException":
		verr, err := deserializeCBOR_KmsKeyDisabledException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#KmsKeyDisabledException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "KmsKeyNotFoundException":
		verr, err := deserializeCBOR_KmsKeyNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#KmsKeyNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDeleteAlarmMuteRule(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDeleteAlarms(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ResourceConflict":
		verr, err := deserializeCBOR_ResourceConflict(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceConflict: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFound":
		verr, err := deserializeCBOR_ResourceNotFound(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFound: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDeleteAnomalyDetector(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterCombinationException":
		verr, err := deserializeCBOR_InvalidParameterCombinationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterCombinationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDeleteDashboards(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ConflictException":
		verr, err := deserializeCBOR_ConflictException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConflictException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDeleteInsightRules(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDeleteMetricStream(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeAlarmContributors(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeAlarmHistory(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeAlarms(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeAlarmsForMetric(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeAnomalyDetectors(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterCombinationException":
		verr, err := deserializeCBOR_InvalidParameterCombinationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterCombinationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeInsightRules(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDisableAlarmActions(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDisableInsightRules(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDisassociateDatasetKmsKey(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ConflictException":
		verr, err := deserializeCBOR_ConflictException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConflictException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorEnableAlarmActions(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorEnableInsightRules(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "LimitExceededException":
		verr, err := deserializeCBOR_LimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#LimitExceededException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetAlarmMuteRule(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetDashboard(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "DashboardNotFoundError":
		verr, err := deserializeCBOR_DashboardNotFoundError(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#DashboardNotFoundError: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetDataset(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetInsightRuleReport(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetMetricData(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetMetricStatistics(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterCombinationException":
		verr, err := deserializeCBOR_InvalidParameterCombinationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterCombinationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetMetricStream(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterCombinationException":
		verr, err := deserializeCBOR_InvalidParameterCombinationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterCombinationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetMetricWidgetImage(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorGetOTelEnrichment(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListAlarmMuteRules(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListDashboards(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListManagedInsightRules(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListMetrics(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListMetricStreams(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidNextToken":
		verr, err := deserializeCBOR_InvalidNextToken(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidNextToken: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListTagsForResource(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutAlarmMuteRule(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "LimitExceededFault":
		verr, err := deserializeCBOR_LimitExceededFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#LimitExceededFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutAnomalyDetector(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterCombinationException":
		verr, err := deserializeCBOR_InvalidParameterCombinationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterCombinationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "LimitExceededException":
		verr, err := deserializeCBOR_LimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#LimitExceededException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutCompositeAlarm(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "LimitExceededFault":
		verr, err := deserializeCBOR_LimitExceededFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#LimitExceededFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutDashboard(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ConflictException":
		verr, err := deserializeCBOR_ConflictException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConflictException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "DashboardInvalidInputError":
		verr, err := deserializeCBOR_DashboardInvalidInputError(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#DashboardInvalidInputError: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutInsightRule(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "LimitExceededException":
		verr, err := deserializeCBOR_LimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#LimitExceededException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutLogAlarm(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "LimitExceededFault":
		verr, err := deserializeCBOR_LimitExceededFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#LimitExceededFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceConflict":
		verr, err := deserializeCBOR_ResourceConflict(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceConflict: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutManagedInsightRules(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutMetricAlarm(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "LimitExceededFault":
		verr, err := deserializeCBOR_LimitExceededFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#LimitExceededFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutMetricData(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterCombinationException":
		verr, err := deserializeCBOR_InvalidParameterCombinationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterCombinationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorPutMetricStream(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ConcurrentModificationException":
		verr, err := deserializeCBOR_ConcurrentModificationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConcurrentModificationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterCombinationException":
		verr, err := deserializeCBOR_InvalidParameterCombinationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterCombinationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorSetAlarmState(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InvalidFormatFault":
		verr, err := deserializeCBOR_InvalidFormatFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidFormatFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFound":
		verr, err := deserializeCBOR_ResourceNotFound(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFound: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStartMetricStreams(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStartOTelEnrichment(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStopMetricStreams(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "MissingRequiredParameterException":
		verr, err := deserializeCBOR_MissingRequiredParameterException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#MissingRequiredParameterException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStopOTelEnrichment(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {

	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorTagResource(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ConcurrentModificationException":
		verr, err := deserializeCBOR_ConcurrentModificationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConcurrentModificationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ConflictException":
		verr, err := deserializeCBOR_ConflictException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConflictException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorUntagResource(resp *smithyhttp.Response) error {
	payload, err := io.ReadAll(resp.Body)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)}
	}

	typ, msg, v, err := getProtocolErrorInfo(payload)
	if err != nil {
		return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)}
	}

	if len(typ) == 0 {
		typ = "UnknownError"
	}
	if len(msg) == 0 {
		msg = "UnknownError"
	}

	_ = v
	// namespace can be mangled by service, so matching by error shape name
	errorParts := strings.Split(typ, "#")
	errorName := errorParts[len(errorParts)-1]
	switch string(errorName) {
	case "ConcurrentModificationException":
		verr, err := deserializeCBOR_ConcurrentModificationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConcurrentModificationException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ConflictException":
		verr, err := deserializeCBOR_ConflictException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ConflictException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InternalServiceFault":
		verr, err := deserializeCBOR_InternalServiceFault(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InternalServiceFault: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "InvalidParameterValueException":
		verr, err := deserializeCBOR_InvalidParameterValueException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#InvalidParameterValueException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.cloudwatch#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			verr.ErrorCodeOverride = ptr.String(qtype)
		}
		return verr
	default:
		if qtype := getAwsQueryErrorCode(resp); len(qtype) > 0 {
			typ = qtype
		}
		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}
func getProtocolErrorInfo(payload []byte) (typ, msg string, v smithycbor.Value, err error) {
	v, err = smithycbor.Decode(payload)
	if err != nil {
		return "", "", nil, fmt.Errorf("decode: %w", err)
	}

	mv, ok := v.(smithycbor.Map)
	if !ok {
		return "", "", nil, fmt.Errorf("unexpected payload type %T", v)
	}

	if ctyp, ok := mv["__type"]; ok {
		if ttyp, ok := ctyp.(smithycbor.String); ok {
			typ = string(ttyp)
		}
	}

	if cmsg, ok := mv["message"]; ok {
		if tmsg, ok := cmsg.(smithycbor.String); ok {
			msg = string(tmsg)
		}
	}

	return typ, msg, mv, nil
}
func getAwsQueryErrorCode(resp *smithyhttp.Response) string {
	header := resp.Header.Get("x-amzn-query-error")
	if header == "" {
		return ""
	}

	parts := strings.Split(header, ";")
	if len(parts) != 2 {
		return ""
	}

	return parts[0]
}
