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