1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package comprehendmedical
4
5import (
6	"bytes"
7	"context"
8	"encoding/json"
9	"fmt"
10	"github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
11	"github.com/aws/aws-sdk-go-v2/service/comprehendmedical/types"
12	smithy "github.com/aws/smithy-go"
13	smithyio "github.com/aws/smithy-go/io"
14	"github.com/aws/smithy-go/middleware"
15	"github.com/aws/smithy-go/ptr"
16	smithytime "github.com/aws/smithy-go/time"
17	smithyhttp "github.com/aws/smithy-go/transport/http"
18	"io"
19	"strings"
20)
21
22type awsAwsjson11_deserializeOpDescribeEntitiesDetectionV2Job struct {
23}
24
25func (*awsAwsjson11_deserializeOpDescribeEntitiesDetectionV2Job) ID() string {
26	return "OperationDeserializer"
27}
28
29func (m *awsAwsjson11_deserializeOpDescribeEntitiesDetectionV2Job) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
30	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
31) {
32	out, metadata, err = next.HandleDeserialize(ctx, in)
33	if err != nil {
34		return out, metadata, err
35	}
36
37	response, ok := out.RawResponse.(*smithyhttp.Response)
38	if !ok {
39		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
40	}
41
42	if response.StatusCode < 200 || response.StatusCode >= 300 {
43		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEntitiesDetectionV2Job(response, &metadata)
44	}
45	output := &DescribeEntitiesDetectionV2JobOutput{}
46	out.Result = output
47
48	var buff [1024]byte
49	ringBuffer := smithyio.NewRingBuffer(buff[:])
50
51	body := io.TeeReader(response.Body, ringBuffer)
52	decoder := json.NewDecoder(body)
53	decoder.UseNumber()
54	var shape interface{}
55	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
56		var snapshot bytes.Buffer
57		io.Copy(&snapshot, ringBuffer)
58		err = &smithy.DeserializationError{
59			Err:      fmt.Errorf("failed to decode response body, %w", err),
60			Snapshot: snapshot.Bytes(),
61		}
62		return out, metadata, err
63	}
64
65	err = awsAwsjson11_deserializeOpDocumentDescribeEntitiesDetectionV2JobOutput(&output, shape)
66	if err != nil {
67		var snapshot bytes.Buffer
68		io.Copy(&snapshot, ringBuffer)
69		err = &smithy.DeserializationError{
70			Err:      fmt.Errorf("failed to decode response body, %w", err),
71			Snapshot: snapshot.Bytes(),
72		}
73		return out, metadata, err
74	}
75
76	return out, metadata, err
77}
78
79func awsAwsjson11_deserializeOpErrorDescribeEntitiesDetectionV2Job(response *smithyhttp.Response, metadata *middleware.Metadata) error {
80	var errorBuffer bytes.Buffer
81	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
82		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
83	}
84	errorBody := bytes.NewReader(errorBuffer.Bytes())
85
86	errorCode := "UnknownError"
87	errorMessage := errorCode
88
89	code := response.Header.Get("X-Amzn-ErrorType")
90	if len(code) != 0 {
91		errorCode = restjson.SanitizeErrorCode(code)
92	}
93
94	var buff [1024]byte
95	ringBuffer := smithyio.NewRingBuffer(buff[:])
96
97	body := io.TeeReader(errorBody, ringBuffer)
98	decoder := json.NewDecoder(body)
99	decoder.UseNumber()
100	code, message, err := restjson.GetErrorInfo(decoder)
101	if err != nil {
102		var snapshot bytes.Buffer
103		io.Copy(&snapshot, ringBuffer)
104		err = &smithy.DeserializationError{
105			Err:      fmt.Errorf("failed to decode response body, %w", err),
106			Snapshot: snapshot.Bytes(),
107		}
108		return err
109	}
110
111	errorBody.Seek(0, io.SeekStart)
112	if len(code) != 0 {
113		errorCode = restjson.SanitizeErrorCode(code)
114	}
115	if len(message) != 0 {
116		errorMessage = message
117	}
118
119	switch {
120	case strings.EqualFold("InternalServerException", errorCode):
121		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
122
123	case strings.EqualFold("InvalidRequestException", errorCode):
124		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
125
126	case strings.EqualFold("ResourceNotFoundException", errorCode):
127		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
128
129	case strings.EqualFold("TooManyRequestsException", errorCode):
130		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
131
132	default:
133		genericError := &smithy.GenericAPIError{
134			Code:    errorCode,
135			Message: errorMessage,
136		}
137		return genericError
138
139	}
140}
141
142type awsAwsjson11_deserializeOpDescribeICD10CMInferenceJob struct {
143}
144
145func (*awsAwsjson11_deserializeOpDescribeICD10CMInferenceJob) ID() string {
146	return "OperationDeserializer"
147}
148
149func (m *awsAwsjson11_deserializeOpDescribeICD10CMInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
150	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
151) {
152	out, metadata, err = next.HandleDeserialize(ctx, in)
153	if err != nil {
154		return out, metadata, err
155	}
156
157	response, ok := out.RawResponse.(*smithyhttp.Response)
158	if !ok {
159		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
160	}
161
162	if response.StatusCode < 200 || response.StatusCode >= 300 {
163		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeICD10CMInferenceJob(response, &metadata)
164	}
165	output := &DescribeICD10CMInferenceJobOutput{}
166	out.Result = output
167
168	var buff [1024]byte
169	ringBuffer := smithyio.NewRingBuffer(buff[:])
170
171	body := io.TeeReader(response.Body, ringBuffer)
172	decoder := json.NewDecoder(body)
173	decoder.UseNumber()
174	var shape interface{}
175	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
176		var snapshot bytes.Buffer
177		io.Copy(&snapshot, ringBuffer)
178		err = &smithy.DeserializationError{
179			Err:      fmt.Errorf("failed to decode response body, %w", err),
180			Snapshot: snapshot.Bytes(),
181		}
182		return out, metadata, err
183	}
184
185	err = awsAwsjson11_deserializeOpDocumentDescribeICD10CMInferenceJobOutput(&output, shape)
186	if err != nil {
187		var snapshot bytes.Buffer
188		io.Copy(&snapshot, ringBuffer)
189		err = &smithy.DeserializationError{
190			Err:      fmt.Errorf("failed to decode response body, %w", err),
191			Snapshot: snapshot.Bytes(),
192		}
193		return out, metadata, err
194	}
195
196	return out, metadata, err
197}
198
199func awsAwsjson11_deserializeOpErrorDescribeICD10CMInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
200	var errorBuffer bytes.Buffer
201	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
202		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
203	}
204	errorBody := bytes.NewReader(errorBuffer.Bytes())
205
206	errorCode := "UnknownError"
207	errorMessage := errorCode
208
209	code := response.Header.Get("X-Amzn-ErrorType")
210	if len(code) != 0 {
211		errorCode = restjson.SanitizeErrorCode(code)
212	}
213
214	var buff [1024]byte
215	ringBuffer := smithyio.NewRingBuffer(buff[:])
216
217	body := io.TeeReader(errorBody, ringBuffer)
218	decoder := json.NewDecoder(body)
219	decoder.UseNumber()
220	code, message, err := restjson.GetErrorInfo(decoder)
221	if err != nil {
222		var snapshot bytes.Buffer
223		io.Copy(&snapshot, ringBuffer)
224		err = &smithy.DeserializationError{
225			Err:      fmt.Errorf("failed to decode response body, %w", err),
226			Snapshot: snapshot.Bytes(),
227		}
228		return err
229	}
230
231	errorBody.Seek(0, io.SeekStart)
232	if len(code) != 0 {
233		errorCode = restjson.SanitizeErrorCode(code)
234	}
235	if len(message) != 0 {
236		errorMessage = message
237	}
238
239	switch {
240	case strings.EqualFold("InternalServerException", errorCode):
241		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
242
243	case strings.EqualFold("InvalidRequestException", errorCode):
244		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
245
246	case strings.EqualFold("ResourceNotFoundException", errorCode):
247		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
248
249	case strings.EqualFold("TooManyRequestsException", errorCode):
250		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
251
252	default:
253		genericError := &smithy.GenericAPIError{
254			Code:    errorCode,
255			Message: errorMessage,
256		}
257		return genericError
258
259	}
260}
261
262type awsAwsjson11_deserializeOpDescribePHIDetectionJob struct {
263}
264
265func (*awsAwsjson11_deserializeOpDescribePHIDetectionJob) ID() string {
266	return "OperationDeserializer"
267}
268
269func (m *awsAwsjson11_deserializeOpDescribePHIDetectionJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
270	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
271) {
272	out, metadata, err = next.HandleDeserialize(ctx, in)
273	if err != nil {
274		return out, metadata, err
275	}
276
277	response, ok := out.RawResponse.(*smithyhttp.Response)
278	if !ok {
279		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
280	}
281
282	if response.StatusCode < 200 || response.StatusCode >= 300 {
283		return out, metadata, awsAwsjson11_deserializeOpErrorDescribePHIDetectionJob(response, &metadata)
284	}
285	output := &DescribePHIDetectionJobOutput{}
286	out.Result = output
287
288	var buff [1024]byte
289	ringBuffer := smithyio.NewRingBuffer(buff[:])
290
291	body := io.TeeReader(response.Body, ringBuffer)
292	decoder := json.NewDecoder(body)
293	decoder.UseNumber()
294	var shape interface{}
295	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
296		var snapshot bytes.Buffer
297		io.Copy(&snapshot, ringBuffer)
298		err = &smithy.DeserializationError{
299			Err:      fmt.Errorf("failed to decode response body, %w", err),
300			Snapshot: snapshot.Bytes(),
301		}
302		return out, metadata, err
303	}
304
305	err = awsAwsjson11_deserializeOpDocumentDescribePHIDetectionJobOutput(&output, shape)
306	if err != nil {
307		var snapshot bytes.Buffer
308		io.Copy(&snapshot, ringBuffer)
309		err = &smithy.DeserializationError{
310			Err:      fmt.Errorf("failed to decode response body, %w", err),
311			Snapshot: snapshot.Bytes(),
312		}
313		return out, metadata, err
314	}
315
316	return out, metadata, err
317}
318
319func awsAwsjson11_deserializeOpErrorDescribePHIDetectionJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
320	var errorBuffer bytes.Buffer
321	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
322		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
323	}
324	errorBody := bytes.NewReader(errorBuffer.Bytes())
325
326	errorCode := "UnknownError"
327	errorMessage := errorCode
328
329	code := response.Header.Get("X-Amzn-ErrorType")
330	if len(code) != 0 {
331		errorCode = restjson.SanitizeErrorCode(code)
332	}
333
334	var buff [1024]byte
335	ringBuffer := smithyio.NewRingBuffer(buff[:])
336
337	body := io.TeeReader(errorBody, ringBuffer)
338	decoder := json.NewDecoder(body)
339	decoder.UseNumber()
340	code, message, err := restjson.GetErrorInfo(decoder)
341	if err != nil {
342		var snapshot bytes.Buffer
343		io.Copy(&snapshot, ringBuffer)
344		err = &smithy.DeserializationError{
345			Err:      fmt.Errorf("failed to decode response body, %w", err),
346			Snapshot: snapshot.Bytes(),
347		}
348		return err
349	}
350
351	errorBody.Seek(0, io.SeekStart)
352	if len(code) != 0 {
353		errorCode = restjson.SanitizeErrorCode(code)
354	}
355	if len(message) != 0 {
356		errorMessage = message
357	}
358
359	switch {
360	case strings.EqualFold("InternalServerException", errorCode):
361		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
362
363	case strings.EqualFold("InvalidRequestException", errorCode):
364		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
365
366	case strings.EqualFold("ResourceNotFoundException", errorCode):
367		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
368
369	case strings.EqualFold("TooManyRequestsException", errorCode):
370		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
371
372	default:
373		genericError := &smithy.GenericAPIError{
374			Code:    errorCode,
375			Message: errorMessage,
376		}
377		return genericError
378
379	}
380}
381
382type awsAwsjson11_deserializeOpDescribeRxNormInferenceJob struct {
383}
384
385func (*awsAwsjson11_deserializeOpDescribeRxNormInferenceJob) ID() string {
386	return "OperationDeserializer"
387}
388
389func (m *awsAwsjson11_deserializeOpDescribeRxNormInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
390	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
391) {
392	out, metadata, err = next.HandleDeserialize(ctx, in)
393	if err != nil {
394		return out, metadata, err
395	}
396
397	response, ok := out.RawResponse.(*smithyhttp.Response)
398	if !ok {
399		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
400	}
401
402	if response.StatusCode < 200 || response.StatusCode >= 300 {
403		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRxNormInferenceJob(response, &metadata)
404	}
405	output := &DescribeRxNormInferenceJobOutput{}
406	out.Result = output
407
408	var buff [1024]byte
409	ringBuffer := smithyio.NewRingBuffer(buff[:])
410
411	body := io.TeeReader(response.Body, ringBuffer)
412	decoder := json.NewDecoder(body)
413	decoder.UseNumber()
414	var shape interface{}
415	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
416		var snapshot bytes.Buffer
417		io.Copy(&snapshot, ringBuffer)
418		err = &smithy.DeserializationError{
419			Err:      fmt.Errorf("failed to decode response body, %w", err),
420			Snapshot: snapshot.Bytes(),
421		}
422		return out, metadata, err
423	}
424
425	err = awsAwsjson11_deserializeOpDocumentDescribeRxNormInferenceJobOutput(&output, shape)
426	if err != nil {
427		var snapshot bytes.Buffer
428		io.Copy(&snapshot, ringBuffer)
429		err = &smithy.DeserializationError{
430			Err:      fmt.Errorf("failed to decode response body, %w", err),
431			Snapshot: snapshot.Bytes(),
432		}
433		return out, metadata, err
434	}
435
436	return out, metadata, err
437}
438
439func awsAwsjson11_deserializeOpErrorDescribeRxNormInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
440	var errorBuffer bytes.Buffer
441	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
442		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
443	}
444	errorBody := bytes.NewReader(errorBuffer.Bytes())
445
446	errorCode := "UnknownError"
447	errorMessage := errorCode
448
449	code := response.Header.Get("X-Amzn-ErrorType")
450	if len(code) != 0 {
451		errorCode = restjson.SanitizeErrorCode(code)
452	}
453
454	var buff [1024]byte
455	ringBuffer := smithyio.NewRingBuffer(buff[:])
456
457	body := io.TeeReader(errorBody, ringBuffer)
458	decoder := json.NewDecoder(body)
459	decoder.UseNumber()
460	code, message, err := restjson.GetErrorInfo(decoder)
461	if err != nil {
462		var snapshot bytes.Buffer
463		io.Copy(&snapshot, ringBuffer)
464		err = &smithy.DeserializationError{
465			Err:      fmt.Errorf("failed to decode response body, %w", err),
466			Snapshot: snapshot.Bytes(),
467		}
468		return err
469	}
470
471	errorBody.Seek(0, io.SeekStart)
472	if len(code) != 0 {
473		errorCode = restjson.SanitizeErrorCode(code)
474	}
475	if len(message) != 0 {
476		errorMessage = message
477	}
478
479	switch {
480	case strings.EqualFold("InternalServerException", errorCode):
481		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
482
483	case strings.EqualFold("InvalidRequestException", errorCode):
484		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
485
486	case strings.EqualFold("ResourceNotFoundException", errorCode):
487		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
488
489	case strings.EqualFold("TooManyRequestsException", errorCode):
490		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
491
492	default:
493		genericError := &smithy.GenericAPIError{
494			Code:    errorCode,
495			Message: errorMessage,
496		}
497		return genericError
498
499	}
500}
501
502type awsAwsjson11_deserializeOpDetectEntities struct {
503}
504
505func (*awsAwsjson11_deserializeOpDetectEntities) ID() string {
506	return "OperationDeserializer"
507}
508
509func (m *awsAwsjson11_deserializeOpDetectEntities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
510	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
511) {
512	out, metadata, err = next.HandleDeserialize(ctx, in)
513	if err != nil {
514		return out, metadata, err
515	}
516
517	response, ok := out.RawResponse.(*smithyhttp.Response)
518	if !ok {
519		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
520	}
521
522	if response.StatusCode < 200 || response.StatusCode >= 300 {
523		return out, metadata, awsAwsjson11_deserializeOpErrorDetectEntities(response, &metadata)
524	}
525	output := &DetectEntitiesOutput{}
526	out.Result = output
527
528	var buff [1024]byte
529	ringBuffer := smithyio.NewRingBuffer(buff[:])
530
531	body := io.TeeReader(response.Body, ringBuffer)
532	decoder := json.NewDecoder(body)
533	decoder.UseNumber()
534	var shape interface{}
535	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
536		var snapshot bytes.Buffer
537		io.Copy(&snapshot, ringBuffer)
538		err = &smithy.DeserializationError{
539			Err:      fmt.Errorf("failed to decode response body, %w", err),
540			Snapshot: snapshot.Bytes(),
541		}
542		return out, metadata, err
543	}
544
545	err = awsAwsjson11_deserializeOpDocumentDetectEntitiesOutput(&output, shape)
546	if err != nil {
547		var snapshot bytes.Buffer
548		io.Copy(&snapshot, ringBuffer)
549		err = &smithy.DeserializationError{
550			Err:      fmt.Errorf("failed to decode response body, %w", err),
551			Snapshot: snapshot.Bytes(),
552		}
553		return out, metadata, err
554	}
555
556	return out, metadata, err
557}
558
559func awsAwsjson11_deserializeOpErrorDetectEntities(response *smithyhttp.Response, metadata *middleware.Metadata) error {
560	var errorBuffer bytes.Buffer
561	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
562		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
563	}
564	errorBody := bytes.NewReader(errorBuffer.Bytes())
565
566	errorCode := "UnknownError"
567	errorMessage := errorCode
568
569	code := response.Header.Get("X-Amzn-ErrorType")
570	if len(code) != 0 {
571		errorCode = restjson.SanitizeErrorCode(code)
572	}
573
574	var buff [1024]byte
575	ringBuffer := smithyio.NewRingBuffer(buff[:])
576
577	body := io.TeeReader(errorBody, ringBuffer)
578	decoder := json.NewDecoder(body)
579	decoder.UseNumber()
580	code, message, err := restjson.GetErrorInfo(decoder)
581	if err != nil {
582		var snapshot bytes.Buffer
583		io.Copy(&snapshot, ringBuffer)
584		err = &smithy.DeserializationError{
585			Err:      fmt.Errorf("failed to decode response body, %w", err),
586			Snapshot: snapshot.Bytes(),
587		}
588		return err
589	}
590
591	errorBody.Seek(0, io.SeekStart)
592	if len(code) != 0 {
593		errorCode = restjson.SanitizeErrorCode(code)
594	}
595	if len(message) != 0 {
596		errorMessage = message
597	}
598
599	switch {
600	case strings.EqualFold("InternalServerException", errorCode):
601		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
602
603	case strings.EqualFold("InvalidEncodingException", errorCode):
604		return awsAwsjson11_deserializeErrorInvalidEncodingException(response, errorBody)
605
606	case strings.EqualFold("InvalidRequestException", errorCode):
607		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
608
609	case strings.EqualFold("ServiceUnavailableException", errorCode):
610		return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody)
611
612	case strings.EqualFold("TextSizeLimitExceededException", errorCode):
613		return awsAwsjson11_deserializeErrorTextSizeLimitExceededException(response, errorBody)
614
615	case strings.EqualFold("TooManyRequestsException", errorCode):
616		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
617
618	default:
619		genericError := &smithy.GenericAPIError{
620			Code:    errorCode,
621			Message: errorMessage,
622		}
623		return genericError
624
625	}
626}
627
628type awsAwsjson11_deserializeOpDetectEntitiesV2 struct {
629}
630
631func (*awsAwsjson11_deserializeOpDetectEntitiesV2) ID() string {
632	return "OperationDeserializer"
633}
634
635func (m *awsAwsjson11_deserializeOpDetectEntitiesV2) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
636	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
637) {
638	out, metadata, err = next.HandleDeserialize(ctx, in)
639	if err != nil {
640		return out, metadata, err
641	}
642
643	response, ok := out.RawResponse.(*smithyhttp.Response)
644	if !ok {
645		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
646	}
647
648	if response.StatusCode < 200 || response.StatusCode >= 300 {
649		return out, metadata, awsAwsjson11_deserializeOpErrorDetectEntitiesV2(response, &metadata)
650	}
651	output := &DetectEntitiesV2Output{}
652	out.Result = output
653
654	var buff [1024]byte
655	ringBuffer := smithyio.NewRingBuffer(buff[:])
656
657	body := io.TeeReader(response.Body, ringBuffer)
658	decoder := json.NewDecoder(body)
659	decoder.UseNumber()
660	var shape interface{}
661	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
662		var snapshot bytes.Buffer
663		io.Copy(&snapshot, ringBuffer)
664		err = &smithy.DeserializationError{
665			Err:      fmt.Errorf("failed to decode response body, %w", err),
666			Snapshot: snapshot.Bytes(),
667		}
668		return out, metadata, err
669	}
670
671	err = awsAwsjson11_deserializeOpDocumentDetectEntitiesV2Output(&output, shape)
672	if err != nil {
673		var snapshot bytes.Buffer
674		io.Copy(&snapshot, ringBuffer)
675		err = &smithy.DeserializationError{
676			Err:      fmt.Errorf("failed to decode response body, %w", err),
677			Snapshot: snapshot.Bytes(),
678		}
679		return out, metadata, err
680	}
681
682	return out, metadata, err
683}
684
685func awsAwsjson11_deserializeOpErrorDetectEntitiesV2(response *smithyhttp.Response, metadata *middleware.Metadata) error {
686	var errorBuffer bytes.Buffer
687	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
688		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
689	}
690	errorBody := bytes.NewReader(errorBuffer.Bytes())
691
692	errorCode := "UnknownError"
693	errorMessage := errorCode
694
695	code := response.Header.Get("X-Amzn-ErrorType")
696	if len(code) != 0 {
697		errorCode = restjson.SanitizeErrorCode(code)
698	}
699
700	var buff [1024]byte
701	ringBuffer := smithyio.NewRingBuffer(buff[:])
702
703	body := io.TeeReader(errorBody, ringBuffer)
704	decoder := json.NewDecoder(body)
705	decoder.UseNumber()
706	code, message, err := restjson.GetErrorInfo(decoder)
707	if err != nil {
708		var snapshot bytes.Buffer
709		io.Copy(&snapshot, ringBuffer)
710		err = &smithy.DeserializationError{
711			Err:      fmt.Errorf("failed to decode response body, %w", err),
712			Snapshot: snapshot.Bytes(),
713		}
714		return err
715	}
716
717	errorBody.Seek(0, io.SeekStart)
718	if len(code) != 0 {
719		errorCode = restjson.SanitizeErrorCode(code)
720	}
721	if len(message) != 0 {
722		errorMessage = message
723	}
724
725	switch {
726	case strings.EqualFold("InternalServerException", errorCode):
727		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
728
729	case strings.EqualFold("InvalidEncodingException", errorCode):
730		return awsAwsjson11_deserializeErrorInvalidEncodingException(response, errorBody)
731
732	case strings.EqualFold("InvalidRequestException", errorCode):
733		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
734
735	case strings.EqualFold("ServiceUnavailableException", errorCode):
736		return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody)
737
738	case strings.EqualFold("TextSizeLimitExceededException", errorCode):
739		return awsAwsjson11_deserializeErrorTextSizeLimitExceededException(response, errorBody)
740
741	case strings.EqualFold("TooManyRequestsException", errorCode):
742		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
743
744	default:
745		genericError := &smithy.GenericAPIError{
746			Code:    errorCode,
747			Message: errorMessage,
748		}
749		return genericError
750
751	}
752}
753
754type awsAwsjson11_deserializeOpDetectPHI struct {
755}
756
757func (*awsAwsjson11_deserializeOpDetectPHI) ID() string {
758	return "OperationDeserializer"
759}
760
761func (m *awsAwsjson11_deserializeOpDetectPHI) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
762	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
763) {
764	out, metadata, err = next.HandleDeserialize(ctx, in)
765	if err != nil {
766		return out, metadata, err
767	}
768
769	response, ok := out.RawResponse.(*smithyhttp.Response)
770	if !ok {
771		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
772	}
773
774	if response.StatusCode < 200 || response.StatusCode >= 300 {
775		return out, metadata, awsAwsjson11_deserializeOpErrorDetectPHI(response, &metadata)
776	}
777	output := &DetectPHIOutput{}
778	out.Result = output
779
780	var buff [1024]byte
781	ringBuffer := smithyio.NewRingBuffer(buff[:])
782
783	body := io.TeeReader(response.Body, ringBuffer)
784	decoder := json.NewDecoder(body)
785	decoder.UseNumber()
786	var shape interface{}
787	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
788		var snapshot bytes.Buffer
789		io.Copy(&snapshot, ringBuffer)
790		err = &smithy.DeserializationError{
791			Err:      fmt.Errorf("failed to decode response body, %w", err),
792			Snapshot: snapshot.Bytes(),
793		}
794		return out, metadata, err
795	}
796
797	err = awsAwsjson11_deserializeOpDocumentDetectPHIOutput(&output, shape)
798	if err != nil {
799		var snapshot bytes.Buffer
800		io.Copy(&snapshot, ringBuffer)
801		err = &smithy.DeserializationError{
802			Err:      fmt.Errorf("failed to decode response body, %w", err),
803			Snapshot: snapshot.Bytes(),
804		}
805		return out, metadata, err
806	}
807
808	return out, metadata, err
809}
810
811func awsAwsjson11_deserializeOpErrorDetectPHI(response *smithyhttp.Response, metadata *middleware.Metadata) error {
812	var errorBuffer bytes.Buffer
813	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
814		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
815	}
816	errorBody := bytes.NewReader(errorBuffer.Bytes())
817
818	errorCode := "UnknownError"
819	errorMessage := errorCode
820
821	code := response.Header.Get("X-Amzn-ErrorType")
822	if len(code) != 0 {
823		errorCode = restjson.SanitizeErrorCode(code)
824	}
825
826	var buff [1024]byte
827	ringBuffer := smithyio.NewRingBuffer(buff[:])
828
829	body := io.TeeReader(errorBody, ringBuffer)
830	decoder := json.NewDecoder(body)
831	decoder.UseNumber()
832	code, message, err := restjson.GetErrorInfo(decoder)
833	if err != nil {
834		var snapshot bytes.Buffer
835		io.Copy(&snapshot, ringBuffer)
836		err = &smithy.DeserializationError{
837			Err:      fmt.Errorf("failed to decode response body, %w", err),
838			Snapshot: snapshot.Bytes(),
839		}
840		return err
841	}
842
843	errorBody.Seek(0, io.SeekStart)
844	if len(code) != 0 {
845		errorCode = restjson.SanitizeErrorCode(code)
846	}
847	if len(message) != 0 {
848		errorMessage = message
849	}
850
851	switch {
852	case strings.EqualFold("InternalServerException", errorCode):
853		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
854
855	case strings.EqualFold("InvalidEncodingException", errorCode):
856		return awsAwsjson11_deserializeErrorInvalidEncodingException(response, errorBody)
857
858	case strings.EqualFold("InvalidRequestException", errorCode):
859		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
860
861	case strings.EqualFold("ServiceUnavailableException", errorCode):
862		return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody)
863
864	case strings.EqualFold("TextSizeLimitExceededException", errorCode):
865		return awsAwsjson11_deserializeErrorTextSizeLimitExceededException(response, errorBody)
866
867	case strings.EqualFold("TooManyRequestsException", errorCode):
868		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
869
870	default:
871		genericError := &smithy.GenericAPIError{
872			Code:    errorCode,
873			Message: errorMessage,
874		}
875		return genericError
876
877	}
878}
879
880type awsAwsjson11_deserializeOpInferICD10CM struct {
881}
882
883func (*awsAwsjson11_deserializeOpInferICD10CM) ID() string {
884	return "OperationDeserializer"
885}
886
887func (m *awsAwsjson11_deserializeOpInferICD10CM) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
888	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
889) {
890	out, metadata, err = next.HandleDeserialize(ctx, in)
891	if err != nil {
892		return out, metadata, err
893	}
894
895	response, ok := out.RawResponse.(*smithyhttp.Response)
896	if !ok {
897		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
898	}
899
900	if response.StatusCode < 200 || response.StatusCode >= 300 {
901		return out, metadata, awsAwsjson11_deserializeOpErrorInferICD10CM(response, &metadata)
902	}
903	output := &InferICD10CMOutput{}
904	out.Result = output
905
906	var buff [1024]byte
907	ringBuffer := smithyio.NewRingBuffer(buff[:])
908
909	body := io.TeeReader(response.Body, ringBuffer)
910	decoder := json.NewDecoder(body)
911	decoder.UseNumber()
912	var shape interface{}
913	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
914		var snapshot bytes.Buffer
915		io.Copy(&snapshot, ringBuffer)
916		err = &smithy.DeserializationError{
917			Err:      fmt.Errorf("failed to decode response body, %w", err),
918			Snapshot: snapshot.Bytes(),
919		}
920		return out, metadata, err
921	}
922
923	err = awsAwsjson11_deserializeOpDocumentInferICD10CMOutput(&output, shape)
924	if err != nil {
925		var snapshot bytes.Buffer
926		io.Copy(&snapshot, ringBuffer)
927		err = &smithy.DeserializationError{
928			Err:      fmt.Errorf("failed to decode response body, %w", err),
929			Snapshot: snapshot.Bytes(),
930		}
931		return out, metadata, err
932	}
933
934	return out, metadata, err
935}
936
937func awsAwsjson11_deserializeOpErrorInferICD10CM(response *smithyhttp.Response, metadata *middleware.Metadata) error {
938	var errorBuffer bytes.Buffer
939	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
940		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
941	}
942	errorBody := bytes.NewReader(errorBuffer.Bytes())
943
944	errorCode := "UnknownError"
945	errorMessage := errorCode
946
947	code := response.Header.Get("X-Amzn-ErrorType")
948	if len(code) != 0 {
949		errorCode = restjson.SanitizeErrorCode(code)
950	}
951
952	var buff [1024]byte
953	ringBuffer := smithyio.NewRingBuffer(buff[:])
954
955	body := io.TeeReader(errorBody, ringBuffer)
956	decoder := json.NewDecoder(body)
957	decoder.UseNumber()
958	code, message, err := restjson.GetErrorInfo(decoder)
959	if err != nil {
960		var snapshot bytes.Buffer
961		io.Copy(&snapshot, ringBuffer)
962		err = &smithy.DeserializationError{
963			Err:      fmt.Errorf("failed to decode response body, %w", err),
964			Snapshot: snapshot.Bytes(),
965		}
966		return err
967	}
968
969	errorBody.Seek(0, io.SeekStart)
970	if len(code) != 0 {
971		errorCode = restjson.SanitizeErrorCode(code)
972	}
973	if len(message) != 0 {
974		errorMessage = message
975	}
976
977	switch {
978	case strings.EqualFold("InternalServerException", errorCode):
979		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
980
981	case strings.EqualFold("InvalidEncodingException", errorCode):
982		return awsAwsjson11_deserializeErrorInvalidEncodingException(response, errorBody)
983
984	case strings.EqualFold("InvalidRequestException", errorCode):
985		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
986
987	case strings.EqualFold("ServiceUnavailableException", errorCode):
988		return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody)
989
990	case strings.EqualFold("TextSizeLimitExceededException", errorCode):
991		return awsAwsjson11_deserializeErrorTextSizeLimitExceededException(response, errorBody)
992
993	case strings.EqualFold("TooManyRequestsException", errorCode):
994		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
995
996	default:
997		genericError := &smithy.GenericAPIError{
998			Code:    errorCode,
999			Message: errorMessage,
1000		}
1001		return genericError
1002
1003	}
1004}
1005
1006type awsAwsjson11_deserializeOpInferRxNorm struct {
1007}
1008
1009func (*awsAwsjson11_deserializeOpInferRxNorm) ID() string {
1010	return "OperationDeserializer"
1011}
1012
1013func (m *awsAwsjson11_deserializeOpInferRxNorm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1014	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1015) {
1016	out, metadata, err = next.HandleDeserialize(ctx, in)
1017	if err != nil {
1018		return out, metadata, err
1019	}
1020
1021	response, ok := out.RawResponse.(*smithyhttp.Response)
1022	if !ok {
1023		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1024	}
1025
1026	if response.StatusCode < 200 || response.StatusCode >= 300 {
1027		return out, metadata, awsAwsjson11_deserializeOpErrorInferRxNorm(response, &metadata)
1028	}
1029	output := &InferRxNormOutput{}
1030	out.Result = output
1031
1032	var buff [1024]byte
1033	ringBuffer := smithyio.NewRingBuffer(buff[:])
1034
1035	body := io.TeeReader(response.Body, ringBuffer)
1036	decoder := json.NewDecoder(body)
1037	decoder.UseNumber()
1038	var shape interface{}
1039	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1040		var snapshot bytes.Buffer
1041		io.Copy(&snapshot, ringBuffer)
1042		err = &smithy.DeserializationError{
1043			Err:      fmt.Errorf("failed to decode response body, %w", err),
1044			Snapshot: snapshot.Bytes(),
1045		}
1046		return out, metadata, err
1047	}
1048
1049	err = awsAwsjson11_deserializeOpDocumentInferRxNormOutput(&output, shape)
1050	if err != nil {
1051		var snapshot bytes.Buffer
1052		io.Copy(&snapshot, ringBuffer)
1053		err = &smithy.DeserializationError{
1054			Err:      fmt.Errorf("failed to decode response body, %w", err),
1055			Snapshot: snapshot.Bytes(),
1056		}
1057		return out, metadata, err
1058	}
1059
1060	return out, metadata, err
1061}
1062
1063func awsAwsjson11_deserializeOpErrorInferRxNorm(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1064	var errorBuffer bytes.Buffer
1065	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1066		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1067	}
1068	errorBody := bytes.NewReader(errorBuffer.Bytes())
1069
1070	errorCode := "UnknownError"
1071	errorMessage := errorCode
1072
1073	code := response.Header.Get("X-Amzn-ErrorType")
1074	if len(code) != 0 {
1075		errorCode = restjson.SanitizeErrorCode(code)
1076	}
1077
1078	var buff [1024]byte
1079	ringBuffer := smithyio.NewRingBuffer(buff[:])
1080
1081	body := io.TeeReader(errorBody, ringBuffer)
1082	decoder := json.NewDecoder(body)
1083	decoder.UseNumber()
1084	code, message, err := restjson.GetErrorInfo(decoder)
1085	if err != nil {
1086		var snapshot bytes.Buffer
1087		io.Copy(&snapshot, ringBuffer)
1088		err = &smithy.DeserializationError{
1089			Err:      fmt.Errorf("failed to decode response body, %w", err),
1090			Snapshot: snapshot.Bytes(),
1091		}
1092		return err
1093	}
1094
1095	errorBody.Seek(0, io.SeekStart)
1096	if len(code) != 0 {
1097		errorCode = restjson.SanitizeErrorCode(code)
1098	}
1099	if len(message) != 0 {
1100		errorMessage = message
1101	}
1102
1103	switch {
1104	case strings.EqualFold("InternalServerException", errorCode):
1105		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1106
1107	case strings.EqualFold("InvalidEncodingException", errorCode):
1108		return awsAwsjson11_deserializeErrorInvalidEncodingException(response, errorBody)
1109
1110	case strings.EqualFold("InvalidRequestException", errorCode):
1111		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1112
1113	case strings.EqualFold("ServiceUnavailableException", errorCode):
1114		return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody)
1115
1116	case strings.EqualFold("TextSizeLimitExceededException", errorCode):
1117		return awsAwsjson11_deserializeErrorTextSizeLimitExceededException(response, errorBody)
1118
1119	case strings.EqualFold("TooManyRequestsException", errorCode):
1120		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1121
1122	default:
1123		genericError := &smithy.GenericAPIError{
1124			Code:    errorCode,
1125			Message: errorMessage,
1126		}
1127		return genericError
1128
1129	}
1130}
1131
1132type awsAwsjson11_deserializeOpListEntitiesDetectionV2Jobs struct {
1133}
1134
1135func (*awsAwsjson11_deserializeOpListEntitiesDetectionV2Jobs) ID() string {
1136	return "OperationDeserializer"
1137}
1138
1139func (m *awsAwsjson11_deserializeOpListEntitiesDetectionV2Jobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1140	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1141) {
1142	out, metadata, err = next.HandleDeserialize(ctx, in)
1143	if err != nil {
1144		return out, metadata, err
1145	}
1146
1147	response, ok := out.RawResponse.(*smithyhttp.Response)
1148	if !ok {
1149		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1150	}
1151
1152	if response.StatusCode < 200 || response.StatusCode >= 300 {
1153		return out, metadata, awsAwsjson11_deserializeOpErrorListEntitiesDetectionV2Jobs(response, &metadata)
1154	}
1155	output := &ListEntitiesDetectionV2JobsOutput{}
1156	out.Result = output
1157
1158	var buff [1024]byte
1159	ringBuffer := smithyio.NewRingBuffer(buff[:])
1160
1161	body := io.TeeReader(response.Body, ringBuffer)
1162	decoder := json.NewDecoder(body)
1163	decoder.UseNumber()
1164	var shape interface{}
1165	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1166		var snapshot bytes.Buffer
1167		io.Copy(&snapshot, ringBuffer)
1168		err = &smithy.DeserializationError{
1169			Err:      fmt.Errorf("failed to decode response body, %w", err),
1170			Snapshot: snapshot.Bytes(),
1171		}
1172		return out, metadata, err
1173	}
1174
1175	err = awsAwsjson11_deserializeOpDocumentListEntitiesDetectionV2JobsOutput(&output, shape)
1176	if err != nil {
1177		var snapshot bytes.Buffer
1178		io.Copy(&snapshot, ringBuffer)
1179		err = &smithy.DeserializationError{
1180			Err:      fmt.Errorf("failed to decode response body, %w", err),
1181			Snapshot: snapshot.Bytes(),
1182		}
1183		return out, metadata, err
1184	}
1185
1186	return out, metadata, err
1187}
1188
1189func awsAwsjson11_deserializeOpErrorListEntitiesDetectionV2Jobs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1190	var errorBuffer bytes.Buffer
1191	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1192		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1193	}
1194	errorBody := bytes.NewReader(errorBuffer.Bytes())
1195
1196	errorCode := "UnknownError"
1197	errorMessage := errorCode
1198
1199	code := response.Header.Get("X-Amzn-ErrorType")
1200	if len(code) != 0 {
1201		errorCode = restjson.SanitizeErrorCode(code)
1202	}
1203
1204	var buff [1024]byte
1205	ringBuffer := smithyio.NewRingBuffer(buff[:])
1206
1207	body := io.TeeReader(errorBody, ringBuffer)
1208	decoder := json.NewDecoder(body)
1209	decoder.UseNumber()
1210	code, message, err := restjson.GetErrorInfo(decoder)
1211	if err != nil {
1212		var snapshot bytes.Buffer
1213		io.Copy(&snapshot, ringBuffer)
1214		err = &smithy.DeserializationError{
1215			Err:      fmt.Errorf("failed to decode response body, %w", err),
1216			Snapshot: snapshot.Bytes(),
1217		}
1218		return err
1219	}
1220
1221	errorBody.Seek(0, io.SeekStart)
1222	if len(code) != 0 {
1223		errorCode = restjson.SanitizeErrorCode(code)
1224	}
1225	if len(message) != 0 {
1226		errorMessage = message
1227	}
1228
1229	switch {
1230	case strings.EqualFold("InternalServerException", errorCode):
1231		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1232
1233	case strings.EqualFold("InvalidRequestException", errorCode):
1234		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1235
1236	case strings.EqualFold("TooManyRequestsException", errorCode):
1237		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1238
1239	case strings.EqualFold("ValidationException", errorCode):
1240		return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
1241
1242	default:
1243		genericError := &smithy.GenericAPIError{
1244			Code:    errorCode,
1245			Message: errorMessage,
1246		}
1247		return genericError
1248
1249	}
1250}
1251
1252type awsAwsjson11_deserializeOpListICD10CMInferenceJobs struct {
1253}
1254
1255func (*awsAwsjson11_deserializeOpListICD10CMInferenceJobs) ID() string {
1256	return "OperationDeserializer"
1257}
1258
1259func (m *awsAwsjson11_deserializeOpListICD10CMInferenceJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1260	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1261) {
1262	out, metadata, err = next.HandleDeserialize(ctx, in)
1263	if err != nil {
1264		return out, metadata, err
1265	}
1266
1267	response, ok := out.RawResponse.(*smithyhttp.Response)
1268	if !ok {
1269		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1270	}
1271
1272	if response.StatusCode < 200 || response.StatusCode >= 300 {
1273		return out, metadata, awsAwsjson11_deserializeOpErrorListICD10CMInferenceJobs(response, &metadata)
1274	}
1275	output := &ListICD10CMInferenceJobsOutput{}
1276	out.Result = output
1277
1278	var buff [1024]byte
1279	ringBuffer := smithyio.NewRingBuffer(buff[:])
1280
1281	body := io.TeeReader(response.Body, ringBuffer)
1282	decoder := json.NewDecoder(body)
1283	decoder.UseNumber()
1284	var shape interface{}
1285	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1286		var snapshot bytes.Buffer
1287		io.Copy(&snapshot, ringBuffer)
1288		err = &smithy.DeserializationError{
1289			Err:      fmt.Errorf("failed to decode response body, %w", err),
1290			Snapshot: snapshot.Bytes(),
1291		}
1292		return out, metadata, err
1293	}
1294
1295	err = awsAwsjson11_deserializeOpDocumentListICD10CMInferenceJobsOutput(&output, shape)
1296	if err != nil {
1297		var snapshot bytes.Buffer
1298		io.Copy(&snapshot, ringBuffer)
1299		err = &smithy.DeserializationError{
1300			Err:      fmt.Errorf("failed to decode response body, %w", err),
1301			Snapshot: snapshot.Bytes(),
1302		}
1303		return out, metadata, err
1304	}
1305
1306	return out, metadata, err
1307}
1308
1309func awsAwsjson11_deserializeOpErrorListICD10CMInferenceJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1310	var errorBuffer bytes.Buffer
1311	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1312		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1313	}
1314	errorBody := bytes.NewReader(errorBuffer.Bytes())
1315
1316	errorCode := "UnknownError"
1317	errorMessage := errorCode
1318
1319	code := response.Header.Get("X-Amzn-ErrorType")
1320	if len(code) != 0 {
1321		errorCode = restjson.SanitizeErrorCode(code)
1322	}
1323
1324	var buff [1024]byte
1325	ringBuffer := smithyio.NewRingBuffer(buff[:])
1326
1327	body := io.TeeReader(errorBody, ringBuffer)
1328	decoder := json.NewDecoder(body)
1329	decoder.UseNumber()
1330	code, message, err := restjson.GetErrorInfo(decoder)
1331	if err != nil {
1332		var snapshot bytes.Buffer
1333		io.Copy(&snapshot, ringBuffer)
1334		err = &smithy.DeserializationError{
1335			Err:      fmt.Errorf("failed to decode response body, %w", err),
1336			Snapshot: snapshot.Bytes(),
1337		}
1338		return err
1339	}
1340
1341	errorBody.Seek(0, io.SeekStart)
1342	if len(code) != 0 {
1343		errorCode = restjson.SanitizeErrorCode(code)
1344	}
1345	if len(message) != 0 {
1346		errorMessage = message
1347	}
1348
1349	switch {
1350	case strings.EqualFold("InternalServerException", errorCode):
1351		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1352
1353	case strings.EqualFold("InvalidRequestException", errorCode):
1354		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1355
1356	case strings.EqualFold("TooManyRequestsException", errorCode):
1357		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1358
1359	case strings.EqualFold("ValidationException", errorCode):
1360		return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
1361
1362	default:
1363		genericError := &smithy.GenericAPIError{
1364			Code:    errorCode,
1365			Message: errorMessage,
1366		}
1367		return genericError
1368
1369	}
1370}
1371
1372type awsAwsjson11_deserializeOpListPHIDetectionJobs struct {
1373}
1374
1375func (*awsAwsjson11_deserializeOpListPHIDetectionJobs) ID() string {
1376	return "OperationDeserializer"
1377}
1378
1379func (m *awsAwsjson11_deserializeOpListPHIDetectionJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1380	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1381) {
1382	out, metadata, err = next.HandleDeserialize(ctx, in)
1383	if err != nil {
1384		return out, metadata, err
1385	}
1386
1387	response, ok := out.RawResponse.(*smithyhttp.Response)
1388	if !ok {
1389		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1390	}
1391
1392	if response.StatusCode < 200 || response.StatusCode >= 300 {
1393		return out, metadata, awsAwsjson11_deserializeOpErrorListPHIDetectionJobs(response, &metadata)
1394	}
1395	output := &ListPHIDetectionJobsOutput{}
1396	out.Result = output
1397
1398	var buff [1024]byte
1399	ringBuffer := smithyio.NewRingBuffer(buff[:])
1400
1401	body := io.TeeReader(response.Body, ringBuffer)
1402	decoder := json.NewDecoder(body)
1403	decoder.UseNumber()
1404	var shape interface{}
1405	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1406		var snapshot bytes.Buffer
1407		io.Copy(&snapshot, ringBuffer)
1408		err = &smithy.DeserializationError{
1409			Err:      fmt.Errorf("failed to decode response body, %w", err),
1410			Snapshot: snapshot.Bytes(),
1411		}
1412		return out, metadata, err
1413	}
1414
1415	err = awsAwsjson11_deserializeOpDocumentListPHIDetectionJobsOutput(&output, shape)
1416	if err != nil {
1417		var snapshot bytes.Buffer
1418		io.Copy(&snapshot, ringBuffer)
1419		err = &smithy.DeserializationError{
1420			Err:      fmt.Errorf("failed to decode response body, %w", err),
1421			Snapshot: snapshot.Bytes(),
1422		}
1423		return out, metadata, err
1424	}
1425
1426	return out, metadata, err
1427}
1428
1429func awsAwsjson11_deserializeOpErrorListPHIDetectionJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1430	var errorBuffer bytes.Buffer
1431	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1432		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1433	}
1434	errorBody := bytes.NewReader(errorBuffer.Bytes())
1435
1436	errorCode := "UnknownError"
1437	errorMessage := errorCode
1438
1439	code := response.Header.Get("X-Amzn-ErrorType")
1440	if len(code) != 0 {
1441		errorCode = restjson.SanitizeErrorCode(code)
1442	}
1443
1444	var buff [1024]byte
1445	ringBuffer := smithyio.NewRingBuffer(buff[:])
1446
1447	body := io.TeeReader(errorBody, ringBuffer)
1448	decoder := json.NewDecoder(body)
1449	decoder.UseNumber()
1450	code, message, err := restjson.GetErrorInfo(decoder)
1451	if err != nil {
1452		var snapshot bytes.Buffer
1453		io.Copy(&snapshot, ringBuffer)
1454		err = &smithy.DeserializationError{
1455			Err:      fmt.Errorf("failed to decode response body, %w", err),
1456			Snapshot: snapshot.Bytes(),
1457		}
1458		return err
1459	}
1460
1461	errorBody.Seek(0, io.SeekStart)
1462	if len(code) != 0 {
1463		errorCode = restjson.SanitizeErrorCode(code)
1464	}
1465	if len(message) != 0 {
1466		errorMessage = message
1467	}
1468
1469	switch {
1470	case strings.EqualFold("InternalServerException", errorCode):
1471		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1472
1473	case strings.EqualFold("InvalidRequestException", errorCode):
1474		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1475
1476	case strings.EqualFold("TooManyRequestsException", errorCode):
1477		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1478
1479	case strings.EqualFold("ValidationException", errorCode):
1480		return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
1481
1482	default:
1483		genericError := &smithy.GenericAPIError{
1484			Code:    errorCode,
1485			Message: errorMessage,
1486		}
1487		return genericError
1488
1489	}
1490}
1491
1492type awsAwsjson11_deserializeOpListRxNormInferenceJobs struct {
1493}
1494
1495func (*awsAwsjson11_deserializeOpListRxNormInferenceJobs) ID() string {
1496	return "OperationDeserializer"
1497}
1498
1499func (m *awsAwsjson11_deserializeOpListRxNormInferenceJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1500	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1501) {
1502	out, metadata, err = next.HandleDeserialize(ctx, in)
1503	if err != nil {
1504		return out, metadata, err
1505	}
1506
1507	response, ok := out.RawResponse.(*smithyhttp.Response)
1508	if !ok {
1509		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1510	}
1511
1512	if response.StatusCode < 200 || response.StatusCode >= 300 {
1513		return out, metadata, awsAwsjson11_deserializeOpErrorListRxNormInferenceJobs(response, &metadata)
1514	}
1515	output := &ListRxNormInferenceJobsOutput{}
1516	out.Result = output
1517
1518	var buff [1024]byte
1519	ringBuffer := smithyio.NewRingBuffer(buff[:])
1520
1521	body := io.TeeReader(response.Body, ringBuffer)
1522	decoder := json.NewDecoder(body)
1523	decoder.UseNumber()
1524	var shape interface{}
1525	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1526		var snapshot bytes.Buffer
1527		io.Copy(&snapshot, ringBuffer)
1528		err = &smithy.DeserializationError{
1529			Err:      fmt.Errorf("failed to decode response body, %w", err),
1530			Snapshot: snapshot.Bytes(),
1531		}
1532		return out, metadata, err
1533	}
1534
1535	err = awsAwsjson11_deserializeOpDocumentListRxNormInferenceJobsOutput(&output, shape)
1536	if err != nil {
1537		var snapshot bytes.Buffer
1538		io.Copy(&snapshot, ringBuffer)
1539		err = &smithy.DeserializationError{
1540			Err:      fmt.Errorf("failed to decode response body, %w", err),
1541			Snapshot: snapshot.Bytes(),
1542		}
1543		return out, metadata, err
1544	}
1545
1546	return out, metadata, err
1547}
1548
1549func awsAwsjson11_deserializeOpErrorListRxNormInferenceJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1550	var errorBuffer bytes.Buffer
1551	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1552		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1553	}
1554	errorBody := bytes.NewReader(errorBuffer.Bytes())
1555
1556	errorCode := "UnknownError"
1557	errorMessage := errorCode
1558
1559	code := response.Header.Get("X-Amzn-ErrorType")
1560	if len(code) != 0 {
1561		errorCode = restjson.SanitizeErrorCode(code)
1562	}
1563
1564	var buff [1024]byte
1565	ringBuffer := smithyio.NewRingBuffer(buff[:])
1566
1567	body := io.TeeReader(errorBody, ringBuffer)
1568	decoder := json.NewDecoder(body)
1569	decoder.UseNumber()
1570	code, message, err := restjson.GetErrorInfo(decoder)
1571	if err != nil {
1572		var snapshot bytes.Buffer
1573		io.Copy(&snapshot, ringBuffer)
1574		err = &smithy.DeserializationError{
1575			Err:      fmt.Errorf("failed to decode response body, %w", err),
1576			Snapshot: snapshot.Bytes(),
1577		}
1578		return err
1579	}
1580
1581	errorBody.Seek(0, io.SeekStart)
1582	if len(code) != 0 {
1583		errorCode = restjson.SanitizeErrorCode(code)
1584	}
1585	if len(message) != 0 {
1586		errorMessage = message
1587	}
1588
1589	switch {
1590	case strings.EqualFold("InternalServerException", errorCode):
1591		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1592
1593	case strings.EqualFold("InvalidRequestException", errorCode):
1594		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1595
1596	case strings.EqualFold("TooManyRequestsException", errorCode):
1597		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1598
1599	case strings.EqualFold("ValidationException", errorCode):
1600		return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
1601
1602	default:
1603		genericError := &smithy.GenericAPIError{
1604			Code:    errorCode,
1605			Message: errorMessage,
1606		}
1607		return genericError
1608
1609	}
1610}
1611
1612type awsAwsjson11_deserializeOpStartEntitiesDetectionV2Job struct {
1613}
1614
1615func (*awsAwsjson11_deserializeOpStartEntitiesDetectionV2Job) ID() string {
1616	return "OperationDeserializer"
1617}
1618
1619func (m *awsAwsjson11_deserializeOpStartEntitiesDetectionV2Job) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1620	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1621) {
1622	out, metadata, err = next.HandleDeserialize(ctx, in)
1623	if err != nil {
1624		return out, metadata, err
1625	}
1626
1627	response, ok := out.RawResponse.(*smithyhttp.Response)
1628	if !ok {
1629		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1630	}
1631
1632	if response.StatusCode < 200 || response.StatusCode >= 300 {
1633		return out, metadata, awsAwsjson11_deserializeOpErrorStartEntitiesDetectionV2Job(response, &metadata)
1634	}
1635	output := &StartEntitiesDetectionV2JobOutput{}
1636	out.Result = output
1637
1638	var buff [1024]byte
1639	ringBuffer := smithyio.NewRingBuffer(buff[:])
1640
1641	body := io.TeeReader(response.Body, ringBuffer)
1642	decoder := json.NewDecoder(body)
1643	decoder.UseNumber()
1644	var shape interface{}
1645	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1646		var snapshot bytes.Buffer
1647		io.Copy(&snapshot, ringBuffer)
1648		err = &smithy.DeserializationError{
1649			Err:      fmt.Errorf("failed to decode response body, %w", err),
1650			Snapshot: snapshot.Bytes(),
1651		}
1652		return out, metadata, err
1653	}
1654
1655	err = awsAwsjson11_deserializeOpDocumentStartEntitiesDetectionV2JobOutput(&output, shape)
1656	if err != nil {
1657		var snapshot bytes.Buffer
1658		io.Copy(&snapshot, ringBuffer)
1659		err = &smithy.DeserializationError{
1660			Err:      fmt.Errorf("failed to decode response body, %w", err),
1661			Snapshot: snapshot.Bytes(),
1662		}
1663		return out, metadata, err
1664	}
1665
1666	return out, metadata, err
1667}
1668
1669func awsAwsjson11_deserializeOpErrorStartEntitiesDetectionV2Job(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1670	var errorBuffer bytes.Buffer
1671	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1672		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1673	}
1674	errorBody := bytes.NewReader(errorBuffer.Bytes())
1675
1676	errorCode := "UnknownError"
1677	errorMessage := errorCode
1678
1679	code := response.Header.Get("X-Amzn-ErrorType")
1680	if len(code) != 0 {
1681		errorCode = restjson.SanitizeErrorCode(code)
1682	}
1683
1684	var buff [1024]byte
1685	ringBuffer := smithyio.NewRingBuffer(buff[:])
1686
1687	body := io.TeeReader(errorBody, ringBuffer)
1688	decoder := json.NewDecoder(body)
1689	decoder.UseNumber()
1690	code, message, err := restjson.GetErrorInfo(decoder)
1691	if err != nil {
1692		var snapshot bytes.Buffer
1693		io.Copy(&snapshot, ringBuffer)
1694		err = &smithy.DeserializationError{
1695			Err:      fmt.Errorf("failed to decode response body, %w", err),
1696			Snapshot: snapshot.Bytes(),
1697		}
1698		return err
1699	}
1700
1701	errorBody.Seek(0, io.SeekStart)
1702	if len(code) != 0 {
1703		errorCode = restjson.SanitizeErrorCode(code)
1704	}
1705	if len(message) != 0 {
1706		errorMessage = message
1707	}
1708
1709	switch {
1710	case strings.EqualFold("InternalServerException", errorCode):
1711		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1712
1713	case strings.EqualFold("InvalidRequestException", errorCode):
1714		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1715
1716	case strings.EqualFold("ResourceNotFoundException", errorCode):
1717		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1718
1719	case strings.EqualFold("TooManyRequestsException", errorCode):
1720		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1721
1722	default:
1723		genericError := &smithy.GenericAPIError{
1724			Code:    errorCode,
1725			Message: errorMessage,
1726		}
1727		return genericError
1728
1729	}
1730}
1731
1732type awsAwsjson11_deserializeOpStartICD10CMInferenceJob struct {
1733}
1734
1735func (*awsAwsjson11_deserializeOpStartICD10CMInferenceJob) ID() string {
1736	return "OperationDeserializer"
1737}
1738
1739func (m *awsAwsjson11_deserializeOpStartICD10CMInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1740	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1741) {
1742	out, metadata, err = next.HandleDeserialize(ctx, in)
1743	if err != nil {
1744		return out, metadata, err
1745	}
1746
1747	response, ok := out.RawResponse.(*smithyhttp.Response)
1748	if !ok {
1749		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1750	}
1751
1752	if response.StatusCode < 200 || response.StatusCode >= 300 {
1753		return out, metadata, awsAwsjson11_deserializeOpErrorStartICD10CMInferenceJob(response, &metadata)
1754	}
1755	output := &StartICD10CMInferenceJobOutput{}
1756	out.Result = output
1757
1758	var buff [1024]byte
1759	ringBuffer := smithyio.NewRingBuffer(buff[:])
1760
1761	body := io.TeeReader(response.Body, ringBuffer)
1762	decoder := json.NewDecoder(body)
1763	decoder.UseNumber()
1764	var shape interface{}
1765	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1766		var snapshot bytes.Buffer
1767		io.Copy(&snapshot, ringBuffer)
1768		err = &smithy.DeserializationError{
1769			Err:      fmt.Errorf("failed to decode response body, %w", err),
1770			Snapshot: snapshot.Bytes(),
1771		}
1772		return out, metadata, err
1773	}
1774
1775	err = awsAwsjson11_deserializeOpDocumentStartICD10CMInferenceJobOutput(&output, shape)
1776	if err != nil {
1777		var snapshot bytes.Buffer
1778		io.Copy(&snapshot, ringBuffer)
1779		err = &smithy.DeserializationError{
1780			Err:      fmt.Errorf("failed to decode response body, %w", err),
1781			Snapshot: snapshot.Bytes(),
1782		}
1783		return out, metadata, err
1784	}
1785
1786	return out, metadata, err
1787}
1788
1789func awsAwsjson11_deserializeOpErrorStartICD10CMInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1790	var errorBuffer bytes.Buffer
1791	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1792		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1793	}
1794	errorBody := bytes.NewReader(errorBuffer.Bytes())
1795
1796	errorCode := "UnknownError"
1797	errorMessage := errorCode
1798
1799	code := response.Header.Get("X-Amzn-ErrorType")
1800	if len(code) != 0 {
1801		errorCode = restjson.SanitizeErrorCode(code)
1802	}
1803
1804	var buff [1024]byte
1805	ringBuffer := smithyio.NewRingBuffer(buff[:])
1806
1807	body := io.TeeReader(errorBody, ringBuffer)
1808	decoder := json.NewDecoder(body)
1809	decoder.UseNumber()
1810	code, message, err := restjson.GetErrorInfo(decoder)
1811	if err != nil {
1812		var snapshot bytes.Buffer
1813		io.Copy(&snapshot, ringBuffer)
1814		err = &smithy.DeserializationError{
1815			Err:      fmt.Errorf("failed to decode response body, %w", err),
1816			Snapshot: snapshot.Bytes(),
1817		}
1818		return err
1819	}
1820
1821	errorBody.Seek(0, io.SeekStart)
1822	if len(code) != 0 {
1823		errorCode = restjson.SanitizeErrorCode(code)
1824	}
1825	if len(message) != 0 {
1826		errorMessage = message
1827	}
1828
1829	switch {
1830	case strings.EqualFold("InternalServerException", errorCode):
1831		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1832
1833	case strings.EqualFold("InvalidRequestException", errorCode):
1834		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1835
1836	case strings.EqualFold("ResourceNotFoundException", errorCode):
1837		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1838
1839	case strings.EqualFold("TooManyRequestsException", errorCode):
1840		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1841
1842	default:
1843		genericError := &smithy.GenericAPIError{
1844			Code:    errorCode,
1845			Message: errorMessage,
1846		}
1847		return genericError
1848
1849	}
1850}
1851
1852type awsAwsjson11_deserializeOpStartPHIDetectionJob struct {
1853}
1854
1855func (*awsAwsjson11_deserializeOpStartPHIDetectionJob) ID() string {
1856	return "OperationDeserializer"
1857}
1858
1859func (m *awsAwsjson11_deserializeOpStartPHIDetectionJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1860	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1861) {
1862	out, metadata, err = next.HandleDeserialize(ctx, in)
1863	if err != nil {
1864		return out, metadata, err
1865	}
1866
1867	response, ok := out.RawResponse.(*smithyhttp.Response)
1868	if !ok {
1869		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1870	}
1871
1872	if response.StatusCode < 200 || response.StatusCode >= 300 {
1873		return out, metadata, awsAwsjson11_deserializeOpErrorStartPHIDetectionJob(response, &metadata)
1874	}
1875	output := &StartPHIDetectionJobOutput{}
1876	out.Result = output
1877
1878	var buff [1024]byte
1879	ringBuffer := smithyio.NewRingBuffer(buff[:])
1880
1881	body := io.TeeReader(response.Body, ringBuffer)
1882	decoder := json.NewDecoder(body)
1883	decoder.UseNumber()
1884	var shape interface{}
1885	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1886		var snapshot bytes.Buffer
1887		io.Copy(&snapshot, ringBuffer)
1888		err = &smithy.DeserializationError{
1889			Err:      fmt.Errorf("failed to decode response body, %w", err),
1890			Snapshot: snapshot.Bytes(),
1891		}
1892		return out, metadata, err
1893	}
1894
1895	err = awsAwsjson11_deserializeOpDocumentStartPHIDetectionJobOutput(&output, shape)
1896	if err != nil {
1897		var snapshot bytes.Buffer
1898		io.Copy(&snapshot, ringBuffer)
1899		err = &smithy.DeserializationError{
1900			Err:      fmt.Errorf("failed to decode response body, %w", err),
1901			Snapshot: snapshot.Bytes(),
1902		}
1903		return out, metadata, err
1904	}
1905
1906	return out, metadata, err
1907}
1908
1909func awsAwsjson11_deserializeOpErrorStartPHIDetectionJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1910	var errorBuffer bytes.Buffer
1911	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1912		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1913	}
1914	errorBody := bytes.NewReader(errorBuffer.Bytes())
1915
1916	errorCode := "UnknownError"
1917	errorMessage := errorCode
1918
1919	code := response.Header.Get("X-Amzn-ErrorType")
1920	if len(code) != 0 {
1921		errorCode = restjson.SanitizeErrorCode(code)
1922	}
1923
1924	var buff [1024]byte
1925	ringBuffer := smithyio.NewRingBuffer(buff[:])
1926
1927	body := io.TeeReader(errorBody, ringBuffer)
1928	decoder := json.NewDecoder(body)
1929	decoder.UseNumber()
1930	code, message, err := restjson.GetErrorInfo(decoder)
1931	if err != nil {
1932		var snapshot bytes.Buffer
1933		io.Copy(&snapshot, ringBuffer)
1934		err = &smithy.DeserializationError{
1935			Err:      fmt.Errorf("failed to decode response body, %w", err),
1936			Snapshot: snapshot.Bytes(),
1937		}
1938		return err
1939	}
1940
1941	errorBody.Seek(0, io.SeekStart)
1942	if len(code) != 0 {
1943		errorCode = restjson.SanitizeErrorCode(code)
1944	}
1945	if len(message) != 0 {
1946		errorMessage = message
1947	}
1948
1949	switch {
1950	case strings.EqualFold("InternalServerException", errorCode):
1951		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
1952
1953	case strings.EqualFold("InvalidRequestException", errorCode):
1954		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
1955
1956	case strings.EqualFold("ResourceNotFoundException", errorCode):
1957		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1958
1959	case strings.EqualFold("TooManyRequestsException", errorCode):
1960		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
1961
1962	default:
1963		genericError := &smithy.GenericAPIError{
1964			Code:    errorCode,
1965			Message: errorMessage,
1966		}
1967		return genericError
1968
1969	}
1970}
1971
1972type awsAwsjson11_deserializeOpStartRxNormInferenceJob struct {
1973}
1974
1975func (*awsAwsjson11_deserializeOpStartRxNormInferenceJob) ID() string {
1976	return "OperationDeserializer"
1977}
1978
1979func (m *awsAwsjson11_deserializeOpStartRxNormInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1980	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1981) {
1982	out, metadata, err = next.HandleDeserialize(ctx, in)
1983	if err != nil {
1984		return out, metadata, err
1985	}
1986
1987	response, ok := out.RawResponse.(*smithyhttp.Response)
1988	if !ok {
1989		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1990	}
1991
1992	if response.StatusCode < 200 || response.StatusCode >= 300 {
1993		return out, metadata, awsAwsjson11_deserializeOpErrorStartRxNormInferenceJob(response, &metadata)
1994	}
1995	output := &StartRxNormInferenceJobOutput{}
1996	out.Result = output
1997
1998	var buff [1024]byte
1999	ringBuffer := smithyio.NewRingBuffer(buff[:])
2000
2001	body := io.TeeReader(response.Body, ringBuffer)
2002	decoder := json.NewDecoder(body)
2003	decoder.UseNumber()
2004	var shape interface{}
2005	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2006		var snapshot bytes.Buffer
2007		io.Copy(&snapshot, ringBuffer)
2008		err = &smithy.DeserializationError{
2009			Err:      fmt.Errorf("failed to decode response body, %w", err),
2010			Snapshot: snapshot.Bytes(),
2011		}
2012		return out, metadata, err
2013	}
2014
2015	err = awsAwsjson11_deserializeOpDocumentStartRxNormInferenceJobOutput(&output, shape)
2016	if err != nil {
2017		var snapshot bytes.Buffer
2018		io.Copy(&snapshot, ringBuffer)
2019		err = &smithy.DeserializationError{
2020			Err:      fmt.Errorf("failed to decode response body, %w", err),
2021			Snapshot: snapshot.Bytes(),
2022		}
2023		return out, metadata, err
2024	}
2025
2026	return out, metadata, err
2027}
2028
2029func awsAwsjson11_deserializeOpErrorStartRxNormInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2030	var errorBuffer bytes.Buffer
2031	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2032		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2033	}
2034	errorBody := bytes.NewReader(errorBuffer.Bytes())
2035
2036	errorCode := "UnknownError"
2037	errorMessage := errorCode
2038
2039	code := response.Header.Get("X-Amzn-ErrorType")
2040	if len(code) != 0 {
2041		errorCode = restjson.SanitizeErrorCode(code)
2042	}
2043
2044	var buff [1024]byte
2045	ringBuffer := smithyio.NewRingBuffer(buff[:])
2046
2047	body := io.TeeReader(errorBody, ringBuffer)
2048	decoder := json.NewDecoder(body)
2049	decoder.UseNumber()
2050	code, message, err := restjson.GetErrorInfo(decoder)
2051	if err != nil {
2052		var snapshot bytes.Buffer
2053		io.Copy(&snapshot, ringBuffer)
2054		err = &smithy.DeserializationError{
2055			Err:      fmt.Errorf("failed to decode response body, %w", err),
2056			Snapshot: snapshot.Bytes(),
2057		}
2058		return err
2059	}
2060
2061	errorBody.Seek(0, io.SeekStart)
2062	if len(code) != 0 {
2063		errorCode = restjson.SanitizeErrorCode(code)
2064	}
2065	if len(message) != 0 {
2066		errorMessage = message
2067	}
2068
2069	switch {
2070	case strings.EqualFold("InternalServerException", errorCode):
2071		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
2072
2073	case strings.EqualFold("InvalidRequestException", errorCode):
2074		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
2075
2076	case strings.EqualFold("ResourceNotFoundException", errorCode):
2077		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
2078
2079	case strings.EqualFold("TooManyRequestsException", errorCode):
2080		return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
2081
2082	default:
2083		genericError := &smithy.GenericAPIError{
2084			Code:    errorCode,
2085			Message: errorMessage,
2086		}
2087		return genericError
2088
2089	}
2090}
2091
2092type awsAwsjson11_deserializeOpStopEntitiesDetectionV2Job struct {
2093}
2094
2095func (*awsAwsjson11_deserializeOpStopEntitiesDetectionV2Job) ID() string {
2096	return "OperationDeserializer"
2097}
2098
2099func (m *awsAwsjson11_deserializeOpStopEntitiesDetectionV2Job) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2100	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2101) {
2102	out, metadata, err = next.HandleDeserialize(ctx, in)
2103	if err != nil {
2104		return out, metadata, err
2105	}
2106
2107	response, ok := out.RawResponse.(*smithyhttp.Response)
2108	if !ok {
2109		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2110	}
2111
2112	if response.StatusCode < 200 || response.StatusCode >= 300 {
2113		return out, metadata, awsAwsjson11_deserializeOpErrorStopEntitiesDetectionV2Job(response, &metadata)
2114	}
2115	output := &StopEntitiesDetectionV2JobOutput{}
2116	out.Result = output
2117
2118	var buff [1024]byte
2119	ringBuffer := smithyio.NewRingBuffer(buff[:])
2120
2121	body := io.TeeReader(response.Body, ringBuffer)
2122	decoder := json.NewDecoder(body)
2123	decoder.UseNumber()
2124	var shape interface{}
2125	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2126		var snapshot bytes.Buffer
2127		io.Copy(&snapshot, ringBuffer)
2128		err = &smithy.DeserializationError{
2129			Err:      fmt.Errorf("failed to decode response body, %w", err),
2130			Snapshot: snapshot.Bytes(),
2131		}
2132		return out, metadata, err
2133	}
2134
2135	err = awsAwsjson11_deserializeOpDocumentStopEntitiesDetectionV2JobOutput(&output, shape)
2136	if err != nil {
2137		var snapshot bytes.Buffer
2138		io.Copy(&snapshot, ringBuffer)
2139		err = &smithy.DeserializationError{
2140			Err:      fmt.Errorf("failed to decode response body, %w", err),
2141			Snapshot: snapshot.Bytes(),
2142		}
2143		return out, metadata, err
2144	}
2145
2146	return out, metadata, err
2147}
2148
2149func awsAwsjson11_deserializeOpErrorStopEntitiesDetectionV2Job(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2150	var errorBuffer bytes.Buffer
2151	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2152		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2153	}
2154	errorBody := bytes.NewReader(errorBuffer.Bytes())
2155
2156	errorCode := "UnknownError"
2157	errorMessage := errorCode
2158
2159	code := response.Header.Get("X-Amzn-ErrorType")
2160	if len(code) != 0 {
2161		errorCode = restjson.SanitizeErrorCode(code)
2162	}
2163
2164	var buff [1024]byte
2165	ringBuffer := smithyio.NewRingBuffer(buff[:])
2166
2167	body := io.TeeReader(errorBody, ringBuffer)
2168	decoder := json.NewDecoder(body)
2169	decoder.UseNumber()
2170	code, message, err := restjson.GetErrorInfo(decoder)
2171	if err != nil {
2172		var snapshot bytes.Buffer
2173		io.Copy(&snapshot, ringBuffer)
2174		err = &smithy.DeserializationError{
2175			Err:      fmt.Errorf("failed to decode response body, %w", err),
2176			Snapshot: snapshot.Bytes(),
2177		}
2178		return err
2179	}
2180
2181	errorBody.Seek(0, io.SeekStart)
2182	if len(code) != 0 {
2183		errorCode = restjson.SanitizeErrorCode(code)
2184	}
2185	if len(message) != 0 {
2186		errorMessage = message
2187	}
2188
2189	switch {
2190	case strings.EqualFold("InternalServerException", errorCode):
2191		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
2192
2193	case strings.EqualFold("InvalidRequestException", errorCode):
2194		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
2195
2196	case strings.EqualFold("ResourceNotFoundException", errorCode):
2197		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
2198
2199	default:
2200		genericError := &smithy.GenericAPIError{
2201			Code:    errorCode,
2202			Message: errorMessage,
2203		}
2204		return genericError
2205
2206	}
2207}
2208
2209type awsAwsjson11_deserializeOpStopICD10CMInferenceJob struct {
2210}
2211
2212func (*awsAwsjson11_deserializeOpStopICD10CMInferenceJob) ID() string {
2213	return "OperationDeserializer"
2214}
2215
2216func (m *awsAwsjson11_deserializeOpStopICD10CMInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2217	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2218) {
2219	out, metadata, err = next.HandleDeserialize(ctx, in)
2220	if err != nil {
2221		return out, metadata, err
2222	}
2223
2224	response, ok := out.RawResponse.(*smithyhttp.Response)
2225	if !ok {
2226		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2227	}
2228
2229	if response.StatusCode < 200 || response.StatusCode >= 300 {
2230		return out, metadata, awsAwsjson11_deserializeOpErrorStopICD10CMInferenceJob(response, &metadata)
2231	}
2232	output := &StopICD10CMInferenceJobOutput{}
2233	out.Result = output
2234
2235	var buff [1024]byte
2236	ringBuffer := smithyio.NewRingBuffer(buff[:])
2237
2238	body := io.TeeReader(response.Body, ringBuffer)
2239	decoder := json.NewDecoder(body)
2240	decoder.UseNumber()
2241	var shape interface{}
2242	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2243		var snapshot bytes.Buffer
2244		io.Copy(&snapshot, ringBuffer)
2245		err = &smithy.DeserializationError{
2246			Err:      fmt.Errorf("failed to decode response body, %w", err),
2247			Snapshot: snapshot.Bytes(),
2248		}
2249		return out, metadata, err
2250	}
2251
2252	err = awsAwsjson11_deserializeOpDocumentStopICD10CMInferenceJobOutput(&output, shape)
2253	if err != nil {
2254		var snapshot bytes.Buffer
2255		io.Copy(&snapshot, ringBuffer)
2256		err = &smithy.DeserializationError{
2257			Err:      fmt.Errorf("failed to decode response body, %w", err),
2258			Snapshot: snapshot.Bytes(),
2259		}
2260		return out, metadata, err
2261	}
2262
2263	return out, metadata, err
2264}
2265
2266func awsAwsjson11_deserializeOpErrorStopICD10CMInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2267	var errorBuffer bytes.Buffer
2268	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2269		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2270	}
2271	errorBody := bytes.NewReader(errorBuffer.Bytes())
2272
2273	errorCode := "UnknownError"
2274	errorMessage := errorCode
2275
2276	code := response.Header.Get("X-Amzn-ErrorType")
2277	if len(code) != 0 {
2278		errorCode = restjson.SanitizeErrorCode(code)
2279	}
2280
2281	var buff [1024]byte
2282	ringBuffer := smithyio.NewRingBuffer(buff[:])
2283
2284	body := io.TeeReader(errorBody, ringBuffer)
2285	decoder := json.NewDecoder(body)
2286	decoder.UseNumber()
2287	code, message, err := restjson.GetErrorInfo(decoder)
2288	if err != nil {
2289		var snapshot bytes.Buffer
2290		io.Copy(&snapshot, ringBuffer)
2291		err = &smithy.DeserializationError{
2292			Err:      fmt.Errorf("failed to decode response body, %w", err),
2293			Snapshot: snapshot.Bytes(),
2294		}
2295		return err
2296	}
2297
2298	errorBody.Seek(0, io.SeekStart)
2299	if len(code) != 0 {
2300		errorCode = restjson.SanitizeErrorCode(code)
2301	}
2302	if len(message) != 0 {
2303		errorMessage = message
2304	}
2305
2306	switch {
2307	case strings.EqualFold("InternalServerException", errorCode):
2308		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
2309
2310	case strings.EqualFold("InvalidRequestException", errorCode):
2311		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
2312
2313	case strings.EqualFold("ResourceNotFoundException", errorCode):
2314		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
2315
2316	default:
2317		genericError := &smithy.GenericAPIError{
2318			Code:    errorCode,
2319			Message: errorMessage,
2320		}
2321		return genericError
2322
2323	}
2324}
2325
2326type awsAwsjson11_deserializeOpStopPHIDetectionJob struct {
2327}
2328
2329func (*awsAwsjson11_deserializeOpStopPHIDetectionJob) ID() string {
2330	return "OperationDeserializer"
2331}
2332
2333func (m *awsAwsjson11_deserializeOpStopPHIDetectionJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2334	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2335) {
2336	out, metadata, err = next.HandleDeserialize(ctx, in)
2337	if err != nil {
2338		return out, metadata, err
2339	}
2340
2341	response, ok := out.RawResponse.(*smithyhttp.Response)
2342	if !ok {
2343		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2344	}
2345
2346	if response.StatusCode < 200 || response.StatusCode >= 300 {
2347		return out, metadata, awsAwsjson11_deserializeOpErrorStopPHIDetectionJob(response, &metadata)
2348	}
2349	output := &StopPHIDetectionJobOutput{}
2350	out.Result = output
2351
2352	var buff [1024]byte
2353	ringBuffer := smithyio.NewRingBuffer(buff[:])
2354
2355	body := io.TeeReader(response.Body, ringBuffer)
2356	decoder := json.NewDecoder(body)
2357	decoder.UseNumber()
2358	var shape interface{}
2359	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2360		var snapshot bytes.Buffer
2361		io.Copy(&snapshot, ringBuffer)
2362		err = &smithy.DeserializationError{
2363			Err:      fmt.Errorf("failed to decode response body, %w", err),
2364			Snapshot: snapshot.Bytes(),
2365		}
2366		return out, metadata, err
2367	}
2368
2369	err = awsAwsjson11_deserializeOpDocumentStopPHIDetectionJobOutput(&output, shape)
2370	if err != nil {
2371		var snapshot bytes.Buffer
2372		io.Copy(&snapshot, ringBuffer)
2373		err = &smithy.DeserializationError{
2374			Err:      fmt.Errorf("failed to decode response body, %w", err),
2375			Snapshot: snapshot.Bytes(),
2376		}
2377		return out, metadata, err
2378	}
2379
2380	return out, metadata, err
2381}
2382
2383func awsAwsjson11_deserializeOpErrorStopPHIDetectionJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2384	var errorBuffer bytes.Buffer
2385	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2386		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2387	}
2388	errorBody := bytes.NewReader(errorBuffer.Bytes())
2389
2390	errorCode := "UnknownError"
2391	errorMessage := errorCode
2392
2393	code := response.Header.Get("X-Amzn-ErrorType")
2394	if len(code) != 0 {
2395		errorCode = restjson.SanitizeErrorCode(code)
2396	}
2397
2398	var buff [1024]byte
2399	ringBuffer := smithyio.NewRingBuffer(buff[:])
2400
2401	body := io.TeeReader(errorBody, ringBuffer)
2402	decoder := json.NewDecoder(body)
2403	decoder.UseNumber()
2404	code, message, err := restjson.GetErrorInfo(decoder)
2405	if err != nil {
2406		var snapshot bytes.Buffer
2407		io.Copy(&snapshot, ringBuffer)
2408		err = &smithy.DeserializationError{
2409			Err:      fmt.Errorf("failed to decode response body, %w", err),
2410			Snapshot: snapshot.Bytes(),
2411		}
2412		return err
2413	}
2414
2415	errorBody.Seek(0, io.SeekStart)
2416	if len(code) != 0 {
2417		errorCode = restjson.SanitizeErrorCode(code)
2418	}
2419	if len(message) != 0 {
2420		errorMessage = message
2421	}
2422
2423	switch {
2424	case strings.EqualFold("InternalServerException", errorCode):
2425		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
2426
2427	case strings.EqualFold("InvalidRequestException", errorCode):
2428		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
2429
2430	case strings.EqualFold("ResourceNotFoundException", errorCode):
2431		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
2432
2433	default:
2434		genericError := &smithy.GenericAPIError{
2435			Code:    errorCode,
2436			Message: errorMessage,
2437		}
2438		return genericError
2439
2440	}
2441}
2442
2443type awsAwsjson11_deserializeOpStopRxNormInferenceJob struct {
2444}
2445
2446func (*awsAwsjson11_deserializeOpStopRxNormInferenceJob) ID() string {
2447	return "OperationDeserializer"
2448}
2449
2450func (m *awsAwsjson11_deserializeOpStopRxNormInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2451	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2452) {
2453	out, metadata, err = next.HandleDeserialize(ctx, in)
2454	if err != nil {
2455		return out, metadata, err
2456	}
2457
2458	response, ok := out.RawResponse.(*smithyhttp.Response)
2459	if !ok {
2460		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2461	}
2462
2463	if response.StatusCode < 200 || response.StatusCode >= 300 {
2464		return out, metadata, awsAwsjson11_deserializeOpErrorStopRxNormInferenceJob(response, &metadata)
2465	}
2466	output := &StopRxNormInferenceJobOutput{}
2467	out.Result = output
2468
2469	var buff [1024]byte
2470	ringBuffer := smithyio.NewRingBuffer(buff[:])
2471
2472	body := io.TeeReader(response.Body, ringBuffer)
2473	decoder := json.NewDecoder(body)
2474	decoder.UseNumber()
2475	var shape interface{}
2476	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2477		var snapshot bytes.Buffer
2478		io.Copy(&snapshot, ringBuffer)
2479		err = &smithy.DeserializationError{
2480			Err:      fmt.Errorf("failed to decode response body, %w", err),
2481			Snapshot: snapshot.Bytes(),
2482		}
2483		return out, metadata, err
2484	}
2485
2486	err = awsAwsjson11_deserializeOpDocumentStopRxNormInferenceJobOutput(&output, shape)
2487	if err != nil {
2488		var snapshot bytes.Buffer
2489		io.Copy(&snapshot, ringBuffer)
2490		err = &smithy.DeserializationError{
2491			Err:      fmt.Errorf("failed to decode response body, %w", err),
2492			Snapshot: snapshot.Bytes(),
2493		}
2494		return out, metadata, err
2495	}
2496
2497	return out, metadata, err
2498}
2499
2500func awsAwsjson11_deserializeOpErrorStopRxNormInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2501	var errorBuffer bytes.Buffer
2502	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2503		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2504	}
2505	errorBody := bytes.NewReader(errorBuffer.Bytes())
2506
2507	errorCode := "UnknownError"
2508	errorMessage := errorCode
2509
2510	code := response.Header.Get("X-Amzn-ErrorType")
2511	if len(code) != 0 {
2512		errorCode = restjson.SanitizeErrorCode(code)
2513	}
2514
2515	var buff [1024]byte
2516	ringBuffer := smithyio.NewRingBuffer(buff[:])
2517
2518	body := io.TeeReader(errorBody, ringBuffer)
2519	decoder := json.NewDecoder(body)
2520	decoder.UseNumber()
2521	code, message, err := restjson.GetErrorInfo(decoder)
2522	if err != nil {
2523		var snapshot bytes.Buffer
2524		io.Copy(&snapshot, ringBuffer)
2525		err = &smithy.DeserializationError{
2526			Err:      fmt.Errorf("failed to decode response body, %w", err),
2527			Snapshot: snapshot.Bytes(),
2528		}
2529		return err
2530	}
2531
2532	errorBody.Seek(0, io.SeekStart)
2533	if len(code) != 0 {
2534		errorCode = restjson.SanitizeErrorCode(code)
2535	}
2536	if len(message) != 0 {
2537		errorMessage = message
2538	}
2539
2540	switch {
2541	case strings.EqualFold("InternalServerException", errorCode):
2542		return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody)
2543
2544	case strings.EqualFold("InvalidRequestException", errorCode):
2545		return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody)
2546
2547	case strings.EqualFold("ResourceNotFoundException", errorCode):
2548		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
2549
2550	default:
2551		genericError := &smithy.GenericAPIError{
2552			Code:    errorCode,
2553			Message: errorMessage,
2554		}
2555		return genericError
2556
2557	}
2558}
2559
2560func awsAwsjson11_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2561	var buff [1024]byte
2562	ringBuffer := smithyio.NewRingBuffer(buff[:])
2563
2564	body := io.TeeReader(errorBody, ringBuffer)
2565	decoder := json.NewDecoder(body)
2566	decoder.UseNumber()
2567	var shape interface{}
2568	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2569		var snapshot bytes.Buffer
2570		io.Copy(&snapshot, ringBuffer)
2571		err = &smithy.DeserializationError{
2572			Err:      fmt.Errorf("failed to decode response body, %w", err),
2573			Snapshot: snapshot.Bytes(),
2574		}
2575		return err
2576	}
2577
2578	output := &types.InternalServerException{}
2579	err := awsAwsjson11_deserializeDocumentInternalServerException(&output, shape)
2580
2581	if err != nil {
2582		var snapshot bytes.Buffer
2583		io.Copy(&snapshot, ringBuffer)
2584		err = &smithy.DeserializationError{
2585			Err:      fmt.Errorf("failed to decode response body, %w", err),
2586			Snapshot: snapshot.Bytes(),
2587		}
2588		return err
2589	}
2590
2591	errorBody.Seek(0, io.SeekStart)
2592	return output
2593}
2594
2595func awsAwsjson11_deserializeErrorInvalidEncodingException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2596	var buff [1024]byte
2597	ringBuffer := smithyio.NewRingBuffer(buff[:])
2598
2599	body := io.TeeReader(errorBody, ringBuffer)
2600	decoder := json.NewDecoder(body)
2601	decoder.UseNumber()
2602	var shape interface{}
2603	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2604		var snapshot bytes.Buffer
2605		io.Copy(&snapshot, ringBuffer)
2606		err = &smithy.DeserializationError{
2607			Err:      fmt.Errorf("failed to decode response body, %w", err),
2608			Snapshot: snapshot.Bytes(),
2609		}
2610		return err
2611	}
2612
2613	output := &types.InvalidEncodingException{}
2614	err := awsAwsjson11_deserializeDocumentInvalidEncodingException(&output, shape)
2615
2616	if err != nil {
2617		var snapshot bytes.Buffer
2618		io.Copy(&snapshot, ringBuffer)
2619		err = &smithy.DeserializationError{
2620			Err:      fmt.Errorf("failed to decode response body, %w", err),
2621			Snapshot: snapshot.Bytes(),
2622		}
2623		return err
2624	}
2625
2626	errorBody.Seek(0, io.SeekStart)
2627	return output
2628}
2629
2630func awsAwsjson11_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2631	var buff [1024]byte
2632	ringBuffer := smithyio.NewRingBuffer(buff[:])
2633
2634	body := io.TeeReader(errorBody, ringBuffer)
2635	decoder := json.NewDecoder(body)
2636	decoder.UseNumber()
2637	var shape interface{}
2638	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2639		var snapshot bytes.Buffer
2640		io.Copy(&snapshot, ringBuffer)
2641		err = &smithy.DeserializationError{
2642			Err:      fmt.Errorf("failed to decode response body, %w", err),
2643			Snapshot: snapshot.Bytes(),
2644		}
2645		return err
2646	}
2647
2648	output := &types.InvalidRequestException{}
2649	err := awsAwsjson11_deserializeDocumentInvalidRequestException(&output, shape)
2650
2651	if err != nil {
2652		var snapshot bytes.Buffer
2653		io.Copy(&snapshot, ringBuffer)
2654		err = &smithy.DeserializationError{
2655			Err:      fmt.Errorf("failed to decode response body, %w", err),
2656			Snapshot: snapshot.Bytes(),
2657		}
2658		return err
2659	}
2660
2661	errorBody.Seek(0, io.SeekStart)
2662	return output
2663}
2664
2665func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2666	var buff [1024]byte
2667	ringBuffer := smithyio.NewRingBuffer(buff[:])
2668
2669	body := io.TeeReader(errorBody, ringBuffer)
2670	decoder := json.NewDecoder(body)
2671	decoder.UseNumber()
2672	var shape interface{}
2673	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2674		var snapshot bytes.Buffer
2675		io.Copy(&snapshot, ringBuffer)
2676		err = &smithy.DeserializationError{
2677			Err:      fmt.Errorf("failed to decode response body, %w", err),
2678			Snapshot: snapshot.Bytes(),
2679		}
2680		return err
2681	}
2682
2683	output := &types.ResourceNotFoundException{}
2684	err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape)
2685
2686	if err != nil {
2687		var snapshot bytes.Buffer
2688		io.Copy(&snapshot, ringBuffer)
2689		err = &smithy.DeserializationError{
2690			Err:      fmt.Errorf("failed to decode response body, %w", err),
2691			Snapshot: snapshot.Bytes(),
2692		}
2693		return err
2694	}
2695
2696	errorBody.Seek(0, io.SeekStart)
2697	return output
2698}
2699
2700func awsAwsjson11_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2701	var buff [1024]byte
2702	ringBuffer := smithyio.NewRingBuffer(buff[:])
2703
2704	body := io.TeeReader(errorBody, ringBuffer)
2705	decoder := json.NewDecoder(body)
2706	decoder.UseNumber()
2707	var shape interface{}
2708	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2709		var snapshot bytes.Buffer
2710		io.Copy(&snapshot, ringBuffer)
2711		err = &smithy.DeserializationError{
2712			Err:      fmt.Errorf("failed to decode response body, %w", err),
2713			Snapshot: snapshot.Bytes(),
2714		}
2715		return err
2716	}
2717
2718	output := &types.ServiceUnavailableException{}
2719	err := awsAwsjson11_deserializeDocumentServiceUnavailableException(&output, shape)
2720
2721	if err != nil {
2722		var snapshot bytes.Buffer
2723		io.Copy(&snapshot, ringBuffer)
2724		err = &smithy.DeserializationError{
2725			Err:      fmt.Errorf("failed to decode response body, %w", err),
2726			Snapshot: snapshot.Bytes(),
2727		}
2728		return err
2729	}
2730
2731	errorBody.Seek(0, io.SeekStart)
2732	return output
2733}
2734
2735func awsAwsjson11_deserializeErrorTextSizeLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2736	var buff [1024]byte
2737	ringBuffer := smithyio.NewRingBuffer(buff[:])
2738
2739	body := io.TeeReader(errorBody, ringBuffer)
2740	decoder := json.NewDecoder(body)
2741	decoder.UseNumber()
2742	var shape interface{}
2743	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2744		var snapshot bytes.Buffer
2745		io.Copy(&snapshot, ringBuffer)
2746		err = &smithy.DeserializationError{
2747			Err:      fmt.Errorf("failed to decode response body, %w", err),
2748			Snapshot: snapshot.Bytes(),
2749		}
2750		return err
2751	}
2752
2753	output := &types.TextSizeLimitExceededException{}
2754	err := awsAwsjson11_deserializeDocumentTextSizeLimitExceededException(&output, shape)
2755
2756	if err != nil {
2757		var snapshot bytes.Buffer
2758		io.Copy(&snapshot, ringBuffer)
2759		err = &smithy.DeserializationError{
2760			Err:      fmt.Errorf("failed to decode response body, %w", err),
2761			Snapshot: snapshot.Bytes(),
2762		}
2763		return err
2764	}
2765
2766	errorBody.Seek(0, io.SeekStart)
2767	return output
2768}
2769
2770func awsAwsjson11_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2771	var buff [1024]byte
2772	ringBuffer := smithyio.NewRingBuffer(buff[:])
2773
2774	body := io.TeeReader(errorBody, ringBuffer)
2775	decoder := json.NewDecoder(body)
2776	decoder.UseNumber()
2777	var shape interface{}
2778	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2779		var snapshot bytes.Buffer
2780		io.Copy(&snapshot, ringBuffer)
2781		err = &smithy.DeserializationError{
2782			Err:      fmt.Errorf("failed to decode response body, %w", err),
2783			Snapshot: snapshot.Bytes(),
2784		}
2785		return err
2786	}
2787
2788	output := &types.TooManyRequestsException{}
2789	err := awsAwsjson11_deserializeDocumentTooManyRequestsException(&output, shape)
2790
2791	if err != nil {
2792		var snapshot bytes.Buffer
2793		io.Copy(&snapshot, ringBuffer)
2794		err = &smithy.DeserializationError{
2795			Err:      fmt.Errorf("failed to decode response body, %w", err),
2796			Snapshot: snapshot.Bytes(),
2797		}
2798		return err
2799	}
2800
2801	errorBody.Seek(0, io.SeekStart)
2802	return output
2803}
2804
2805func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2806	var buff [1024]byte
2807	ringBuffer := smithyio.NewRingBuffer(buff[:])
2808
2809	body := io.TeeReader(errorBody, ringBuffer)
2810	decoder := json.NewDecoder(body)
2811	decoder.UseNumber()
2812	var shape interface{}
2813	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2814		var snapshot bytes.Buffer
2815		io.Copy(&snapshot, ringBuffer)
2816		err = &smithy.DeserializationError{
2817			Err:      fmt.Errorf("failed to decode response body, %w", err),
2818			Snapshot: snapshot.Bytes(),
2819		}
2820		return err
2821	}
2822
2823	output := &types.ValidationException{}
2824	err := awsAwsjson11_deserializeDocumentValidationException(&output, shape)
2825
2826	if err != nil {
2827		var snapshot bytes.Buffer
2828		io.Copy(&snapshot, ringBuffer)
2829		err = &smithy.DeserializationError{
2830			Err:      fmt.Errorf("failed to decode response body, %w", err),
2831			Snapshot: snapshot.Bytes(),
2832		}
2833		return err
2834	}
2835
2836	errorBody.Seek(0, io.SeekStart)
2837	return output
2838}
2839
2840func awsAwsjson11_deserializeDocumentAttribute(v **types.Attribute, value interface{}) error {
2841	if v == nil {
2842		return fmt.Errorf("unexpected nil of type %T", v)
2843	}
2844	if value == nil {
2845		return nil
2846	}
2847
2848	shape, ok := value.(map[string]interface{})
2849	if !ok {
2850		return fmt.Errorf("unexpected JSON type %v", value)
2851	}
2852
2853	var sv *types.Attribute
2854	if *v == nil {
2855		sv = &types.Attribute{}
2856	} else {
2857		sv = *v
2858	}
2859
2860	for key, value := range shape {
2861		switch key {
2862		case "BeginOffset":
2863			if value != nil {
2864				jtv, ok := value.(json.Number)
2865				if !ok {
2866					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
2867				}
2868				i64, err := jtv.Int64()
2869				if err != nil {
2870					return err
2871				}
2872				sv.BeginOffset = ptr.Int32(int32(i64))
2873			}
2874
2875		case "Category":
2876			if value != nil {
2877				jtv, ok := value.(string)
2878				if !ok {
2879					return fmt.Errorf("expected EntityType to be of type string, got %T instead", value)
2880				}
2881				sv.Category = types.EntityType(jtv)
2882			}
2883
2884		case "EndOffset":
2885			if value != nil {
2886				jtv, ok := value.(json.Number)
2887				if !ok {
2888					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
2889				}
2890				i64, err := jtv.Int64()
2891				if err != nil {
2892					return err
2893				}
2894				sv.EndOffset = ptr.Int32(int32(i64))
2895			}
2896
2897		case "Id":
2898			if value != nil {
2899				jtv, ok := value.(json.Number)
2900				if !ok {
2901					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
2902				}
2903				i64, err := jtv.Int64()
2904				if err != nil {
2905					return err
2906				}
2907				sv.Id = ptr.Int32(int32(i64))
2908			}
2909
2910		case "RelationshipScore":
2911			if value != nil {
2912				jtv, ok := value.(json.Number)
2913				if !ok {
2914					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
2915				}
2916				f64, err := jtv.Float64()
2917				if err != nil {
2918					return err
2919				}
2920				sv.RelationshipScore = ptr.Float32(float32(f64))
2921			}
2922
2923		case "RelationshipType":
2924			if value != nil {
2925				jtv, ok := value.(string)
2926				if !ok {
2927					return fmt.Errorf("expected RelationshipType to be of type string, got %T instead", value)
2928				}
2929				sv.RelationshipType = types.RelationshipType(jtv)
2930			}
2931
2932		case "Score":
2933			if value != nil {
2934				jtv, ok := value.(json.Number)
2935				if !ok {
2936					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
2937				}
2938				f64, err := jtv.Float64()
2939				if err != nil {
2940					return err
2941				}
2942				sv.Score = ptr.Float32(float32(f64))
2943			}
2944
2945		case "Text":
2946			if value != nil {
2947				jtv, ok := value.(string)
2948				if !ok {
2949					return fmt.Errorf("expected String to be of type string, got %T instead", value)
2950				}
2951				sv.Text = ptr.String(jtv)
2952			}
2953
2954		case "Traits":
2955			if err := awsAwsjson11_deserializeDocumentTraitList(&sv.Traits, value); err != nil {
2956				return err
2957			}
2958
2959		case "Type":
2960			if value != nil {
2961				jtv, ok := value.(string)
2962				if !ok {
2963					return fmt.Errorf("expected EntitySubType to be of type string, got %T instead", value)
2964				}
2965				sv.Type = types.EntitySubType(jtv)
2966			}
2967
2968		default:
2969			_, _ = key, value
2970
2971		}
2972	}
2973	*v = sv
2974	return nil
2975}
2976
2977func awsAwsjson11_deserializeDocumentAttributeList(v *[]types.Attribute, value interface{}) error {
2978	if v == nil {
2979		return fmt.Errorf("unexpected nil of type %T", v)
2980	}
2981	if value == nil {
2982		return nil
2983	}
2984
2985	shape, ok := value.([]interface{})
2986	if !ok {
2987		return fmt.Errorf("unexpected JSON type %v", value)
2988	}
2989
2990	var cv []types.Attribute
2991	if *v == nil {
2992		cv = []types.Attribute{}
2993	} else {
2994		cv = *v
2995	}
2996
2997	for _, value := range shape {
2998		var col types.Attribute
2999		destAddr := &col
3000		if err := awsAwsjson11_deserializeDocumentAttribute(&destAddr, value); err != nil {
3001			return err
3002		}
3003		col = *destAddr
3004		cv = append(cv, col)
3005
3006	}
3007	*v = cv
3008	return nil
3009}
3010
3011func awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobProperties(v **types.ComprehendMedicalAsyncJobProperties, value interface{}) error {
3012	if v == nil {
3013		return fmt.Errorf("unexpected nil of type %T", v)
3014	}
3015	if value == nil {
3016		return nil
3017	}
3018
3019	shape, ok := value.(map[string]interface{})
3020	if !ok {
3021		return fmt.Errorf("unexpected JSON type %v", value)
3022	}
3023
3024	var sv *types.ComprehendMedicalAsyncJobProperties
3025	if *v == nil {
3026		sv = &types.ComprehendMedicalAsyncJobProperties{}
3027	} else {
3028		sv = *v
3029	}
3030
3031	for key, value := range shape {
3032		switch key {
3033		case "DataAccessRoleArn":
3034			if value != nil {
3035				jtv, ok := value.(string)
3036				if !ok {
3037					return fmt.Errorf("expected IamRoleArn to be of type string, got %T instead", value)
3038				}
3039				sv.DataAccessRoleArn = ptr.String(jtv)
3040			}
3041
3042		case "EndTime":
3043			if value != nil {
3044				jtv, ok := value.(json.Number)
3045				if !ok {
3046					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
3047				}
3048				f64, err := jtv.Float64()
3049				if err != nil {
3050					return err
3051				}
3052				sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
3053			}
3054
3055		case "ExpirationTime":
3056			if value != nil {
3057				jtv, ok := value.(json.Number)
3058				if !ok {
3059					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
3060				}
3061				f64, err := jtv.Float64()
3062				if err != nil {
3063					return err
3064				}
3065				sv.ExpirationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
3066			}
3067
3068		case "InputDataConfig":
3069			if err := awsAwsjson11_deserializeDocumentInputDataConfig(&sv.InputDataConfig, value); err != nil {
3070				return err
3071			}
3072
3073		case "JobId":
3074			if value != nil {
3075				jtv, ok := value.(string)
3076				if !ok {
3077					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
3078				}
3079				sv.JobId = ptr.String(jtv)
3080			}
3081
3082		case "JobName":
3083			if value != nil {
3084				jtv, ok := value.(string)
3085				if !ok {
3086					return fmt.Errorf("expected JobName to be of type string, got %T instead", value)
3087				}
3088				sv.JobName = ptr.String(jtv)
3089			}
3090
3091		case "JobStatus":
3092			if value != nil {
3093				jtv, ok := value.(string)
3094				if !ok {
3095					return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value)
3096				}
3097				sv.JobStatus = types.JobStatus(jtv)
3098			}
3099
3100		case "KMSKey":
3101			if value != nil {
3102				jtv, ok := value.(string)
3103				if !ok {
3104					return fmt.Errorf("expected KMSKey to be of type string, got %T instead", value)
3105				}
3106				sv.KMSKey = ptr.String(jtv)
3107			}
3108
3109		case "LanguageCode":
3110			if value != nil {
3111				jtv, ok := value.(string)
3112				if !ok {
3113					return fmt.Errorf("expected LanguageCode to be of type string, got %T instead", value)
3114				}
3115				sv.LanguageCode = types.LanguageCode(jtv)
3116			}
3117
3118		case "ManifestFilePath":
3119			if value != nil {
3120				jtv, ok := value.(string)
3121				if !ok {
3122					return fmt.Errorf("expected ManifestFilePath to be of type string, got %T instead", value)
3123				}
3124				sv.ManifestFilePath = ptr.String(jtv)
3125			}
3126
3127		case "Message":
3128			if value != nil {
3129				jtv, ok := value.(string)
3130				if !ok {
3131					return fmt.Errorf("expected AnyLengthString to be of type string, got %T instead", value)
3132				}
3133				sv.Message = ptr.String(jtv)
3134			}
3135
3136		case "ModelVersion":
3137			if value != nil {
3138				jtv, ok := value.(string)
3139				if !ok {
3140					return fmt.Errorf("expected ModelVersion to be of type string, got %T instead", value)
3141				}
3142				sv.ModelVersion = ptr.String(jtv)
3143			}
3144
3145		case "OutputDataConfig":
3146			if err := awsAwsjson11_deserializeDocumentOutputDataConfig(&sv.OutputDataConfig, value); err != nil {
3147				return err
3148			}
3149
3150		case "SubmitTime":
3151			if value != nil {
3152				jtv, ok := value.(json.Number)
3153				if !ok {
3154					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
3155				}
3156				f64, err := jtv.Float64()
3157				if err != nil {
3158					return err
3159				}
3160				sv.SubmitTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
3161			}
3162
3163		default:
3164			_, _ = key, value
3165
3166		}
3167	}
3168	*v = sv
3169	return nil
3170}
3171
3172func awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobPropertiesList(v *[]types.ComprehendMedicalAsyncJobProperties, value interface{}) error {
3173	if v == nil {
3174		return fmt.Errorf("unexpected nil of type %T", v)
3175	}
3176	if value == nil {
3177		return nil
3178	}
3179
3180	shape, ok := value.([]interface{})
3181	if !ok {
3182		return fmt.Errorf("unexpected JSON type %v", value)
3183	}
3184
3185	var cv []types.ComprehendMedicalAsyncJobProperties
3186	if *v == nil {
3187		cv = []types.ComprehendMedicalAsyncJobProperties{}
3188	} else {
3189		cv = *v
3190	}
3191
3192	for _, value := range shape {
3193		var col types.ComprehendMedicalAsyncJobProperties
3194		destAddr := &col
3195		if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobProperties(&destAddr, value); err != nil {
3196			return err
3197		}
3198		col = *destAddr
3199		cv = append(cv, col)
3200
3201	}
3202	*v = cv
3203	return nil
3204}
3205
3206func awsAwsjson11_deserializeDocumentEntity(v **types.Entity, value interface{}) error {
3207	if v == nil {
3208		return fmt.Errorf("unexpected nil of type %T", v)
3209	}
3210	if value == nil {
3211		return nil
3212	}
3213
3214	shape, ok := value.(map[string]interface{})
3215	if !ok {
3216		return fmt.Errorf("unexpected JSON type %v", value)
3217	}
3218
3219	var sv *types.Entity
3220	if *v == nil {
3221		sv = &types.Entity{}
3222	} else {
3223		sv = *v
3224	}
3225
3226	for key, value := range shape {
3227		switch key {
3228		case "Attributes":
3229			if err := awsAwsjson11_deserializeDocumentAttributeList(&sv.Attributes, value); err != nil {
3230				return err
3231			}
3232
3233		case "BeginOffset":
3234			if value != nil {
3235				jtv, ok := value.(json.Number)
3236				if !ok {
3237					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3238				}
3239				i64, err := jtv.Int64()
3240				if err != nil {
3241					return err
3242				}
3243				sv.BeginOffset = ptr.Int32(int32(i64))
3244			}
3245
3246		case "Category":
3247			if value != nil {
3248				jtv, ok := value.(string)
3249				if !ok {
3250					return fmt.Errorf("expected EntityType to be of type string, got %T instead", value)
3251				}
3252				sv.Category = types.EntityType(jtv)
3253			}
3254
3255		case "EndOffset":
3256			if value != nil {
3257				jtv, ok := value.(json.Number)
3258				if !ok {
3259					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3260				}
3261				i64, err := jtv.Int64()
3262				if err != nil {
3263					return err
3264				}
3265				sv.EndOffset = ptr.Int32(int32(i64))
3266			}
3267
3268		case "Id":
3269			if value != nil {
3270				jtv, ok := value.(json.Number)
3271				if !ok {
3272					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3273				}
3274				i64, err := jtv.Int64()
3275				if err != nil {
3276					return err
3277				}
3278				sv.Id = ptr.Int32(int32(i64))
3279			}
3280
3281		case "Score":
3282			if value != nil {
3283				jtv, ok := value.(json.Number)
3284				if !ok {
3285					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
3286				}
3287				f64, err := jtv.Float64()
3288				if err != nil {
3289					return err
3290				}
3291				sv.Score = ptr.Float32(float32(f64))
3292			}
3293
3294		case "Text":
3295			if value != nil {
3296				jtv, ok := value.(string)
3297				if !ok {
3298					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3299				}
3300				sv.Text = ptr.String(jtv)
3301			}
3302
3303		case "Traits":
3304			if err := awsAwsjson11_deserializeDocumentTraitList(&sv.Traits, value); err != nil {
3305				return err
3306			}
3307
3308		case "Type":
3309			if value != nil {
3310				jtv, ok := value.(string)
3311				if !ok {
3312					return fmt.Errorf("expected EntitySubType to be of type string, got %T instead", value)
3313				}
3314				sv.Type = types.EntitySubType(jtv)
3315			}
3316
3317		default:
3318			_, _ = key, value
3319
3320		}
3321	}
3322	*v = sv
3323	return nil
3324}
3325
3326func awsAwsjson11_deserializeDocumentEntityList(v *[]types.Entity, value interface{}) error {
3327	if v == nil {
3328		return fmt.Errorf("unexpected nil of type %T", v)
3329	}
3330	if value == nil {
3331		return nil
3332	}
3333
3334	shape, ok := value.([]interface{})
3335	if !ok {
3336		return fmt.Errorf("unexpected JSON type %v", value)
3337	}
3338
3339	var cv []types.Entity
3340	if *v == nil {
3341		cv = []types.Entity{}
3342	} else {
3343		cv = *v
3344	}
3345
3346	for _, value := range shape {
3347		var col types.Entity
3348		destAddr := &col
3349		if err := awsAwsjson11_deserializeDocumentEntity(&destAddr, value); err != nil {
3350			return err
3351		}
3352		col = *destAddr
3353		cv = append(cv, col)
3354
3355	}
3356	*v = cv
3357	return nil
3358}
3359
3360func awsAwsjson11_deserializeDocumentICD10CMAttribute(v **types.ICD10CMAttribute, value interface{}) error {
3361	if v == nil {
3362		return fmt.Errorf("unexpected nil of type %T", v)
3363	}
3364	if value == nil {
3365		return nil
3366	}
3367
3368	shape, ok := value.(map[string]interface{})
3369	if !ok {
3370		return fmt.Errorf("unexpected JSON type %v", value)
3371	}
3372
3373	var sv *types.ICD10CMAttribute
3374	if *v == nil {
3375		sv = &types.ICD10CMAttribute{}
3376	} else {
3377		sv = *v
3378	}
3379
3380	for key, value := range shape {
3381		switch key {
3382		case "BeginOffset":
3383			if value != nil {
3384				jtv, ok := value.(json.Number)
3385				if !ok {
3386					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3387				}
3388				i64, err := jtv.Int64()
3389				if err != nil {
3390					return err
3391				}
3392				sv.BeginOffset = ptr.Int32(int32(i64))
3393			}
3394
3395		case "EndOffset":
3396			if value != nil {
3397				jtv, ok := value.(json.Number)
3398				if !ok {
3399					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3400				}
3401				i64, err := jtv.Int64()
3402				if err != nil {
3403					return err
3404				}
3405				sv.EndOffset = ptr.Int32(int32(i64))
3406			}
3407
3408		case "Id":
3409			if value != nil {
3410				jtv, ok := value.(json.Number)
3411				if !ok {
3412					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3413				}
3414				i64, err := jtv.Int64()
3415				if err != nil {
3416					return err
3417				}
3418				sv.Id = ptr.Int32(int32(i64))
3419			}
3420
3421		case "RelationshipScore":
3422			if value != nil {
3423				jtv, ok := value.(json.Number)
3424				if !ok {
3425					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
3426				}
3427				f64, err := jtv.Float64()
3428				if err != nil {
3429					return err
3430				}
3431				sv.RelationshipScore = ptr.Float32(float32(f64))
3432			}
3433
3434		case "Score":
3435			if value != nil {
3436				jtv, ok := value.(json.Number)
3437				if !ok {
3438					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
3439				}
3440				f64, err := jtv.Float64()
3441				if err != nil {
3442					return err
3443				}
3444				sv.Score = ptr.Float32(float32(f64))
3445			}
3446
3447		case "Text":
3448			if value != nil {
3449				jtv, ok := value.(string)
3450				if !ok {
3451					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3452				}
3453				sv.Text = ptr.String(jtv)
3454			}
3455
3456		case "Traits":
3457			if err := awsAwsjson11_deserializeDocumentICD10CMTraitList(&sv.Traits, value); err != nil {
3458				return err
3459			}
3460
3461		case "Type":
3462			if value != nil {
3463				jtv, ok := value.(string)
3464				if !ok {
3465					return fmt.Errorf("expected ICD10CMAttributeType to be of type string, got %T instead", value)
3466				}
3467				sv.Type = types.ICD10CMAttributeType(jtv)
3468			}
3469
3470		default:
3471			_, _ = key, value
3472
3473		}
3474	}
3475	*v = sv
3476	return nil
3477}
3478
3479func awsAwsjson11_deserializeDocumentICD10CMAttributeList(v *[]types.ICD10CMAttribute, value interface{}) error {
3480	if v == nil {
3481		return fmt.Errorf("unexpected nil of type %T", v)
3482	}
3483	if value == nil {
3484		return nil
3485	}
3486
3487	shape, ok := value.([]interface{})
3488	if !ok {
3489		return fmt.Errorf("unexpected JSON type %v", value)
3490	}
3491
3492	var cv []types.ICD10CMAttribute
3493	if *v == nil {
3494		cv = []types.ICD10CMAttribute{}
3495	} else {
3496		cv = *v
3497	}
3498
3499	for _, value := range shape {
3500		var col types.ICD10CMAttribute
3501		destAddr := &col
3502		if err := awsAwsjson11_deserializeDocumentICD10CMAttribute(&destAddr, value); err != nil {
3503			return err
3504		}
3505		col = *destAddr
3506		cv = append(cv, col)
3507
3508	}
3509	*v = cv
3510	return nil
3511}
3512
3513func awsAwsjson11_deserializeDocumentICD10CMConcept(v **types.ICD10CMConcept, value interface{}) error {
3514	if v == nil {
3515		return fmt.Errorf("unexpected nil of type %T", v)
3516	}
3517	if value == nil {
3518		return nil
3519	}
3520
3521	shape, ok := value.(map[string]interface{})
3522	if !ok {
3523		return fmt.Errorf("unexpected JSON type %v", value)
3524	}
3525
3526	var sv *types.ICD10CMConcept
3527	if *v == nil {
3528		sv = &types.ICD10CMConcept{}
3529	} else {
3530		sv = *v
3531	}
3532
3533	for key, value := range shape {
3534		switch key {
3535		case "Code":
3536			if value != nil {
3537				jtv, ok := value.(string)
3538				if !ok {
3539					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3540				}
3541				sv.Code = ptr.String(jtv)
3542			}
3543
3544		case "Description":
3545			if value != nil {
3546				jtv, ok := value.(string)
3547				if !ok {
3548					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3549				}
3550				sv.Description = ptr.String(jtv)
3551			}
3552
3553		case "Score":
3554			if value != nil {
3555				jtv, ok := value.(json.Number)
3556				if !ok {
3557					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
3558				}
3559				f64, err := jtv.Float64()
3560				if err != nil {
3561					return err
3562				}
3563				sv.Score = ptr.Float32(float32(f64))
3564			}
3565
3566		default:
3567			_, _ = key, value
3568
3569		}
3570	}
3571	*v = sv
3572	return nil
3573}
3574
3575func awsAwsjson11_deserializeDocumentICD10CMConceptList(v *[]types.ICD10CMConcept, value interface{}) error {
3576	if v == nil {
3577		return fmt.Errorf("unexpected nil of type %T", v)
3578	}
3579	if value == nil {
3580		return nil
3581	}
3582
3583	shape, ok := value.([]interface{})
3584	if !ok {
3585		return fmt.Errorf("unexpected JSON type %v", value)
3586	}
3587
3588	var cv []types.ICD10CMConcept
3589	if *v == nil {
3590		cv = []types.ICD10CMConcept{}
3591	} else {
3592		cv = *v
3593	}
3594
3595	for _, value := range shape {
3596		var col types.ICD10CMConcept
3597		destAddr := &col
3598		if err := awsAwsjson11_deserializeDocumentICD10CMConcept(&destAddr, value); err != nil {
3599			return err
3600		}
3601		col = *destAddr
3602		cv = append(cv, col)
3603
3604	}
3605	*v = cv
3606	return nil
3607}
3608
3609func awsAwsjson11_deserializeDocumentICD10CMEntity(v **types.ICD10CMEntity, value interface{}) error {
3610	if v == nil {
3611		return fmt.Errorf("unexpected nil of type %T", v)
3612	}
3613	if value == nil {
3614		return nil
3615	}
3616
3617	shape, ok := value.(map[string]interface{})
3618	if !ok {
3619		return fmt.Errorf("unexpected JSON type %v", value)
3620	}
3621
3622	var sv *types.ICD10CMEntity
3623	if *v == nil {
3624		sv = &types.ICD10CMEntity{}
3625	} else {
3626		sv = *v
3627	}
3628
3629	for key, value := range shape {
3630		switch key {
3631		case "Attributes":
3632			if err := awsAwsjson11_deserializeDocumentICD10CMAttributeList(&sv.Attributes, value); err != nil {
3633				return err
3634			}
3635
3636		case "BeginOffset":
3637			if value != nil {
3638				jtv, ok := value.(json.Number)
3639				if !ok {
3640					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3641				}
3642				i64, err := jtv.Int64()
3643				if err != nil {
3644					return err
3645				}
3646				sv.BeginOffset = ptr.Int32(int32(i64))
3647			}
3648
3649		case "Category":
3650			if value != nil {
3651				jtv, ok := value.(string)
3652				if !ok {
3653					return fmt.Errorf("expected ICD10CMEntityCategory to be of type string, got %T instead", value)
3654				}
3655				sv.Category = types.ICD10CMEntityCategory(jtv)
3656			}
3657
3658		case "EndOffset":
3659			if value != nil {
3660				jtv, ok := value.(json.Number)
3661				if !ok {
3662					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3663				}
3664				i64, err := jtv.Int64()
3665				if err != nil {
3666					return err
3667				}
3668				sv.EndOffset = ptr.Int32(int32(i64))
3669			}
3670
3671		case "ICD10CMConcepts":
3672			if err := awsAwsjson11_deserializeDocumentICD10CMConceptList(&sv.ICD10CMConcepts, value); err != nil {
3673				return err
3674			}
3675
3676		case "Id":
3677			if value != nil {
3678				jtv, ok := value.(json.Number)
3679				if !ok {
3680					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
3681				}
3682				i64, err := jtv.Int64()
3683				if err != nil {
3684					return err
3685				}
3686				sv.Id = ptr.Int32(int32(i64))
3687			}
3688
3689		case "Score":
3690			if value != nil {
3691				jtv, ok := value.(json.Number)
3692				if !ok {
3693					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
3694				}
3695				f64, err := jtv.Float64()
3696				if err != nil {
3697					return err
3698				}
3699				sv.Score = ptr.Float32(float32(f64))
3700			}
3701
3702		case "Text":
3703			if value != nil {
3704				jtv, ok := value.(string)
3705				if !ok {
3706					return fmt.Errorf("expected OntologyLinkingBoundedLengthString to be of type string, got %T instead", value)
3707				}
3708				sv.Text = ptr.String(jtv)
3709			}
3710
3711		case "Traits":
3712			if err := awsAwsjson11_deserializeDocumentICD10CMTraitList(&sv.Traits, value); err != nil {
3713				return err
3714			}
3715
3716		case "Type":
3717			if value != nil {
3718				jtv, ok := value.(string)
3719				if !ok {
3720					return fmt.Errorf("expected ICD10CMEntityType to be of type string, got %T instead", value)
3721				}
3722				sv.Type = types.ICD10CMEntityType(jtv)
3723			}
3724
3725		default:
3726			_, _ = key, value
3727
3728		}
3729	}
3730	*v = sv
3731	return nil
3732}
3733
3734func awsAwsjson11_deserializeDocumentICD10CMEntityList(v *[]types.ICD10CMEntity, value interface{}) error {
3735	if v == nil {
3736		return fmt.Errorf("unexpected nil of type %T", v)
3737	}
3738	if value == nil {
3739		return nil
3740	}
3741
3742	shape, ok := value.([]interface{})
3743	if !ok {
3744		return fmt.Errorf("unexpected JSON type %v", value)
3745	}
3746
3747	var cv []types.ICD10CMEntity
3748	if *v == nil {
3749		cv = []types.ICD10CMEntity{}
3750	} else {
3751		cv = *v
3752	}
3753
3754	for _, value := range shape {
3755		var col types.ICD10CMEntity
3756		destAddr := &col
3757		if err := awsAwsjson11_deserializeDocumentICD10CMEntity(&destAddr, value); err != nil {
3758			return err
3759		}
3760		col = *destAddr
3761		cv = append(cv, col)
3762
3763	}
3764	*v = cv
3765	return nil
3766}
3767
3768func awsAwsjson11_deserializeDocumentICD10CMTrait(v **types.ICD10CMTrait, value interface{}) error {
3769	if v == nil {
3770		return fmt.Errorf("unexpected nil of type %T", v)
3771	}
3772	if value == nil {
3773		return nil
3774	}
3775
3776	shape, ok := value.(map[string]interface{})
3777	if !ok {
3778		return fmt.Errorf("unexpected JSON type %v", value)
3779	}
3780
3781	var sv *types.ICD10CMTrait
3782	if *v == nil {
3783		sv = &types.ICD10CMTrait{}
3784	} else {
3785		sv = *v
3786	}
3787
3788	for key, value := range shape {
3789		switch key {
3790		case "Name":
3791			if value != nil {
3792				jtv, ok := value.(string)
3793				if !ok {
3794					return fmt.Errorf("expected ICD10CMTraitName to be of type string, got %T instead", value)
3795				}
3796				sv.Name = types.ICD10CMTraitName(jtv)
3797			}
3798
3799		case "Score":
3800			if value != nil {
3801				jtv, ok := value.(json.Number)
3802				if !ok {
3803					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
3804				}
3805				f64, err := jtv.Float64()
3806				if err != nil {
3807					return err
3808				}
3809				sv.Score = ptr.Float32(float32(f64))
3810			}
3811
3812		default:
3813			_, _ = key, value
3814
3815		}
3816	}
3817	*v = sv
3818	return nil
3819}
3820
3821func awsAwsjson11_deserializeDocumentICD10CMTraitList(v *[]types.ICD10CMTrait, value interface{}) error {
3822	if v == nil {
3823		return fmt.Errorf("unexpected nil of type %T", v)
3824	}
3825	if value == nil {
3826		return nil
3827	}
3828
3829	shape, ok := value.([]interface{})
3830	if !ok {
3831		return fmt.Errorf("unexpected JSON type %v", value)
3832	}
3833
3834	var cv []types.ICD10CMTrait
3835	if *v == nil {
3836		cv = []types.ICD10CMTrait{}
3837	} else {
3838		cv = *v
3839	}
3840
3841	for _, value := range shape {
3842		var col types.ICD10CMTrait
3843		destAddr := &col
3844		if err := awsAwsjson11_deserializeDocumentICD10CMTrait(&destAddr, value); err != nil {
3845			return err
3846		}
3847		col = *destAddr
3848		cv = append(cv, col)
3849
3850	}
3851	*v = cv
3852	return nil
3853}
3854
3855func awsAwsjson11_deserializeDocumentInputDataConfig(v **types.InputDataConfig, value interface{}) error {
3856	if v == nil {
3857		return fmt.Errorf("unexpected nil of type %T", v)
3858	}
3859	if value == nil {
3860		return nil
3861	}
3862
3863	shape, ok := value.(map[string]interface{})
3864	if !ok {
3865		return fmt.Errorf("unexpected JSON type %v", value)
3866	}
3867
3868	var sv *types.InputDataConfig
3869	if *v == nil {
3870		sv = &types.InputDataConfig{}
3871	} else {
3872		sv = *v
3873	}
3874
3875	for key, value := range shape {
3876		switch key {
3877		case "S3Bucket":
3878			if value != nil {
3879				jtv, ok := value.(string)
3880				if !ok {
3881					return fmt.Errorf("expected S3Bucket to be of type string, got %T instead", value)
3882				}
3883				sv.S3Bucket = ptr.String(jtv)
3884			}
3885
3886		case "S3Key":
3887			if value != nil {
3888				jtv, ok := value.(string)
3889				if !ok {
3890					return fmt.Errorf("expected S3Key to be of type string, got %T instead", value)
3891				}
3892				sv.S3Key = ptr.String(jtv)
3893			}
3894
3895		default:
3896			_, _ = key, value
3897
3898		}
3899	}
3900	*v = sv
3901	return nil
3902}
3903
3904func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error {
3905	if v == nil {
3906		return fmt.Errorf("unexpected nil of type %T", v)
3907	}
3908	if value == nil {
3909		return nil
3910	}
3911
3912	shape, ok := value.(map[string]interface{})
3913	if !ok {
3914		return fmt.Errorf("unexpected JSON type %v", value)
3915	}
3916
3917	var sv *types.InternalServerException
3918	if *v == nil {
3919		sv = &types.InternalServerException{}
3920	} else {
3921		sv = *v
3922	}
3923
3924	for key, value := range shape {
3925		switch key {
3926		case "Message":
3927			if value != nil {
3928				jtv, ok := value.(string)
3929				if !ok {
3930					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3931				}
3932				sv.Message = ptr.String(jtv)
3933			}
3934
3935		default:
3936			_, _ = key, value
3937
3938		}
3939	}
3940	*v = sv
3941	return nil
3942}
3943
3944func awsAwsjson11_deserializeDocumentInvalidEncodingException(v **types.InvalidEncodingException, value interface{}) error {
3945	if v == nil {
3946		return fmt.Errorf("unexpected nil of type %T", v)
3947	}
3948	if value == nil {
3949		return nil
3950	}
3951
3952	shape, ok := value.(map[string]interface{})
3953	if !ok {
3954		return fmt.Errorf("unexpected JSON type %v", value)
3955	}
3956
3957	var sv *types.InvalidEncodingException
3958	if *v == nil {
3959		sv = &types.InvalidEncodingException{}
3960	} else {
3961		sv = *v
3962	}
3963
3964	for key, value := range shape {
3965		switch key {
3966		case "Message":
3967			if value != nil {
3968				jtv, ok := value.(string)
3969				if !ok {
3970					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3971				}
3972				sv.Message = ptr.String(jtv)
3973			}
3974
3975		default:
3976			_, _ = key, value
3977
3978		}
3979	}
3980	*v = sv
3981	return nil
3982}
3983
3984func awsAwsjson11_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error {
3985	if v == nil {
3986		return fmt.Errorf("unexpected nil of type %T", v)
3987	}
3988	if value == nil {
3989		return nil
3990	}
3991
3992	shape, ok := value.(map[string]interface{})
3993	if !ok {
3994		return fmt.Errorf("unexpected JSON type %v", value)
3995	}
3996
3997	var sv *types.InvalidRequestException
3998	if *v == nil {
3999		sv = &types.InvalidRequestException{}
4000	} else {
4001		sv = *v
4002	}
4003
4004	for key, value := range shape {
4005		switch key {
4006		case "Message":
4007			if value != nil {
4008				jtv, ok := value.(string)
4009				if !ok {
4010					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4011				}
4012				sv.Message = ptr.String(jtv)
4013			}
4014
4015		default:
4016			_, _ = key, value
4017
4018		}
4019	}
4020	*v = sv
4021	return nil
4022}
4023
4024func awsAwsjson11_deserializeDocumentOutputDataConfig(v **types.OutputDataConfig, value interface{}) error {
4025	if v == nil {
4026		return fmt.Errorf("unexpected nil of type %T", v)
4027	}
4028	if value == nil {
4029		return nil
4030	}
4031
4032	shape, ok := value.(map[string]interface{})
4033	if !ok {
4034		return fmt.Errorf("unexpected JSON type %v", value)
4035	}
4036
4037	var sv *types.OutputDataConfig
4038	if *v == nil {
4039		sv = &types.OutputDataConfig{}
4040	} else {
4041		sv = *v
4042	}
4043
4044	for key, value := range shape {
4045		switch key {
4046		case "S3Bucket":
4047			if value != nil {
4048				jtv, ok := value.(string)
4049				if !ok {
4050					return fmt.Errorf("expected S3Bucket to be of type string, got %T instead", value)
4051				}
4052				sv.S3Bucket = ptr.String(jtv)
4053			}
4054
4055		case "S3Key":
4056			if value != nil {
4057				jtv, ok := value.(string)
4058				if !ok {
4059					return fmt.Errorf("expected S3Key to be of type string, got %T instead", value)
4060				}
4061				sv.S3Key = ptr.String(jtv)
4062			}
4063
4064		default:
4065			_, _ = key, value
4066
4067		}
4068	}
4069	*v = sv
4070	return nil
4071}
4072
4073func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error {
4074	if v == nil {
4075		return fmt.Errorf("unexpected nil of type %T", v)
4076	}
4077	if value == nil {
4078		return nil
4079	}
4080
4081	shape, ok := value.(map[string]interface{})
4082	if !ok {
4083		return fmt.Errorf("unexpected JSON type %v", value)
4084	}
4085
4086	var sv *types.ResourceNotFoundException
4087	if *v == nil {
4088		sv = &types.ResourceNotFoundException{}
4089	} else {
4090		sv = *v
4091	}
4092
4093	for key, value := range shape {
4094		switch key {
4095		case "Message":
4096			if value != nil {
4097				jtv, ok := value.(string)
4098				if !ok {
4099					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4100				}
4101				sv.Message = ptr.String(jtv)
4102			}
4103
4104		default:
4105			_, _ = key, value
4106
4107		}
4108	}
4109	*v = sv
4110	return nil
4111}
4112
4113func awsAwsjson11_deserializeDocumentRxNormAttribute(v **types.RxNormAttribute, value interface{}) error {
4114	if v == nil {
4115		return fmt.Errorf("unexpected nil of type %T", v)
4116	}
4117	if value == nil {
4118		return nil
4119	}
4120
4121	shape, ok := value.(map[string]interface{})
4122	if !ok {
4123		return fmt.Errorf("unexpected JSON type %v", value)
4124	}
4125
4126	var sv *types.RxNormAttribute
4127	if *v == nil {
4128		sv = &types.RxNormAttribute{}
4129	} else {
4130		sv = *v
4131	}
4132
4133	for key, value := range shape {
4134		switch key {
4135		case "BeginOffset":
4136			if value != nil {
4137				jtv, ok := value.(json.Number)
4138				if !ok {
4139					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
4140				}
4141				i64, err := jtv.Int64()
4142				if err != nil {
4143					return err
4144				}
4145				sv.BeginOffset = ptr.Int32(int32(i64))
4146			}
4147
4148		case "EndOffset":
4149			if value != nil {
4150				jtv, ok := value.(json.Number)
4151				if !ok {
4152					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
4153				}
4154				i64, err := jtv.Int64()
4155				if err != nil {
4156					return err
4157				}
4158				sv.EndOffset = ptr.Int32(int32(i64))
4159			}
4160
4161		case "Id":
4162			if value != nil {
4163				jtv, ok := value.(json.Number)
4164				if !ok {
4165					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
4166				}
4167				i64, err := jtv.Int64()
4168				if err != nil {
4169					return err
4170				}
4171				sv.Id = ptr.Int32(int32(i64))
4172			}
4173
4174		case "RelationshipScore":
4175			if value != nil {
4176				jtv, ok := value.(json.Number)
4177				if !ok {
4178					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
4179				}
4180				f64, err := jtv.Float64()
4181				if err != nil {
4182					return err
4183				}
4184				sv.RelationshipScore = ptr.Float32(float32(f64))
4185			}
4186
4187		case "Score":
4188			if value != nil {
4189				jtv, ok := value.(json.Number)
4190				if !ok {
4191					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
4192				}
4193				f64, err := jtv.Float64()
4194				if err != nil {
4195					return err
4196				}
4197				sv.Score = ptr.Float32(float32(f64))
4198			}
4199
4200		case "Text":
4201			if value != nil {
4202				jtv, ok := value.(string)
4203				if !ok {
4204					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4205				}
4206				sv.Text = ptr.String(jtv)
4207			}
4208
4209		case "Traits":
4210			if err := awsAwsjson11_deserializeDocumentRxNormTraitList(&sv.Traits, value); err != nil {
4211				return err
4212			}
4213
4214		case "Type":
4215			if value != nil {
4216				jtv, ok := value.(string)
4217				if !ok {
4218					return fmt.Errorf("expected RxNormAttributeType to be of type string, got %T instead", value)
4219				}
4220				sv.Type = types.RxNormAttributeType(jtv)
4221			}
4222
4223		default:
4224			_, _ = key, value
4225
4226		}
4227	}
4228	*v = sv
4229	return nil
4230}
4231
4232func awsAwsjson11_deserializeDocumentRxNormAttributeList(v *[]types.RxNormAttribute, value interface{}) error {
4233	if v == nil {
4234		return fmt.Errorf("unexpected nil of type %T", v)
4235	}
4236	if value == nil {
4237		return nil
4238	}
4239
4240	shape, ok := value.([]interface{})
4241	if !ok {
4242		return fmt.Errorf("unexpected JSON type %v", value)
4243	}
4244
4245	var cv []types.RxNormAttribute
4246	if *v == nil {
4247		cv = []types.RxNormAttribute{}
4248	} else {
4249		cv = *v
4250	}
4251
4252	for _, value := range shape {
4253		var col types.RxNormAttribute
4254		destAddr := &col
4255		if err := awsAwsjson11_deserializeDocumentRxNormAttribute(&destAddr, value); err != nil {
4256			return err
4257		}
4258		col = *destAddr
4259		cv = append(cv, col)
4260
4261	}
4262	*v = cv
4263	return nil
4264}
4265
4266func awsAwsjson11_deserializeDocumentRxNormConcept(v **types.RxNormConcept, value interface{}) error {
4267	if v == nil {
4268		return fmt.Errorf("unexpected nil of type %T", v)
4269	}
4270	if value == nil {
4271		return nil
4272	}
4273
4274	shape, ok := value.(map[string]interface{})
4275	if !ok {
4276		return fmt.Errorf("unexpected JSON type %v", value)
4277	}
4278
4279	var sv *types.RxNormConcept
4280	if *v == nil {
4281		sv = &types.RxNormConcept{}
4282	} else {
4283		sv = *v
4284	}
4285
4286	for key, value := range shape {
4287		switch key {
4288		case "Code":
4289			if value != nil {
4290				jtv, ok := value.(string)
4291				if !ok {
4292					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4293				}
4294				sv.Code = ptr.String(jtv)
4295			}
4296
4297		case "Description":
4298			if value != nil {
4299				jtv, ok := value.(string)
4300				if !ok {
4301					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4302				}
4303				sv.Description = ptr.String(jtv)
4304			}
4305
4306		case "Score":
4307			if value != nil {
4308				jtv, ok := value.(json.Number)
4309				if !ok {
4310					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
4311				}
4312				f64, err := jtv.Float64()
4313				if err != nil {
4314					return err
4315				}
4316				sv.Score = ptr.Float32(float32(f64))
4317			}
4318
4319		default:
4320			_, _ = key, value
4321
4322		}
4323	}
4324	*v = sv
4325	return nil
4326}
4327
4328func awsAwsjson11_deserializeDocumentRxNormConceptList(v *[]types.RxNormConcept, value interface{}) error {
4329	if v == nil {
4330		return fmt.Errorf("unexpected nil of type %T", v)
4331	}
4332	if value == nil {
4333		return nil
4334	}
4335
4336	shape, ok := value.([]interface{})
4337	if !ok {
4338		return fmt.Errorf("unexpected JSON type %v", value)
4339	}
4340
4341	var cv []types.RxNormConcept
4342	if *v == nil {
4343		cv = []types.RxNormConcept{}
4344	} else {
4345		cv = *v
4346	}
4347
4348	for _, value := range shape {
4349		var col types.RxNormConcept
4350		destAddr := &col
4351		if err := awsAwsjson11_deserializeDocumentRxNormConcept(&destAddr, value); err != nil {
4352			return err
4353		}
4354		col = *destAddr
4355		cv = append(cv, col)
4356
4357	}
4358	*v = cv
4359	return nil
4360}
4361
4362func awsAwsjson11_deserializeDocumentRxNormEntity(v **types.RxNormEntity, value interface{}) error {
4363	if v == nil {
4364		return fmt.Errorf("unexpected nil of type %T", v)
4365	}
4366	if value == nil {
4367		return nil
4368	}
4369
4370	shape, ok := value.(map[string]interface{})
4371	if !ok {
4372		return fmt.Errorf("unexpected JSON type %v", value)
4373	}
4374
4375	var sv *types.RxNormEntity
4376	if *v == nil {
4377		sv = &types.RxNormEntity{}
4378	} else {
4379		sv = *v
4380	}
4381
4382	for key, value := range shape {
4383		switch key {
4384		case "Attributes":
4385			if err := awsAwsjson11_deserializeDocumentRxNormAttributeList(&sv.Attributes, value); err != nil {
4386				return err
4387			}
4388
4389		case "BeginOffset":
4390			if value != nil {
4391				jtv, ok := value.(json.Number)
4392				if !ok {
4393					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
4394				}
4395				i64, err := jtv.Int64()
4396				if err != nil {
4397					return err
4398				}
4399				sv.BeginOffset = ptr.Int32(int32(i64))
4400			}
4401
4402		case "Category":
4403			if value != nil {
4404				jtv, ok := value.(string)
4405				if !ok {
4406					return fmt.Errorf("expected RxNormEntityCategory to be of type string, got %T instead", value)
4407				}
4408				sv.Category = types.RxNormEntityCategory(jtv)
4409			}
4410
4411		case "EndOffset":
4412			if value != nil {
4413				jtv, ok := value.(json.Number)
4414				if !ok {
4415					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
4416				}
4417				i64, err := jtv.Int64()
4418				if err != nil {
4419					return err
4420				}
4421				sv.EndOffset = ptr.Int32(int32(i64))
4422			}
4423
4424		case "Id":
4425			if value != nil {
4426				jtv, ok := value.(json.Number)
4427				if !ok {
4428					return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
4429				}
4430				i64, err := jtv.Int64()
4431				if err != nil {
4432					return err
4433				}
4434				sv.Id = ptr.Int32(int32(i64))
4435			}
4436
4437		case "RxNormConcepts":
4438			if err := awsAwsjson11_deserializeDocumentRxNormConceptList(&sv.RxNormConcepts, value); err != nil {
4439				return err
4440			}
4441
4442		case "Score":
4443			if value != nil {
4444				jtv, ok := value.(json.Number)
4445				if !ok {
4446					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
4447				}
4448				f64, err := jtv.Float64()
4449				if err != nil {
4450					return err
4451				}
4452				sv.Score = ptr.Float32(float32(f64))
4453			}
4454
4455		case "Text":
4456			if value != nil {
4457				jtv, ok := value.(string)
4458				if !ok {
4459					return fmt.Errorf("expected OntologyLinkingBoundedLengthString to be of type string, got %T instead", value)
4460				}
4461				sv.Text = ptr.String(jtv)
4462			}
4463
4464		case "Traits":
4465			if err := awsAwsjson11_deserializeDocumentRxNormTraitList(&sv.Traits, value); err != nil {
4466				return err
4467			}
4468
4469		case "Type":
4470			if value != nil {
4471				jtv, ok := value.(string)
4472				if !ok {
4473					return fmt.Errorf("expected RxNormEntityType to be of type string, got %T instead", value)
4474				}
4475				sv.Type = types.RxNormEntityType(jtv)
4476			}
4477
4478		default:
4479			_, _ = key, value
4480
4481		}
4482	}
4483	*v = sv
4484	return nil
4485}
4486
4487func awsAwsjson11_deserializeDocumentRxNormEntityList(v *[]types.RxNormEntity, value interface{}) error {
4488	if v == nil {
4489		return fmt.Errorf("unexpected nil of type %T", v)
4490	}
4491	if value == nil {
4492		return nil
4493	}
4494
4495	shape, ok := value.([]interface{})
4496	if !ok {
4497		return fmt.Errorf("unexpected JSON type %v", value)
4498	}
4499
4500	var cv []types.RxNormEntity
4501	if *v == nil {
4502		cv = []types.RxNormEntity{}
4503	} else {
4504		cv = *v
4505	}
4506
4507	for _, value := range shape {
4508		var col types.RxNormEntity
4509		destAddr := &col
4510		if err := awsAwsjson11_deserializeDocumentRxNormEntity(&destAddr, value); err != nil {
4511			return err
4512		}
4513		col = *destAddr
4514		cv = append(cv, col)
4515
4516	}
4517	*v = cv
4518	return nil
4519}
4520
4521func awsAwsjson11_deserializeDocumentRxNormTrait(v **types.RxNormTrait, value interface{}) error {
4522	if v == nil {
4523		return fmt.Errorf("unexpected nil of type %T", v)
4524	}
4525	if value == nil {
4526		return nil
4527	}
4528
4529	shape, ok := value.(map[string]interface{})
4530	if !ok {
4531		return fmt.Errorf("unexpected JSON type %v", value)
4532	}
4533
4534	var sv *types.RxNormTrait
4535	if *v == nil {
4536		sv = &types.RxNormTrait{}
4537	} else {
4538		sv = *v
4539	}
4540
4541	for key, value := range shape {
4542		switch key {
4543		case "Name":
4544			if value != nil {
4545				jtv, ok := value.(string)
4546				if !ok {
4547					return fmt.Errorf("expected RxNormTraitName to be of type string, got %T instead", value)
4548				}
4549				sv.Name = types.RxNormTraitName(jtv)
4550			}
4551
4552		case "Score":
4553			if value != nil {
4554				jtv, ok := value.(json.Number)
4555				if !ok {
4556					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
4557				}
4558				f64, err := jtv.Float64()
4559				if err != nil {
4560					return err
4561				}
4562				sv.Score = ptr.Float32(float32(f64))
4563			}
4564
4565		default:
4566			_, _ = key, value
4567
4568		}
4569	}
4570	*v = sv
4571	return nil
4572}
4573
4574func awsAwsjson11_deserializeDocumentRxNormTraitList(v *[]types.RxNormTrait, value interface{}) error {
4575	if v == nil {
4576		return fmt.Errorf("unexpected nil of type %T", v)
4577	}
4578	if value == nil {
4579		return nil
4580	}
4581
4582	shape, ok := value.([]interface{})
4583	if !ok {
4584		return fmt.Errorf("unexpected JSON type %v", value)
4585	}
4586
4587	var cv []types.RxNormTrait
4588	if *v == nil {
4589		cv = []types.RxNormTrait{}
4590	} else {
4591		cv = *v
4592	}
4593
4594	for _, value := range shape {
4595		var col types.RxNormTrait
4596		destAddr := &col
4597		if err := awsAwsjson11_deserializeDocumentRxNormTrait(&destAddr, value); err != nil {
4598			return err
4599		}
4600		col = *destAddr
4601		cv = append(cv, col)
4602
4603	}
4604	*v = cv
4605	return nil
4606}
4607
4608func awsAwsjson11_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error {
4609	if v == nil {
4610		return fmt.Errorf("unexpected nil of type %T", v)
4611	}
4612	if value == nil {
4613		return nil
4614	}
4615
4616	shape, ok := value.(map[string]interface{})
4617	if !ok {
4618		return fmt.Errorf("unexpected JSON type %v", value)
4619	}
4620
4621	var sv *types.ServiceUnavailableException
4622	if *v == nil {
4623		sv = &types.ServiceUnavailableException{}
4624	} else {
4625		sv = *v
4626	}
4627
4628	for key, value := range shape {
4629		switch key {
4630		case "Message":
4631			if value != nil {
4632				jtv, ok := value.(string)
4633				if !ok {
4634					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4635				}
4636				sv.Message = ptr.String(jtv)
4637			}
4638
4639		default:
4640			_, _ = key, value
4641
4642		}
4643	}
4644	*v = sv
4645	return nil
4646}
4647
4648func awsAwsjson11_deserializeDocumentTextSizeLimitExceededException(v **types.TextSizeLimitExceededException, value interface{}) error {
4649	if v == nil {
4650		return fmt.Errorf("unexpected nil of type %T", v)
4651	}
4652	if value == nil {
4653		return nil
4654	}
4655
4656	shape, ok := value.(map[string]interface{})
4657	if !ok {
4658		return fmt.Errorf("unexpected JSON type %v", value)
4659	}
4660
4661	var sv *types.TextSizeLimitExceededException
4662	if *v == nil {
4663		sv = &types.TextSizeLimitExceededException{}
4664	} else {
4665		sv = *v
4666	}
4667
4668	for key, value := range shape {
4669		switch key {
4670		case "Message":
4671			if value != nil {
4672				jtv, ok := value.(string)
4673				if !ok {
4674					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4675				}
4676				sv.Message = ptr.String(jtv)
4677			}
4678
4679		default:
4680			_, _ = key, value
4681
4682		}
4683	}
4684	*v = sv
4685	return nil
4686}
4687
4688func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error {
4689	if v == nil {
4690		return fmt.Errorf("unexpected nil of type %T", v)
4691	}
4692	if value == nil {
4693		return nil
4694	}
4695
4696	shape, ok := value.(map[string]interface{})
4697	if !ok {
4698		return fmt.Errorf("unexpected JSON type %v", value)
4699	}
4700
4701	var sv *types.TooManyRequestsException
4702	if *v == nil {
4703		sv = &types.TooManyRequestsException{}
4704	} else {
4705		sv = *v
4706	}
4707
4708	for key, value := range shape {
4709		switch key {
4710		case "Message":
4711			if value != nil {
4712				jtv, ok := value.(string)
4713				if !ok {
4714					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4715				}
4716				sv.Message = ptr.String(jtv)
4717			}
4718
4719		default:
4720			_, _ = key, value
4721
4722		}
4723	}
4724	*v = sv
4725	return nil
4726}
4727
4728func awsAwsjson11_deserializeDocumentTrait(v **types.Trait, value interface{}) error {
4729	if v == nil {
4730		return fmt.Errorf("unexpected nil of type %T", v)
4731	}
4732	if value == nil {
4733		return nil
4734	}
4735
4736	shape, ok := value.(map[string]interface{})
4737	if !ok {
4738		return fmt.Errorf("unexpected JSON type %v", value)
4739	}
4740
4741	var sv *types.Trait
4742	if *v == nil {
4743		sv = &types.Trait{}
4744	} else {
4745		sv = *v
4746	}
4747
4748	for key, value := range shape {
4749		switch key {
4750		case "Name":
4751			if value != nil {
4752				jtv, ok := value.(string)
4753				if !ok {
4754					return fmt.Errorf("expected AttributeName to be of type string, got %T instead", value)
4755				}
4756				sv.Name = types.AttributeName(jtv)
4757			}
4758
4759		case "Score":
4760			if value != nil {
4761				jtv, ok := value.(json.Number)
4762				if !ok {
4763					return fmt.Errorf("expected Float to be json.Number, got %T instead", value)
4764				}
4765				f64, err := jtv.Float64()
4766				if err != nil {
4767					return err
4768				}
4769				sv.Score = ptr.Float32(float32(f64))
4770			}
4771
4772		default:
4773			_, _ = key, value
4774
4775		}
4776	}
4777	*v = sv
4778	return nil
4779}
4780
4781func awsAwsjson11_deserializeDocumentTraitList(v *[]types.Trait, value interface{}) error {
4782	if v == nil {
4783		return fmt.Errorf("unexpected nil of type %T", v)
4784	}
4785	if value == nil {
4786		return nil
4787	}
4788
4789	shape, ok := value.([]interface{})
4790	if !ok {
4791		return fmt.Errorf("unexpected JSON type %v", value)
4792	}
4793
4794	var cv []types.Trait
4795	if *v == nil {
4796		cv = []types.Trait{}
4797	} else {
4798		cv = *v
4799	}
4800
4801	for _, value := range shape {
4802		var col types.Trait
4803		destAddr := &col
4804		if err := awsAwsjson11_deserializeDocumentTrait(&destAddr, value); err != nil {
4805			return err
4806		}
4807		col = *destAddr
4808		cv = append(cv, col)
4809
4810	}
4811	*v = cv
4812	return nil
4813}
4814
4815func awsAwsjson11_deserializeDocumentUnmappedAttribute(v **types.UnmappedAttribute, value interface{}) error {
4816	if v == nil {
4817		return fmt.Errorf("unexpected nil of type %T", v)
4818	}
4819	if value == nil {
4820		return nil
4821	}
4822
4823	shape, ok := value.(map[string]interface{})
4824	if !ok {
4825		return fmt.Errorf("unexpected JSON type %v", value)
4826	}
4827
4828	var sv *types.UnmappedAttribute
4829	if *v == nil {
4830		sv = &types.UnmappedAttribute{}
4831	} else {
4832		sv = *v
4833	}
4834
4835	for key, value := range shape {
4836		switch key {
4837		case "Attribute":
4838			if err := awsAwsjson11_deserializeDocumentAttribute(&sv.Attribute, value); err != nil {
4839				return err
4840			}
4841
4842		case "Type":
4843			if value != nil {
4844				jtv, ok := value.(string)
4845				if !ok {
4846					return fmt.Errorf("expected EntityType to be of type string, got %T instead", value)
4847				}
4848				sv.Type = types.EntityType(jtv)
4849			}
4850
4851		default:
4852			_, _ = key, value
4853
4854		}
4855	}
4856	*v = sv
4857	return nil
4858}
4859
4860func awsAwsjson11_deserializeDocumentUnmappedAttributeList(v *[]types.UnmappedAttribute, value interface{}) error {
4861	if v == nil {
4862		return fmt.Errorf("unexpected nil of type %T", v)
4863	}
4864	if value == nil {
4865		return nil
4866	}
4867
4868	shape, ok := value.([]interface{})
4869	if !ok {
4870		return fmt.Errorf("unexpected JSON type %v", value)
4871	}
4872
4873	var cv []types.UnmappedAttribute
4874	if *v == nil {
4875		cv = []types.UnmappedAttribute{}
4876	} else {
4877		cv = *v
4878	}
4879
4880	for _, value := range shape {
4881		var col types.UnmappedAttribute
4882		destAddr := &col
4883		if err := awsAwsjson11_deserializeDocumentUnmappedAttribute(&destAddr, value); err != nil {
4884			return err
4885		}
4886		col = *destAddr
4887		cv = append(cv, col)
4888
4889	}
4890	*v = cv
4891	return nil
4892}
4893
4894func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error {
4895	if v == nil {
4896		return fmt.Errorf("unexpected nil of type %T", v)
4897	}
4898	if value == nil {
4899		return nil
4900	}
4901
4902	shape, ok := value.(map[string]interface{})
4903	if !ok {
4904		return fmt.Errorf("unexpected JSON type %v", value)
4905	}
4906
4907	var sv *types.ValidationException
4908	if *v == nil {
4909		sv = &types.ValidationException{}
4910	} else {
4911		sv = *v
4912	}
4913
4914	for key, value := range shape {
4915		switch key {
4916		case "Message":
4917			if value != nil {
4918				jtv, ok := value.(string)
4919				if !ok {
4920					return fmt.Errorf("expected String to be of type string, got %T instead", value)
4921				}
4922				sv.Message = ptr.String(jtv)
4923			}
4924
4925		default:
4926			_, _ = key, value
4927
4928		}
4929	}
4930	*v = sv
4931	return nil
4932}
4933
4934func awsAwsjson11_deserializeOpDocumentDescribeEntitiesDetectionV2JobOutput(v **DescribeEntitiesDetectionV2JobOutput, value interface{}) error {
4935	if v == nil {
4936		return fmt.Errorf("unexpected nil of type %T", v)
4937	}
4938	if value == nil {
4939		return nil
4940	}
4941
4942	shape, ok := value.(map[string]interface{})
4943	if !ok {
4944		return fmt.Errorf("unexpected JSON type %v", value)
4945	}
4946
4947	var sv *DescribeEntitiesDetectionV2JobOutput
4948	if *v == nil {
4949		sv = &DescribeEntitiesDetectionV2JobOutput{}
4950	} else {
4951		sv = *v
4952	}
4953
4954	for key, value := range shape {
4955		switch key {
4956		case "ComprehendMedicalAsyncJobProperties":
4957			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobProperties(&sv.ComprehendMedicalAsyncJobProperties, value); err != nil {
4958				return err
4959			}
4960
4961		default:
4962			_, _ = key, value
4963
4964		}
4965	}
4966	*v = sv
4967	return nil
4968}
4969
4970func awsAwsjson11_deserializeOpDocumentDescribeICD10CMInferenceJobOutput(v **DescribeICD10CMInferenceJobOutput, value interface{}) error {
4971	if v == nil {
4972		return fmt.Errorf("unexpected nil of type %T", v)
4973	}
4974	if value == nil {
4975		return nil
4976	}
4977
4978	shape, ok := value.(map[string]interface{})
4979	if !ok {
4980		return fmt.Errorf("unexpected JSON type %v", value)
4981	}
4982
4983	var sv *DescribeICD10CMInferenceJobOutput
4984	if *v == nil {
4985		sv = &DescribeICD10CMInferenceJobOutput{}
4986	} else {
4987		sv = *v
4988	}
4989
4990	for key, value := range shape {
4991		switch key {
4992		case "ComprehendMedicalAsyncJobProperties":
4993			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobProperties(&sv.ComprehendMedicalAsyncJobProperties, value); err != nil {
4994				return err
4995			}
4996
4997		default:
4998			_, _ = key, value
4999
5000		}
5001	}
5002	*v = sv
5003	return nil
5004}
5005
5006func awsAwsjson11_deserializeOpDocumentDescribePHIDetectionJobOutput(v **DescribePHIDetectionJobOutput, value interface{}) error {
5007	if v == nil {
5008		return fmt.Errorf("unexpected nil of type %T", v)
5009	}
5010	if value == nil {
5011		return nil
5012	}
5013
5014	shape, ok := value.(map[string]interface{})
5015	if !ok {
5016		return fmt.Errorf("unexpected JSON type %v", value)
5017	}
5018
5019	var sv *DescribePHIDetectionJobOutput
5020	if *v == nil {
5021		sv = &DescribePHIDetectionJobOutput{}
5022	} else {
5023		sv = *v
5024	}
5025
5026	for key, value := range shape {
5027		switch key {
5028		case "ComprehendMedicalAsyncJobProperties":
5029			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobProperties(&sv.ComprehendMedicalAsyncJobProperties, value); err != nil {
5030				return err
5031			}
5032
5033		default:
5034			_, _ = key, value
5035
5036		}
5037	}
5038	*v = sv
5039	return nil
5040}
5041
5042func awsAwsjson11_deserializeOpDocumentDescribeRxNormInferenceJobOutput(v **DescribeRxNormInferenceJobOutput, value interface{}) error {
5043	if v == nil {
5044		return fmt.Errorf("unexpected nil of type %T", v)
5045	}
5046	if value == nil {
5047		return nil
5048	}
5049
5050	shape, ok := value.(map[string]interface{})
5051	if !ok {
5052		return fmt.Errorf("unexpected JSON type %v", value)
5053	}
5054
5055	var sv *DescribeRxNormInferenceJobOutput
5056	if *v == nil {
5057		sv = &DescribeRxNormInferenceJobOutput{}
5058	} else {
5059		sv = *v
5060	}
5061
5062	for key, value := range shape {
5063		switch key {
5064		case "ComprehendMedicalAsyncJobProperties":
5065			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobProperties(&sv.ComprehendMedicalAsyncJobProperties, value); err != nil {
5066				return err
5067			}
5068
5069		default:
5070			_, _ = key, value
5071
5072		}
5073	}
5074	*v = sv
5075	return nil
5076}
5077
5078func awsAwsjson11_deserializeOpDocumentDetectEntitiesOutput(v **DetectEntitiesOutput, value interface{}) error {
5079	if v == nil {
5080		return fmt.Errorf("unexpected nil of type %T", v)
5081	}
5082	if value == nil {
5083		return nil
5084	}
5085
5086	shape, ok := value.(map[string]interface{})
5087	if !ok {
5088		return fmt.Errorf("unexpected JSON type %v", value)
5089	}
5090
5091	var sv *DetectEntitiesOutput
5092	if *v == nil {
5093		sv = &DetectEntitiesOutput{}
5094	} else {
5095		sv = *v
5096	}
5097
5098	for key, value := range shape {
5099		switch key {
5100		case "Entities":
5101			if err := awsAwsjson11_deserializeDocumentEntityList(&sv.Entities, value); err != nil {
5102				return err
5103			}
5104
5105		case "ModelVersion":
5106			if value != nil {
5107				jtv, ok := value.(string)
5108				if !ok {
5109					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5110				}
5111				sv.ModelVersion = ptr.String(jtv)
5112			}
5113
5114		case "PaginationToken":
5115			if value != nil {
5116				jtv, ok := value.(string)
5117				if !ok {
5118					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5119				}
5120				sv.PaginationToken = ptr.String(jtv)
5121			}
5122
5123		case "UnmappedAttributes":
5124			if err := awsAwsjson11_deserializeDocumentUnmappedAttributeList(&sv.UnmappedAttributes, value); err != nil {
5125				return err
5126			}
5127
5128		default:
5129			_, _ = key, value
5130
5131		}
5132	}
5133	*v = sv
5134	return nil
5135}
5136
5137func awsAwsjson11_deserializeOpDocumentDetectEntitiesV2Output(v **DetectEntitiesV2Output, value interface{}) error {
5138	if v == nil {
5139		return fmt.Errorf("unexpected nil of type %T", v)
5140	}
5141	if value == nil {
5142		return nil
5143	}
5144
5145	shape, ok := value.(map[string]interface{})
5146	if !ok {
5147		return fmt.Errorf("unexpected JSON type %v", value)
5148	}
5149
5150	var sv *DetectEntitiesV2Output
5151	if *v == nil {
5152		sv = &DetectEntitiesV2Output{}
5153	} else {
5154		sv = *v
5155	}
5156
5157	for key, value := range shape {
5158		switch key {
5159		case "Entities":
5160			if err := awsAwsjson11_deserializeDocumentEntityList(&sv.Entities, value); err != nil {
5161				return err
5162			}
5163
5164		case "ModelVersion":
5165			if value != nil {
5166				jtv, ok := value.(string)
5167				if !ok {
5168					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5169				}
5170				sv.ModelVersion = ptr.String(jtv)
5171			}
5172
5173		case "PaginationToken":
5174			if value != nil {
5175				jtv, ok := value.(string)
5176				if !ok {
5177					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5178				}
5179				sv.PaginationToken = ptr.String(jtv)
5180			}
5181
5182		case "UnmappedAttributes":
5183			if err := awsAwsjson11_deserializeDocumentUnmappedAttributeList(&sv.UnmappedAttributes, value); err != nil {
5184				return err
5185			}
5186
5187		default:
5188			_, _ = key, value
5189
5190		}
5191	}
5192	*v = sv
5193	return nil
5194}
5195
5196func awsAwsjson11_deserializeOpDocumentDetectPHIOutput(v **DetectPHIOutput, value interface{}) error {
5197	if v == nil {
5198		return fmt.Errorf("unexpected nil of type %T", v)
5199	}
5200	if value == nil {
5201		return nil
5202	}
5203
5204	shape, ok := value.(map[string]interface{})
5205	if !ok {
5206		return fmt.Errorf("unexpected JSON type %v", value)
5207	}
5208
5209	var sv *DetectPHIOutput
5210	if *v == nil {
5211		sv = &DetectPHIOutput{}
5212	} else {
5213		sv = *v
5214	}
5215
5216	for key, value := range shape {
5217		switch key {
5218		case "Entities":
5219			if err := awsAwsjson11_deserializeDocumentEntityList(&sv.Entities, value); err != nil {
5220				return err
5221			}
5222
5223		case "ModelVersion":
5224			if value != nil {
5225				jtv, ok := value.(string)
5226				if !ok {
5227					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5228				}
5229				sv.ModelVersion = ptr.String(jtv)
5230			}
5231
5232		case "PaginationToken":
5233			if value != nil {
5234				jtv, ok := value.(string)
5235				if !ok {
5236					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5237				}
5238				sv.PaginationToken = ptr.String(jtv)
5239			}
5240
5241		default:
5242			_, _ = key, value
5243
5244		}
5245	}
5246	*v = sv
5247	return nil
5248}
5249
5250func awsAwsjson11_deserializeOpDocumentInferICD10CMOutput(v **InferICD10CMOutput, value interface{}) error {
5251	if v == nil {
5252		return fmt.Errorf("unexpected nil of type %T", v)
5253	}
5254	if value == nil {
5255		return nil
5256	}
5257
5258	shape, ok := value.(map[string]interface{})
5259	if !ok {
5260		return fmt.Errorf("unexpected JSON type %v", value)
5261	}
5262
5263	var sv *InferICD10CMOutput
5264	if *v == nil {
5265		sv = &InferICD10CMOutput{}
5266	} else {
5267		sv = *v
5268	}
5269
5270	for key, value := range shape {
5271		switch key {
5272		case "Entities":
5273			if err := awsAwsjson11_deserializeDocumentICD10CMEntityList(&sv.Entities, value); err != nil {
5274				return err
5275			}
5276
5277		case "ModelVersion":
5278			if value != nil {
5279				jtv, ok := value.(string)
5280				if !ok {
5281					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5282				}
5283				sv.ModelVersion = ptr.String(jtv)
5284			}
5285
5286		case "PaginationToken":
5287			if value != nil {
5288				jtv, ok := value.(string)
5289				if !ok {
5290					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5291				}
5292				sv.PaginationToken = ptr.String(jtv)
5293			}
5294
5295		default:
5296			_, _ = key, value
5297
5298		}
5299	}
5300	*v = sv
5301	return nil
5302}
5303
5304func awsAwsjson11_deserializeOpDocumentInferRxNormOutput(v **InferRxNormOutput, value interface{}) error {
5305	if v == nil {
5306		return fmt.Errorf("unexpected nil of type %T", v)
5307	}
5308	if value == nil {
5309		return nil
5310	}
5311
5312	shape, ok := value.(map[string]interface{})
5313	if !ok {
5314		return fmt.Errorf("unexpected JSON type %v", value)
5315	}
5316
5317	var sv *InferRxNormOutput
5318	if *v == nil {
5319		sv = &InferRxNormOutput{}
5320	} else {
5321		sv = *v
5322	}
5323
5324	for key, value := range shape {
5325		switch key {
5326		case "Entities":
5327			if err := awsAwsjson11_deserializeDocumentRxNormEntityList(&sv.Entities, value); err != nil {
5328				return err
5329			}
5330
5331		case "ModelVersion":
5332			if value != nil {
5333				jtv, ok := value.(string)
5334				if !ok {
5335					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5336				}
5337				sv.ModelVersion = ptr.String(jtv)
5338			}
5339
5340		case "PaginationToken":
5341			if value != nil {
5342				jtv, ok := value.(string)
5343				if !ok {
5344					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5345				}
5346				sv.PaginationToken = ptr.String(jtv)
5347			}
5348
5349		default:
5350			_, _ = key, value
5351
5352		}
5353	}
5354	*v = sv
5355	return nil
5356}
5357
5358func awsAwsjson11_deserializeOpDocumentListEntitiesDetectionV2JobsOutput(v **ListEntitiesDetectionV2JobsOutput, value interface{}) error {
5359	if v == nil {
5360		return fmt.Errorf("unexpected nil of type %T", v)
5361	}
5362	if value == nil {
5363		return nil
5364	}
5365
5366	shape, ok := value.(map[string]interface{})
5367	if !ok {
5368		return fmt.Errorf("unexpected JSON type %v", value)
5369	}
5370
5371	var sv *ListEntitiesDetectionV2JobsOutput
5372	if *v == nil {
5373		sv = &ListEntitiesDetectionV2JobsOutput{}
5374	} else {
5375		sv = *v
5376	}
5377
5378	for key, value := range shape {
5379		switch key {
5380		case "ComprehendMedicalAsyncJobPropertiesList":
5381			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobPropertiesList(&sv.ComprehendMedicalAsyncJobPropertiesList, value); err != nil {
5382				return err
5383			}
5384
5385		case "NextToken":
5386			if value != nil {
5387				jtv, ok := value.(string)
5388				if !ok {
5389					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5390				}
5391				sv.NextToken = ptr.String(jtv)
5392			}
5393
5394		default:
5395			_, _ = key, value
5396
5397		}
5398	}
5399	*v = sv
5400	return nil
5401}
5402
5403func awsAwsjson11_deserializeOpDocumentListICD10CMInferenceJobsOutput(v **ListICD10CMInferenceJobsOutput, value interface{}) error {
5404	if v == nil {
5405		return fmt.Errorf("unexpected nil of type %T", v)
5406	}
5407	if value == nil {
5408		return nil
5409	}
5410
5411	shape, ok := value.(map[string]interface{})
5412	if !ok {
5413		return fmt.Errorf("unexpected JSON type %v", value)
5414	}
5415
5416	var sv *ListICD10CMInferenceJobsOutput
5417	if *v == nil {
5418		sv = &ListICD10CMInferenceJobsOutput{}
5419	} else {
5420		sv = *v
5421	}
5422
5423	for key, value := range shape {
5424		switch key {
5425		case "ComprehendMedicalAsyncJobPropertiesList":
5426			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobPropertiesList(&sv.ComprehendMedicalAsyncJobPropertiesList, value); err != nil {
5427				return err
5428			}
5429
5430		case "NextToken":
5431			if value != nil {
5432				jtv, ok := value.(string)
5433				if !ok {
5434					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5435				}
5436				sv.NextToken = ptr.String(jtv)
5437			}
5438
5439		default:
5440			_, _ = key, value
5441
5442		}
5443	}
5444	*v = sv
5445	return nil
5446}
5447
5448func awsAwsjson11_deserializeOpDocumentListPHIDetectionJobsOutput(v **ListPHIDetectionJobsOutput, value interface{}) error {
5449	if v == nil {
5450		return fmt.Errorf("unexpected nil of type %T", v)
5451	}
5452	if value == nil {
5453		return nil
5454	}
5455
5456	shape, ok := value.(map[string]interface{})
5457	if !ok {
5458		return fmt.Errorf("unexpected JSON type %v", value)
5459	}
5460
5461	var sv *ListPHIDetectionJobsOutput
5462	if *v == nil {
5463		sv = &ListPHIDetectionJobsOutput{}
5464	} else {
5465		sv = *v
5466	}
5467
5468	for key, value := range shape {
5469		switch key {
5470		case "ComprehendMedicalAsyncJobPropertiesList":
5471			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobPropertiesList(&sv.ComprehendMedicalAsyncJobPropertiesList, value); err != nil {
5472				return err
5473			}
5474
5475		case "NextToken":
5476			if value != nil {
5477				jtv, ok := value.(string)
5478				if !ok {
5479					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5480				}
5481				sv.NextToken = ptr.String(jtv)
5482			}
5483
5484		default:
5485			_, _ = key, value
5486
5487		}
5488	}
5489	*v = sv
5490	return nil
5491}
5492
5493func awsAwsjson11_deserializeOpDocumentListRxNormInferenceJobsOutput(v **ListRxNormInferenceJobsOutput, value interface{}) error {
5494	if v == nil {
5495		return fmt.Errorf("unexpected nil of type %T", v)
5496	}
5497	if value == nil {
5498		return nil
5499	}
5500
5501	shape, ok := value.(map[string]interface{})
5502	if !ok {
5503		return fmt.Errorf("unexpected JSON type %v", value)
5504	}
5505
5506	var sv *ListRxNormInferenceJobsOutput
5507	if *v == nil {
5508		sv = &ListRxNormInferenceJobsOutput{}
5509	} else {
5510		sv = *v
5511	}
5512
5513	for key, value := range shape {
5514		switch key {
5515		case "ComprehendMedicalAsyncJobPropertiesList":
5516			if err := awsAwsjson11_deserializeDocumentComprehendMedicalAsyncJobPropertiesList(&sv.ComprehendMedicalAsyncJobPropertiesList, value); err != nil {
5517				return err
5518			}
5519
5520		case "NextToken":
5521			if value != nil {
5522				jtv, ok := value.(string)
5523				if !ok {
5524					return fmt.Errorf("expected String to be of type string, got %T instead", value)
5525				}
5526				sv.NextToken = ptr.String(jtv)
5527			}
5528
5529		default:
5530			_, _ = key, value
5531
5532		}
5533	}
5534	*v = sv
5535	return nil
5536}
5537
5538func awsAwsjson11_deserializeOpDocumentStartEntitiesDetectionV2JobOutput(v **StartEntitiesDetectionV2JobOutput, value interface{}) error {
5539	if v == nil {
5540		return fmt.Errorf("unexpected nil of type %T", v)
5541	}
5542	if value == nil {
5543		return nil
5544	}
5545
5546	shape, ok := value.(map[string]interface{})
5547	if !ok {
5548		return fmt.Errorf("unexpected JSON type %v", value)
5549	}
5550
5551	var sv *StartEntitiesDetectionV2JobOutput
5552	if *v == nil {
5553		sv = &StartEntitiesDetectionV2JobOutput{}
5554	} else {
5555		sv = *v
5556	}
5557
5558	for key, value := range shape {
5559		switch key {
5560		case "JobId":
5561			if value != nil {
5562				jtv, ok := value.(string)
5563				if !ok {
5564					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5565				}
5566				sv.JobId = ptr.String(jtv)
5567			}
5568
5569		default:
5570			_, _ = key, value
5571
5572		}
5573	}
5574	*v = sv
5575	return nil
5576}
5577
5578func awsAwsjson11_deserializeOpDocumentStartICD10CMInferenceJobOutput(v **StartICD10CMInferenceJobOutput, value interface{}) error {
5579	if v == nil {
5580		return fmt.Errorf("unexpected nil of type %T", v)
5581	}
5582	if value == nil {
5583		return nil
5584	}
5585
5586	shape, ok := value.(map[string]interface{})
5587	if !ok {
5588		return fmt.Errorf("unexpected JSON type %v", value)
5589	}
5590
5591	var sv *StartICD10CMInferenceJobOutput
5592	if *v == nil {
5593		sv = &StartICD10CMInferenceJobOutput{}
5594	} else {
5595		sv = *v
5596	}
5597
5598	for key, value := range shape {
5599		switch key {
5600		case "JobId":
5601			if value != nil {
5602				jtv, ok := value.(string)
5603				if !ok {
5604					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5605				}
5606				sv.JobId = ptr.String(jtv)
5607			}
5608
5609		default:
5610			_, _ = key, value
5611
5612		}
5613	}
5614	*v = sv
5615	return nil
5616}
5617
5618func awsAwsjson11_deserializeOpDocumentStartPHIDetectionJobOutput(v **StartPHIDetectionJobOutput, value interface{}) error {
5619	if v == nil {
5620		return fmt.Errorf("unexpected nil of type %T", v)
5621	}
5622	if value == nil {
5623		return nil
5624	}
5625
5626	shape, ok := value.(map[string]interface{})
5627	if !ok {
5628		return fmt.Errorf("unexpected JSON type %v", value)
5629	}
5630
5631	var sv *StartPHIDetectionJobOutput
5632	if *v == nil {
5633		sv = &StartPHIDetectionJobOutput{}
5634	} else {
5635		sv = *v
5636	}
5637
5638	for key, value := range shape {
5639		switch key {
5640		case "JobId":
5641			if value != nil {
5642				jtv, ok := value.(string)
5643				if !ok {
5644					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5645				}
5646				sv.JobId = ptr.String(jtv)
5647			}
5648
5649		default:
5650			_, _ = key, value
5651
5652		}
5653	}
5654	*v = sv
5655	return nil
5656}
5657
5658func awsAwsjson11_deserializeOpDocumentStartRxNormInferenceJobOutput(v **StartRxNormInferenceJobOutput, value interface{}) error {
5659	if v == nil {
5660		return fmt.Errorf("unexpected nil of type %T", v)
5661	}
5662	if value == nil {
5663		return nil
5664	}
5665
5666	shape, ok := value.(map[string]interface{})
5667	if !ok {
5668		return fmt.Errorf("unexpected JSON type %v", value)
5669	}
5670
5671	var sv *StartRxNormInferenceJobOutput
5672	if *v == nil {
5673		sv = &StartRxNormInferenceJobOutput{}
5674	} else {
5675		sv = *v
5676	}
5677
5678	for key, value := range shape {
5679		switch key {
5680		case "JobId":
5681			if value != nil {
5682				jtv, ok := value.(string)
5683				if !ok {
5684					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5685				}
5686				sv.JobId = ptr.String(jtv)
5687			}
5688
5689		default:
5690			_, _ = key, value
5691
5692		}
5693	}
5694	*v = sv
5695	return nil
5696}
5697
5698func awsAwsjson11_deserializeOpDocumentStopEntitiesDetectionV2JobOutput(v **StopEntitiesDetectionV2JobOutput, value interface{}) error {
5699	if v == nil {
5700		return fmt.Errorf("unexpected nil of type %T", v)
5701	}
5702	if value == nil {
5703		return nil
5704	}
5705
5706	shape, ok := value.(map[string]interface{})
5707	if !ok {
5708		return fmt.Errorf("unexpected JSON type %v", value)
5709	}
5710
5711	var sv *StopEntitiesDetectionV2JobOutput
5712	if *v == nil {
5713		sv = &StopEntitiesDetectionV2JobOutput{}
5714	} else {
5715		sv = *v
5716	}
5717
5718	for key, value := range shape {
5719		switch key {
5720		case "JobId":
5721			if value != nil {
5722				jtv, ok := value.(string)
5723				if !ok {
5724					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5725				}
5726				sv.JobId = ptr.String(jtv)
5727			}
5728
5729		default:
5730			_, _ = key, value
5731
5732		}
5733	}
5734	*v = sv
5735	return nil
5736}
5737
5738func awsAwsjson11_deserializeOpDocumentStopICD10CMInferenceJobOutput(v **StopICD10CMInferenceJobOutput, value interface{}) error {
5739	if v == nil {
5740		return fmt.Errorf("unexpected nil of type %T", v)
5741	}
5742	if value == nil {
5743		return nil
5744	}
5745
5746	shape, ok := value.(map[string]interface{})
5747	if !ok {
5748		return fmt.Errorf("unexpected JSON type %v", value)
5749	}
5750
5751	var sv *StopICD10CMInferenceJobOutput
5752	if *v == nil {
5753		sv = &StopICD10CMInferenceJobOutput{}
5754	} else {
5755		sv = *v
5756	}
5757
5758	for key, value := range shape {
5759		switch key {
5760		case "JobId":
5761			if value != nil {
5762				jtv, ok := value.(string)
5763				if !ok {
5764					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5765				}
5766				sv.JobId = ptr.String(jtv)
5767			}
5768
5769		default:
5770			_, _ = key, value
5771
5772		}
5773	}
5774	*v = sv
5775	return nil
5776}
5777
5778func awsAwsjson11_deserializeOpDocumentStopPHIDetectionJobOutput(v **StopPHIDetectionJobOutput, value interface{}) error {
5779	if v == nil {
5780		return fmt.Errorf("unexpected nil of type %T", v)
5781	}
5782	if value == nil {
5783		return nil
5784	}
5785
5786	shape, ok := value.(map[string]interface{})
5787	if !ok {
5788		return fmt.Errorf("unexpected JSON type %v", value)
5789	}
5790
5791	var sv *StopPHIDetectionJobOutput
5792	if *v == nil {
5793		sv = &StopPHIDetectionJobOutput{}
5794	} else {
5795		sv = *v
5796	}
5797
5798	for key, value := range shape {
5799		switch key {
5800		case "JobId":
5801			if value != nil {
5802				jtv, ok := value.(string)
5803				if !ok {
5804					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5805				}
5806				sv.JobId = ptr.String(jtv)
5807			}
5808
5809		default:
5810			_, _ = key, value
5811
5812		}
5813	}
5814	*v = sv
5815	return nil
5816}
5817
5818func awsAwsjson11_deserializeOpDocumentStopRxNormInferenceJobOutput(v **StopRxNormInferenceJobOutput, value interface{}) error {
5819	if v == nil {
5820		return fmt.Errorf("unexpected nil of type %T", v)
5821	}
5822	if value == nil {
5823		return nil
5824	}
5825
5826	shape, ok := value.(map[string]interface{})
5827	if !ok {
5828		return fmt.Errorf("unexpected JSON type %v", value)
5829	}
5830
5831	var sv *StopRxNormInferenceJobOutput
5832	if *v == nil {
5833		sv = &StopRxNormInferenceJobOutput{}
5834	} else {
5835		sv = *v
5836	}
5837
5838	for key, value := range shape {
5839		switch key {
5840		case "JobId":
5841			if value != nil {
5842				jtv, ok := value.(string)
5843				if !ok {
5844					return fmt.Errorf("expected JobId to be of type string, got %T instead", value)
5845				}
5846				sv.JobId = ptr.String(jtv)
5847			}
5848
5849		default:
5850			_, _ = key, value
5851
5852		}
5853	}
5854	*v = sv
5855	return nil
5856}
5857