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

package comprehendmedical

import (
	"context"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/comprehendmedical/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_deserializeOpDescribeEntitiesDetectionV2Job struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDescribeEntitiesDetectionV2Job) 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_deserializeOpErrorDescribeEntitiesDetectionV2Job(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeICD10CMInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDescribeICD10CMInferenceJob) 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_deserializeOpErrorDescribeICD10CMInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribePHIDetectionJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDescribePHIDetectionJob) 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_deserializeOpErrorDescribePHIDetectionJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeRxNormInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDescribeRxNormInferenceJob) 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_deserializeOpErrorDescribeRxNormInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDescribeSNOMEDCTInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDescribeSNOMEDCTInferenceJob) 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_deserializeOpErrorDescribeSNOMEDCTInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDetectEntities struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDetectEntities) 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_deserializeOpErrorDetectEntities(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDetectEntitiesV2 struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDetectEntitiesV2) 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_deserializeOpErrorDetectEntitiesV2(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpDetectPHI struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpDetectPHI) 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_deserializeOpErrorDetectPHI(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpInferICD10CM struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpInferICD10CM) 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_deserializeOpErrorInferICD10CM(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpInferRxNorm struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpInferRxNorm) 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_deserializeOpErrorInferRxNorm(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpInferSNOMEDCT struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpInferSNOMEDCT) 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_deserializeOpErrorInferSNOMEDCT(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListEntitiesDetectionV2Jobs struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpListEntitiesDetectionV2Jobs) 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_deserializeOpErrorListEntitiesDetectionV2Jobs(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListICD10CMInferenceJobs struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpListICD10CMInferenceJobs) 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_deserializeOpErrorListICD10CMInferenceJobs(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListPHIDetectionJobs struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpListPHIDetectionJobs) 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_deserializeOpErrorListPHIDetectionJobs(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListRxNormInferenceJobs struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpListRxNormInferenceJobs) 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_deserializeOpErrorListRxNormInferenceJobs(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpListSNOMEDCTInferenceJobs struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpListSNOMEDCTInferenceJobs) 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_deserializeOpErrorListSNOMEDCTInferenceJobs(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStartEntitiesDetectionV2Job struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStartEntitiesDetectionV2Job) 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_deserializeOpErrorStartEntitiesDetectionV2Job(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStartICD10CMInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStartICD10CMInferenceJob) 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_deserializeOpErrorStartICD10CMInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStartPHIDetectionJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStartPHIDetectionJob) 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_deserializeOpErrorStartPHIDetectionJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStartRxNormInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStartRxNormInferenceJob) 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_deserializeOpErrorStartRxNormInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStartSNOMEDCTInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStartSNOMEDCTInferenceJob) 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_deserializeOpErrorStartSNOMEDCTInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStopEntitiesDetectionV2Job struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStopEntitiesDetectionV2Job) 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_deserializeOpErrorStopEntitiesDetectionV2Job(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStopICD10CMInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStopICD10CMInferenceJob) 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_deserializeOpErrorStopICD10CMInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStopPHIDetectionJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStopPHIDetectionJob) 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_deserializeOpErrorStopPHIDetectionJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStopRxNormInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStopRxNormInferenceJob) 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_deserializeOpErrorStopRxNormInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}

type smithyRpcv2cbor_deserializeOpStopSNOMEDCTInferenceJob struct {
}

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

func (m *smithyRpcv2cbor_deserializeOpStopSNOMEDCTInferenceJob) 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_deserializeOpErrorStopSNOMEDCTInferenceJob(resp)
	}

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

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

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

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

	out.Result = output

	return out, metadata, nil
}
func deserializeCBOR_Attribute(v smithycbor.Value) (*types.Attribute, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Attribute{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Type" {

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

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

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

		if key == "RelationshipType" {

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

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

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

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

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

		if key == "Category" {

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

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

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

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

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

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

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

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

		if key == "JobStatus" {

			dv, err := deserializeCBOR_JobStatus(sv)
			if err != nil {
				return nil, err
			}
			ds.JobStatus = 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)
		}

		if key == "SubmitTime" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Time(sv)
			if err != nil {
				return nil, err
			}
			ds.SubmitTime = 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)
		}

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

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

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

		if key == "LanguageCode" {

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

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

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

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

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

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

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

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

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

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

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

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

		if key == "Category" {

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

		if key == "Type" {

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

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

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

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

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

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

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

func deserializeCBOR_ICD10CMAttribute(v smithycbor.Value) (*types.ICD10CMAttribute, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ICD10CMAttribute{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Type" {

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

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

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

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

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

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

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

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

		if key == "Category" {

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

		if key == "RelationshipType" {

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

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

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

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

func deserializeCBOR_ICD10CMConcept(v smithycbor.Value) (*types.ICD10CMConcept, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ICD10CMConcept{}
	for key, sv := range av {
		_, _ = key, sv
		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 == "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 == "Score" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float32(sv)
			if err != nil {
				return nil, err
			}
			ds.Score = ptr.Float32(dv)
		}
	}
	return ds, nil
}

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

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

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

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

		if key == "Category" {

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

		if key == "Type" {

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

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

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

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

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

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

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

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

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

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

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

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

func deserializeCBOR_ICD10CMTrait(v smithycbor.Value) (*types.ICD10CMTrait, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ICD10CMTrait{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Name" {

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

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

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

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

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

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

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

func deserializeCBOR_InternalServerException(v smithycbor.Value) (*types.InternalServerException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InternalServerException{}
	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_InvalidEncodingException(v smithycbor.Value) (*types.InvalidEncodingException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InvalidEncodingException{}
	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_InvalidRequestException(v smithycbor.Value) (*types.InvalidRequestException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.InvalidRequestException{}
	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_JobStatus(v smithycbor.Value) (types.JobStatus, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.JobStatus(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.JobStatus(av), nil
}

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

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

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

func deserializeCBOR_RelationshipType(v smithycbor.Value) (types.RelationshipType, error) {
	av, ok := v.(smithycbor.String)
	if !ok {
		return types.RelationshipType(""), fmt.Errorf("unexpected value type %T", v)
	}
	return types.RelationshipType(av), 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 == "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_RxNormAttribute(v smithycbor.Value) (*types.RxNormAttribute, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.RxNormAttribute{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Type" {

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

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

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

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

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

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

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

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

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

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

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

func deserializeCBOR_RxNormConcept(v smithycbor.Value) (*types.RxNormConcept, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.RxNormConcept{}
	for key, sv := range av {
		_, _ = key, sv
		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 == "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 == "Score" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float32(sv)
			if err != nil {
				return nil, err
			}
			ds.Score = ptr.Float32(dv)
		}
	}
	return ds, nil
}

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

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

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

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

		if key == "Category" {

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

		if key == "Type" {

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

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

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

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

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

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

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

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

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

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

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

func deserializeCBOR_RxNormTrait(v smithycbor.Value) (*types.RxNormTrait, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.RxNormTrait{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Name" {

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

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

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

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

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

func deserializeCBOR_ServiceUnavailableException(v smithycbor.Value) (*types.ServiceUnavailableException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ServiceUnavailableException{}
	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_SNOMEDCTAttribute(v smithycbor.Value) (*types.SNOMEDCTAttribute, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.SNOMEDCTAttribute{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Category" {

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

		if key == "Type" {

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

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

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

		if key == "RelationshipType" {

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

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

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

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

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

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

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

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

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

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

func deserializeCBOR_SNOMEDCTConcept(v smithycbor.Value) (*types.SNOMEDCTConcept, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.SNOMEDCTConcept{}
	for key, sv := range av {
		_, _ = key, sv
		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 == "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 == "Score" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_Float32(sv)
			if err != nil {
				return nil, err
			}
			ds.Score = ptr.Float32(dv)
		}
	}
	return ds, nil
}

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

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

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

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

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

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

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

		if key == "Category" {

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

		if key == "Type" {

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

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

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

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

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

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

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

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

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

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

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

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

func deserializeCBOR_SNOMEDCTTrait(v smithycbor.Value) (*types.SNOMEDCTTrait, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.SNOMEDCTTrait{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Name" {

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

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

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

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

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

func deserializeCBOR_TextSizeLimitExceededException(v smithycbor.Value) (*types.TextSizeLimitExceededException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.TextSizeLimitExceededException{}
	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_TooManyRequestsException(v smithycbor.Value) (*types.TooManyRequestsException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.TooManyRequestsException{}
	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_Trait(v smithycbor.Value) (*types.Trait, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.Trait{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Name" {

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

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

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

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

func deserializeCBOR_UnmappedAttribute(v smithycbor.Value) (*types.UnmappedAttribute, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.UnmappedAttribute{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "Type" {

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

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

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

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

func deserializeCBOR_ValidationException(v smithycbor.Value) (*types.ValidationException, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &types.ValidationException{}
	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_Float32(v smithycbor.Value) (float32, error) {
	return smithycbor.AsFloat32(v)
}

func deserializeCBOR_Int32(v smithycbor.Value) (int32, error) {
	return smithycbor.AsInt32(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_DescribeEntitiesDetectionV2JobOutput(v smithycbor.Value) (*DescribeEntitiesDetectionV2JobOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &DescribeEntitiesDetectionV2JobOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ComprehendMedicalAsyncJobProperties" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ComprehendMedicalAsyncJobProperties(sv)
			if err != nil {
				return nil, err
			}
			ds.ComprehendMedicalAsyncJobProperties = dv
		}
	}
	return ds, nil
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func deserializeCBOR_ListEntitiesDetectionV2JobsOutput(v smithycbor.Value) (*ListEntitiesDetectionV2JobsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListEntitiesDetectionV2JobsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ComprehendMedicalAsyncJobPropertiesList" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ComprehendMedicalAsyncJobPropertiesList(sv)
			if err != nil {
				return nil, err
			}
			ds.ComprehendMedicalAsyncJobPropertiesList = 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_ListICD10CMInferenceJobsOutput(v smithycbor.Value) (*ListICD10CMInferenceJobsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListICD10CMInferenceJobsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ComprehendMedicalAsyncJobPropertiesList" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ComprehendMedicalAsyncJobPropertiesList(sv)
			if err != nil {
				return nil, err
			}
			ds.ComprehendMedicalAsyncJobPropertiesList = 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_ListPHIDetectionJobsOutput(v smithycbor.Value) (*ListPHIDetectionJobsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListPHIDetectionJobsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ComprehendMedicalAsyncJobPropertiesList" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ComprehendMedicalAsyncJobPropertiesList(sv)
			if err != nil {
				return nil, err
			}
			ds.ComprehendMedicalAsyncJobPropertiesList = 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_ListRxNormInferenceJobsOutput(v smithycbor.Value) (*ListRxNormInferenceJobsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListRxNormInferenceJobsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ComprehendMedicalAsyncJobPropertiesList" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ComprehendMedicalAsyncJobPropertiesList(sv)
			if err != nil {
				return nil, err
			}
			ds.ComprehendMedicalAsyncJobPropertiesList = 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_ListSNOMEDCTInferenceJobsOutput(v smithycbor.Value) (*ListSNOMEDCTInferenceJobsOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &ListSNOMEDCTInferenceJobsOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "ComprehendMedicalAsyncJobPropertiesList" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_ComprehendMedicalAsyncJobPropertiesList(sv)
			if err != nil {
				return nil, err
			}
			ds.ComprehendMedicalAsyncJobPropertiesList = 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_StartEntitiesDetectionV2JobOutput(v smithycbor.Value) (*StartEntitiesDetectionV2JobOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &StartEntitiesDetectionV2JobOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "JobId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.JobId = ptr.String(dv)
		}
	}
	return ds, nil
}

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

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

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

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

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

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

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

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

func deserializeCBOR_StopSNOMEDCTInferenceJobOutput(v smithycbor.Value) (*StopSNOMEDCTInferenceJobOutput, error) {
	av, ok := v.(smithycbor.Map)
	if !ok {
		return nil, fmt.Errorf("unexpected value type %T", v)
	}
	ds := &StopSNOMEDCTInferenceJobOutput{}
	for key, sv := range av {
		_, _ = key, sv
		if key == "JobId" {
			if _, ok := sv.(*smithycbor.Nil); ok {
				continue
			}
			dv, err := deserializeCBOR_String(sv)
			if err != nil {
				return nil, err
			}
			ds.JobId = ptr.String(dv)
		}
	}
	return ds, nil
}
func rpc2_deserializeOpErrorDescribeEntitiesDetectionV2Job(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeICD10CMInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribePHIDetectionJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeRxNormInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDescribeSNOMEDCTInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDetectEntities(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidEncodingException":
		verr, err := deserializeCBOR_InvalidEncodingException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidEncodingException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ServiceUnavailableException":
		verr, err := deserializeCBOR_ServiceUnavailableException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ServiceUnavailableException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TextSizeLimitExceededException":
		verr, err := deserializeCBOR_TextSizeLimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TextSizeLimitExceededException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDetectEntitiesV2(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidEncodingException":
		verr, err := deserializeCBOR_InvalidEncodingException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidEncodingException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ServiceUnavailableException":
		verr, err := deserializeCBOR_ServiceUnavailableException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ServiceUnavailableException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TextSizeLimitExceededException":
		verr, err := deserializeCBOR_TextSizeLimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TextSizeLimitExceededException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorDetectPHI(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidEncodingException":
		verr, err := deserializeCBOR_InvalidEncodingException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidEncodingException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ServiceUnavailableException":
		verr, err := deserializeCBOR_ServiceUnavailableException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ServiceUnavailableException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TextSizeLimitExceededException":
		verr, err := deserializeCBOR_TextSizeLimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TextSizeLimitExceededException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorInferICD10CM(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidEncodingException":
		verr, err := deserializeCBOR_InvalidEncodingException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidEncodingException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ServiceUnavailableException":
		verr, err := deserializeCBOR_ServiceUnavailableException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ServiceUnavailableException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TextSizeLimitExceededException":
		verr, err := deserializeCBOR_TextSizeLimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TextSizeLimitExceededException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorInferRxNorm(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidEncodingException":
		verr, err := deserializeCBOR_InvalidEncodingException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidEncodingException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ServiceUnavailableException":
		verr, err := deserializeCBOR_ServiceUnavailableException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ServiceUnavailableException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TextSizeLimitExceededException":
		verr, err := deserializeCBOR_TextSizeLimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TextSizeLimitExceededException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorInferSNOMEDCT(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidEncodingException":
		verr, err := deserializeCBOR_InvalidEncodingException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidEncodingException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ServiceUnavailableException":
		verr, err := deserializeCBOR_ServiceUnavailableException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ServiceUnavailableException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TextSizeLimitExceededException":
		verr, err := deserializeCBOR_TextSizeLimitExceededException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TextSizeLimitExceededException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListEntitiesDetectionV2Jobs(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ValidationException":
		verr, err := deserializeCBOR_ValidationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ValidationException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListICD10CMInferenceJobs(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ValidationException":
		verr, err := deserializeCBOR_ValidationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ValidationException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListPHIDetectionJobs(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ValidationException":
		verr, err := deserializeCBOR_ValidationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ValidationException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListRxNormInferenceJobs(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ValidationException":
		verr, err := deserializeCBOR_ValidationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ValidationException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorListSNOMEDCTInferenceJobs(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ValidationException":
		verr, err := deserializeCBOR_ValidationException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ValidationException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStartEntitiesDetectionV2Job(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStartICD10CMInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStartPHIDetectionJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStartRxNormInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStartSNOMEDCTInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStopEntitiesDetectionV2Job(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStopICD10CMInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStopPHIDetectionJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStopRxNormInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		return &smithy.GenericAPIError{Code: typ, Message: msg}
	}
}

func rpc2_deserializeOpErrorStopSNOMEDCTInferenceJob(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 "InternalServerException":
		verr, err := deserializeCBOR_InternalServerException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InternalServerException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "InvalidRequestException":
		verr, err := deserializeCBOR_InvalidRequestException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#InvalidRequestException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "ResourceNotFoundException":
		verr, err := deserializeCBOR_ResourceNotFoundException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#ResourceNotFoundException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	case "TooManyRequestsException":
		verr, err := deserializeCBOR_TooManyRequestsException(v)
		if err != nil {
			return &smithy.DeserializationError{
				Err:      fmt.Errorf("deserialize com.amazonaws.comprehendmedical#TooManyRequestsException: %w", err),
				Snapshot: payload,
			}
		}

		return verr
	default:

		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]
}
